import { type ForwardedRef, type RefObject } from 'react'; type UseDialogStateControllerOptions = { open?: boolean; onClose?: () => void; forwardedRef: ForwardedRef; customFocusElement?: RefObject | HTMLElement | null; }; /** * Custom hook to control the open/close state of a dialog. * * This hook provides functionality to open or close a dialog based on the `open` flag. * It also handles closing the dialog when the backdrop is clicked and prevents the dialog from closing * when clicking inside the dialog content. * * @param options - The options for controlling the dialog state. * * @param options.open - Flag indicating if the dialog should be open. * * @param options.onClose - Callback function to execute when closing the dialog. * * @param options.forwardedRef - Reference to the dialog DOM element. * * @param options.customFocusElement - Optional custom element to focus when the dialog opens. * When provided, this element receives focus instead of the dialog container. * * @returns Object containing functions to handle closing the dialog and stopping the dialog from closing. */ export declare const useDialogStateController: ({ open, forwardedRef, onClose, customFocusElement, }: UseDialogStateControllerOptions) => { localOpen: boolean | undefined; closeDialog: () => void; handleStopCloseDialog: (event: React.MouseEvent) => void; dialogElement: HTMLDivElement | null; setDialogElement: (element: HTMLDivElement | null) => void; }; export {};