import { type ReactNode } from "react"; import type { TDialog } from "./types"; type TDialogEntry = { id: number; dialog: TDialog; /** * Internal lifecycle state. * * true -> Dialog should be presented * false -> Dialog should animate out * * This intentionally does not exist on the public TDialog API. */ isOpen: boolean; }; type TDialogContext = { activeDialog: TDialogEntry | null; /** * Requests the active Dialog to begin closing. * * The id guard prevents stale async callbacks from closing a newer * Dialog instance. */ requestClose: (id: number) => boolean; /** * Called by the visual Dialog host after its exit animation completes. * * Only the matching active Dialog may complete its lifecycle. */ completeClose: (id: number) => void; }; type TDialogProviderProps = { children: ReactNode; renderDialog: ReactNode; }; /** * Shows a Dialog through ARCUI's single global Dialog host. * * If another Dialog is already active, the current one exits first and * the latest requested Dialog becomes the pending replacement. */ export declare const showDialog: (dialog: TDialog) => void; /** * Closes the current Dialog through the same lifecycle used by actions, * backdrop dismissal, Android back, and accessibility escape. */ export declare const hideDialog: () => void; export declare const DialogProvider: ({ children, renderDialog, }: TDialogProviderProps) => import("react/jsx-runtime").JSX.Element; /** * Internal Dialog host API. * * Missing provider ownership is an architectural error and must not * silently degrade to no-op behavior. */ export declare const useDialogContext: () => TDialogContext; export {};