# confirmdialog

```ts
import { ConfirmDialogModule } from '@anguless/angulux/confirmdialog';
```

## ConfirmDialog

`agl-confirmDialog, agl-confirmdialog, agl-confirm-dialog` — component

Inherits every input, output and slot of `BaseComponent` — see [basecomponent.md](basecomponent.md).

ConfirmDialog uses a Dialog UI that is integrated with the Confirmation API.

| Input | Type | Default | Description |
| --- | --- | --- | --- |
| `header` | `string \| undefined` | _not documented_ | Title text of the dialog. |
| `icon` | `string \| undefined` | _not documented_ | Icon to display next to message. |
| `message` | `string \| undefined` | _not documented_ | Message of the confirmation. |
| `style` | `{ [klass: string]: any } \| null \| undefined` | _not documented_ | Inline style of the element. |
| `styleClass` | `string \| undefined` | _not documented_ | Class of the element. |
| `maskStyleClass` | `string \| undefined` | _not documented_ | Specify the CSS class(es) for styling the mask element |
| `acceptIcon` | `string \| undefined` | _not documented_ | Icon of the accept button. |
| `acceptLabel` | `string \| undefined` | _not documented_ | Label of the accept button. |
| `closeAriaLabel` | `string \| undefined` | _not documented_ | Defines a string that labels the close button for accessibility. |
| `acceptAriaLabel` | `string \| undefined` | _not documented_ | Defines a string that labels the accept button for accessibility. |
| `acceptVisible` | `boolean` | _not documented_ | Visibility of the accept button. |
| `rejectIcon` | `string \| undefined` | _not documented_ | Icon of the reject button. |
| `rejectLabel` | `string \| undefined` | _not documented_ | Label of the reject button. |
| `rejectAriaLabel` | `string \| undefined` | _not documented_ | Defines a string that labels the reject button for accessibility. |
| `rejectVisible` | `boolean` | _not documented_ | Visibility of the reject button. |
| `acceptButtonStyleClass` | `string \| undefined` | _not documented_ | Style class of the accept button. |
| `rejectButtonStyleClass` | `string \| undefined` | _not documented_ | Style class of the reject button. |
| `closeOnEscape` | `boolean` | _not documented_ | Specifies if pressing escape key should hide the dialog. |
| `dismissableMask` | `boolean \| undefined` | _not documented_ | Specifies if clicking the modal background should hide the dialog. |
| `blockScroll` | `boolean` | _not documented_ | Determines whether scrolling behavior should be blocked within the component. |
| `rtl` | `boolean` | _not documented_ | When enabled dialog is displayed in RTL direction. |
| `closable` | `boolean` | _not documented_ | Adds a close icon to the header to hide the dialog. |
| `appendTo` | `HTMLElement \| ElementRef \| TemplateRef<any> \| 'self' \| 'body' \| null \| undefined \| any` | `'body'` | Target element to attach the overlay, valid values are "body" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]="mydiv" for a div element having #mydiv as variable name). |
| `key` | `string \| undefined` | _not documented_ | Optional key to match the key of confirm object, necessary to use when component tree has multiple confirm dialogs. |
| `autoZIndex` | `boolean` | _not documented_ | Whether to automatically manage layering. |
| `baseZIndex` | `number` | _not documented_ | Base zIndex value to use in layering. |
| `transitionOptions` | `string` | _not documented_ | Transition options of the animation. |
| `focusTrap` | `boolean` | _not documented_ | When enabled, can only focus on elements inside the confirm dialog. |
| `defaultFocus` | `'accept' \| 'reject' \| 'close' \| 'none'` | _not documented_ | Element to receive the focus when the dialog gets visible. |
| `breakpoints` | `any` | _not documented_ | Object literal to define widths per screen size. |
| `modal` | `boolean` | _not documented_ | Defines if background should be blocked when dialog is displayed. |
| `visible` | `any` | _not documented_ | Current visible state as a boolean. |
| `position` | `'center' \| 'top' \| 'bottom' \| 'left' \| 'right' \| 'topleft' \| 'topright' \| 'bottomleft' \| 'bottomright'` | _not documented_ | Allows getting the position of the component. |
| `draggable` | `boolean` | _not documented_ | Enables dragging to change the position using header. |

| Output | Type | Description |
| --- | --- | --- |
| `onHide` | `EventEmitter<ConfirmEventType>` | Callback to invoke when dialog is hidden. |

| Slot | Read as | Description |
| --- | --- | --- |
| `<ng-template #header>` | `headerTemplate` | Custom header template. |
| `<ng-template #footer>` | `footerTemplate` | Custom footer template. |
| `<ng-template #rejecticon>` | `rejectIconTemplate` | Custom reject icon template. |
| `<ng-template #accepticon>` | `acceptIconTemplate` | Custom accept icon template. |
| `<ng-template #message>` | `messageTemplate` | Custom message template. |
| `<ng-template #icon>` | `iconTemplate` | Custom icon template. |
| `<ng-template #headless>` | `headlessTemplate` | Custom headless template. |
