import type { JSX } from "@solidjs/web"; /** * `` — Solid 2 port of Base UI React's `AlertDialogRoot` * (`packages/react/src/alert-dialog/root/AlertDialogRoot.tsx`). Shares the * shared `useDialogRootInternal` helper with ``; pins * `modal: true`, `disablePointerDismissal: true`, and `role: * "alertdialog"`. */ import { type DialogRootChangeEventDetails, type DialogRootChangeEventReason } from "../../dialog/dialog-root-context.js"; import { type DialogPayloadChildRenderFunction } from "../../dialog/root/use-dialog-root-internal.js"; import { type MaybeAccessor } from "../../internals/maybe-accessor.js"; import type { AlertDialogHandle } from "../handle.js"; export type AlertDialogRootChangeEventDetails = DialogRootChangeEventDetails; export type AlertDialogRootChangeEventReason = DialogRootChangeEventReason; export type AlertDialogPayloadChildRenderFunction = DialogPayloadChildRenderFunction; /** Imperative actions surface written into `actionsRef`. */ export interface AlertDialogRootActions { close: () => void; unmount: () => void; } export interface AlertDialogRootProps { /** * Controlled open state. When provided (resolved value not * `undefined`), the consumer owns the state — pair with * {@link onOpenChange}. When omitted, the alert dialog manages its own * open state (seeded from {@link defaultOpen}). */ open?: MaybeAccessor; /** * Initial open state when uncontrolled. Read once at mount. * @default false */ defaultOpen?: MaybeAccessor; /** Fires on every open/close request. */ onOpenChange?: ((open: boolean, eventDetails: AlertDialogRootChangeEventDetails) => void) | undefined; /** * Fires once the open/close transition has settled. */ onOpenChangeComplete?: ((open: boolean) => void) | undefined; /** * Ref (callback or `{ current }`) that receives the imperative actions * object on mount. */ actionsRef?: ((actions: AlertDialogRootActions | null) => void) | { current: AlertDialogRootActions | null; } | undefined; /** * Handle to connect with detached triggers or to control the dialog * imperatively. */ handle?: AlertDialogHandle | undefined; /** Controlled active trigger id (multi-trigger setups). */ triggerId?: string | null | undefined; /** * Children — plain JSX or `({ payload }) => JSX.Element` render * function. */ children?: JSX.Element | AlertDialogPayloadChildRenderFunction; } /** * Groups all parts of the alert dialog. Doesn't render its own HTML * element. */ export declare function AlertDialogRoot(props: AlertDialogRootProps): JSX.Element; //# sourceMappingURL=alert-dialog-root.d.ts.map