import { type PropsWithChildren } from 'react'; import { DialogManager } from '../components/Dialog/service/DialogManager'; import { type DialogPortalDestinationProps } from '../components/Dialog/service/DialogPortal'; import type { PropsWithChildrenOnly } from '../types/types'; type DialogManagerProviderContextValue = { dialogManager: DialogManager; }; type DialogManagerProviderProps = PropsWithChildren<{ /** * Closes open dialogs on a click on the overlay or outside it, unless a dialog sets its own. * Defaults to `true`. */ closeOnClickOutside?: boolean; portalDestinationProps?: DialogPortalDestinationProps; id?: string; }>; /** * Provides a dialog manager and its portal destination. With `id` the manager is registered under * it until unmount, otherwise it is local to the provider. */ export declare const DialogManagerProvider: ({ children, closeOnClickOutside, id, portalDestinationProps, }: DialogManagerProviderProps) => import("react/jsx-runtime").JSX.Element | null; export type UseDialogManagerParams = { dialogId?: string; dialogManagerId?: string; }; /** * Resolves a registered dialog manager by `dialogManagerId` (which must hold `dialogId` when both * are given) or by `dialogId` alone. Falls back to the nearest `DialogManagerProvider`'s manager * and throws when none resolves. * * @param params.dialogId - ID of a dialog the manager holds. * @param params.dialogManagerId - ID of a registered dialog manager. * @returns The context value holding the resolved `dialogManager`. */ export declare const useDialogManager: ({ dialogId, dialogManagerId, }?: UseDialogManagerParams) => DialogManagerProviderContextValue; export declare const modalDialogManagerId: "modal-dialog-manager"; export declare const ModalDialogManagerProvider: ({ children }: PropsWithChildrenOnly) => import("react/jsx-runtime").JSX.Element; export declare const useModalDialogManager: () => DialogManager | undefined; export declare const useNearestDialogManagerContext: () => DialogManagerProviderContextValue | undefined; export {}; //# sourceMappingURL=DialogManagerContext.d.ts.map