[object Promise]

# ChatConfirmation API

## Demos

For examples and details on the usage of this React component, visit the component demo pages:

- [Chat - Tool Approval](/x/react-chat/ai-and-agents/tool-approval/)

## Import

```jsx
import { ChatConfirmation } from '@mui/x-chat/ChatConfirmation';
// or
import { ChatConfirmation } from '@mui/x-chat';
```

## Props

| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| message | `string` | - | Yes |  |
| cancelLabel | `string` | `'Cancel'` | No |  |
| classes | `object` | - | No | Override or extend the styles applied to the component. |
| confirmLabel | `string` | `'Confirm'` | No |  |
| onCancel | `func` | - | No |  |
| onConfirm | `func` | - | No |  |
| sx | `Array<func \| object \| bool> \| func \| object` | - | No | The system prop that allows defining system overrides as well as additional CSS styles. |

> **Note**: The `ref` is forwarded to the root element.

> Any other props supplied will be provided to the root element (native element).

## CSS

### Rule name

| Global class | Rule name | Description |
|--------------|-----------|-------------|
| - | actions | Styles applied to the actions container element. |
| - | cancelButton | Styles applied to the cancel button element. |
| - | confirmButton | Styles applied to the confirm button element. |
| - | icon | Styles applied to the icon element. |
| - | message | Styles applied to the message element. |
| - | root | Styles applied to the root element. |

## Source code

If you did not find the information on this page, consider having a look at the implementation of the component for more detail.

- [/packages/x-chat/src/ChatConfirmation/ChatConfirmation.tsx](https://github.com/mui/material-ui/tree/HEAD/packages/x-chat/src/ChatConfirmation/ChatConfirmation.tsx)