import * as React from 'react'; import { type InteractionType } from '../../utils/useEnhancedClickHandler.js'; import { GenericHTMLProps } from '../../utils/types.js'; import { type OpenChangeReason } from '../../utils/translateOpenChangeReason.js'; export declare function useDialogPopup(parameters: useDialogPopup.Parameters): useDialogPopup.ReturnValue; export declare namespace useDialogPopup { interface Parameters { /** * The id of the dialog element. */ id?: string; /** * The ref to the dialog element. */ ref: React.Ref; /** * Whether the dialog should prevent outside clicks and lock page scroll when open. */ modal: boolean; openMethod: InteractionType | null; /** * Event handler called when the dialog is opened or closed. */ setOpen: (open: boolean, event: Event | undefined, reason: OpenChangeReason | undefined) => void; /** * The id of the title element associated with the dialog. */ titleElementId: string | undefined; /** * The id of the description element associated with the dialog. */ descriptionElementId: string | undefined; /** * Determines the element to focus when the dialog is opened. * By default, the first focusable element is focused. */ initialFocus?: React.RefObject | ((interactionType: InteractionType) => React.RefObject); /** * Determines if the dialog should be mounted. */ mounted: boolean; /** * The resolver for the popup element props. */ getPopupProps: () => GenericHTMLProps; /** * Callback to register the popup element. */ setPopupElement: React.Dispatch>; } interface ReturnValue { /** * Resolver for the root element props. */ getRootProps: (externalProps: React.ComponentPropsWithRef<'div'>) => React.ComponentPropsWithRef<'div'>; resolvedInitialFocus: React.RefObject | number; } }