import { type IDialogOptions } from '@breadstone/mosaik-elements-foundation'; /** * Represents the return type of the `useDialog` hook. * * @public */ export interface IUseDialogReturn { /** * Opens a dialog with the specified wrapper component. * * @template T - Type of the wrapper component extending HTMLElement. * @template TData - Type of data provided to the wrapper component. * @template TResult - Expected return type of the resolved dialog result. * @param dialogId - Unique identifier for the dialog. * @param wrapperClass - Constructor for the wrapper component. * @param options - Optional dialog configuration. * @param data - Optional data to pass to the wrapper. * @returns Promise resolving to the dialog result. */ open(dialogId: string, wrapperClass: new (args?: TData) => T, options?: IDialogOptions, data?: TData): Promise; /** * Closes a dialog by its identifier. * * @template TResult - Type of the result to return. * @param dialogId - The identifier of the dialog to close. * @param result - Optional result to pass to the dialog opener. * @returns Promise that resolves when the dialog is closed. */ close(dialogId: string, result?: TResult): Promise; } /** * React hook for managing dialogs using the foundation DialogService singleton. * * @remarks * This hook provides a React-idiomatic interface to the foundation DialogService. * The service should be configured at application startup using `DialogService.configure()`. * * @example * ```tsx * // In your app setup * DialogService.configure({ * behaviors: [withDialogStackBehavior({ baseWidth: '80%' })], * closeOnNavigation: true * }); * * // In your component * function MyComponent() { * const dialog = useDialog(); * * const handleOpen = async () => { * const result = await dialog.open('myDialog', MyDialogWrapper, { * header: 'Confirm Action', * closeable: true * }); * console.log('Dialog result:', result); * }; * * return ; * } * ``` * * @public * @returns An object containing dialog management functions. */ export declare function useDialog(): IUseDialogReturn; //# sourceMappingURL=useDialog.d.ts.map