### File

`packages/components/eui-message-box/services/eui-message-box.service.ts`

### Description

Service for programmatically creating, opening, and controlling message boxes in the eui application.

The EuiMessageBoxService wraps the EuiDialogService to provide a simplified API specifically for message box functionality. Message boxes are specialized dialog windows typically used for alerts, confirmations, and prompts.

The service handles the configuration of common message box properties and delegates to the underlying dialog service for rendering.

See EuiMessageBoxComponent See EuiDialogService

### Index

###### Methods
Public closeMessageBox Public openMessageBox

### Methods

Public closeMessageBox
`closeMessageBox()`
Closes the currently active message box. This method delegates to the dialog service to close any open dialog. Returns : `void`

Public openMessageBox
`openMessageBox(config: EuiDialogInterface<HC | HCC | BC | BCC | FC | FCC>)`
Type parameters : HC HCC BC BCC FC FCC
Opens a message box with the specified configuration. This method sets default message box properties and delegates to the dialog service to render the message box. Message boxes don't close on outside click or escape key, and have no header component or close button by default. Parameters :
Name | Type | Optional | Default value | Description
config | `EuiDialogInterface<HC | HCC | BC | BCC | FC | FCC>` | No | `{}` | Configuration options for the message box
Returns : `void`

# results matching ""

# No results matching ""