/**
 * @file Dialog.tsx
 * @input Uses React, DialogHTMLAttributes, ReactNode, container (Layout), DialogContext
 * @output Exports Dialog component, DialogProps, DialogVariant, DialogPurpose types
 * @position Core implementation; consumed by index.ts, tested by Dialog.test.tsx
 *
 * SYNC: When modified, update these files to stay in sync:
 * - /packages/core/src/Dialog/Dialog.doc.mjs (props table, features, implementation notes)
 * - /packages/core/src/Dialog/Dialog.test.tsx (tests for new/changed behavior)
 * - /packages/core/src/Dialog/index.ts (exports if types change)
 * - /apps/storybook/stories/Dialog.stories.tsx (storybook stories)
 * - /packages/cli/assets/templates/blocks/components/Dialog/ (showcase blocks)
 */
import { type ReactNode } from 'react';
import type { BaseProps } from '../BaseProps';
import type { SpacingStep } from '../utils/types';
import type { DialogVariantMap } from './index';
/**
 * Dialog variant type
 * - standard: Normal dialog with configurable width/height
 * - fullscreen: Takes up the entire viewport
 *
 * Extensible via module augmentation of DialogVariantMap.
 */
export type DialogVariant = keyof DialogVariantMap;
/**
 * Dialog purpose type - controls dismissal behavior
 * - required: Mandatory flows (security, permissions) - disables all exit methods
 * - form: User forms/flows - prevents backdrop click, allows escape
 * - info: Informational flows - allows all exit methods
 */
export type DialogPurpose = 'required' | 'form' | 'info';
/** Block-axis offsets — always allowed, independent of inline direction. */
interface DialogBlockPosition {
    top?: number | string;
    bottom?: number | string;
}
/**
 * Static position for a dialog. The inline axis is logical XOR physical — the
 * type forbids mixing the two, so a single dialog can't be positioned both ways:
 * - Logical `start`/`end` map to `inset-inline-*` and mirror under RTL (preferred).
 * Block-axis `top`/`bottom` may be combined with either.
 */
export interface DialogPosition extends DialogBlockPosition {
    /** Logical inline-start offset (`inset-inline-start`); mirrors under RTL. */
    start?: number | string;
    /** Logical inline-end offset (`inset-inline-end`); mirrors under RTL. */
    end?: number | string;
}
/**
 * Map a {@link DialogPosition} to resolved CSS offsets. Logical `start`/`end`
 * become `inset-inline-*` (mirror under RTL); each unset offset falls back to
 * `auto`.
 *
 * Not re-exported from the package; internal to Dialog. Directly unit-tested
 * so the mapping is verified without StyleX class compilation.
 *
 * @see DialogPosition
 */
export declare function resolveDialogPositionOffsets(position: DialogPosition): {
    top: string;
    bottom: string;
    insetInlineStart: string;
    insetInlineEnd: string;
};
export interface DialogProps extends BaseProps<HTMLDialogElement> {
    /** Ref forwarded to the root element */
    ref?: React.Ref<HTMLDialogElement>;
    /**
     * Whether the dialog is open.
     */
    isOpen: boolean;
    /**
     * Renders dialog content inline without the <dialog> element, backdrop,
     * modal behavior, or dialog-managed autofocus. Intended for documentation
     * previews and showcases only — not for production UIs. The dialog will not
     * trap focus or respond to Escape.
     * @default false
     */
    isInline?: boolean;
    /**
     * Callback fired when the dialog visibility changes.
     * Called with `false` when the dialog requests to be hidden.
     * Behavior depends on the `purpose` prop:
     * - required: Never called automatically
     * - form: Called on Escape key only
     * - info: Called on Escape key and backdrop click
     */
    onOpenChange: (isOpen: boolean) => unknown;
    /**
     * The width of the dialog.
     * Numbers are treated as pixels, strings are used as-is.
     * Ignored when variant is 'fullscreen'.
     * @default 400
     */
    width?: number | string;
    /**
     * The maximum height of the dialog.
     * The actual height will be the height of its content.
     * Numbers are treated as pixels, strings are used as-is.
     * Ignored when variant is 'fullscreen'.
     * @default '75vh'
     */
    maxHeight?: number | string;
    /**
     * Static position for the dialog on screen.
     * By default, the dialog will be centered.
     * Ignored when variant is 'fullscreen'.
     */
    position?: Readonly<DialogPosition>;
    /**
     * The variant of the dialog.
     * - standard: Normal dialog with configurable dimensions
     * - fullscreen: Takes up the entire viewport
     * @default 'standard'
     */
    variant?: DialogVariant;
    /**
     * Configures how the dialog enables dismissals.
     * - required: Disables all exit methods (for mandatory flows)
     * - form: Prevents backdrop click, allows Escape key
     * - info: Allows all exit methods (Escape and backdrop click)
     * @default 'info'
     */
    purpose?: DialogPurpose;
    /**
     * Internal padding of the dialog using the spacing scale.
     * Accepts numeric spacing steps: 0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10.
     * When omitted, uses the theme default for dialogs.
     */
    padding?: SpacingStep;
    /**
     * The content of the dialog.
     * Typically an Layout with header, content, and footer slots.
     */
    children: ReactNode;
}
/**
 * A dialog component using the native <dialog> element.
 *
 * Designed to be used with Layout as its child for structured content.
 * Uses the browser's built-in modal behavior for optimal accessibility.
 * When a DialogHeader is rendered inside, its title automatically names the
 * dialog via aria-labelledby; pass `aria-label` or `aria-labelledby` to
 * override.
 *
 * @example
 * ```
 * const [isOpen, setIsOpen] = useState(false);
 * <Dialog isOpen={isOpen} onOpenChange={open => setIsOpen(open)}>
 *   <Layout
 *     header={<DialogHeader title="Title" onOpenChange={open => setIsOpen(open)} />}
 *     content={<LayoutContent>Content</LayoutContent>}
 *     footer={<LayoutFooter hasDivider>Actions</LayoutFooter>}
 *   />
 * </Dialog>
 * ```
 */
export declare function Dialog({ isOpen, isInline, onOpenChange, width, maxHeight, position, variant, purpose, padding, children, xstyle, className, style, ref, ...props }: DialogProps): import("react").JSX.Element | null;
export declare namespace Dialog {
    var displayName: string;
}
export {};
//# sourceMappingURL=Dialog.d.ts.map