import { DialogProps } from '@headlessui/react';
import { ComponentPropsWithoutRef, ReactNode } from 'react';
import { ExperimentalStepperProps } from './Stepper';
import { ComponentCSSPropType } from './tailwind';
export interface ExperimentalModalProps<Steps extends number | readonly string[] = readonly string[], Step extends Steps extends readonly string[] ? Steps[number] : number = Steps extends readonly string[] ? Steps[number] : number> extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
    /** Defaults to `dialog` on desktop and `drawer` on mobile. */
    variant?: ComponentCSSPropType<'modal', 'variant', 'dialog'>;
    /** @default "medium" */
    size?: ComponentCSSPropType<'modal', 'size', 'medium'>;
    open?: boolean;
    onClose?: (open: false) => void;
    /**
     * Function that should return an element that allows the user to open the modal, providing an alternative to the controlled API
     * without requiring state in the parent component. The trigger element is rendered alongside the modal, which is now closed
     * by default (assuming `open` is not set). To open it, call the `openModal` function passed as a render prop, like so:
     * `trigger={({ openModal }) => <Button onClick={openModal}>Open modal</Button>}`
     */
    trigger?: (renderProps: {
        openModal: () => void;
        currentStep: Step;
        setCurrentStep: (step: Step) => void;
    }) => ReactNode;
    /**
     * Whether the modal should stay open even when the user clicks outside of it or presses the Escape key.
     * When `true`, `ExperimentalModal.Header`'s `buttonAfter` defaults to `null` instead of a close button.
     * Defaults to `true` if neither `onClose` nor `trigger` are provided, and `false` otherwise.
     */
    persistent?: boolean;
    /**
     * One of `dialog` or `alertdialog`. Defaults to `alertdialog` if `persistent` is `true`, and `dialog` otherwise.
     */
    role?: DialogProps['role'];
    steps?: Steps;
    currentStep?: Step;
    onCurrentStepChange?: (step: Step) => void;
    children?: ReactNode | ((renderProps: {
        closeModal: () => void;
        currentStep: Step;
        setCurrentStep: (step: Step) => void;
    }) => ReactNode);
}
export declare const ExperimentalModalRoot: <Steps extends number | readonly string[], Step extends Steps extends readonly string[] ? Steps[number] : number>(props: ExperimentalModalProps<Steps, Step> & import('react').RefAttributes<HTMLElement>) => ReactNode | null;
export interface ExperimentalModalHeaderProps extends Omit<ComponentPropsWithoutRef<'div'>, 'title' | 'children'> {
    title: ReactNode;
    buttonBefore?: ReactNode;
    buttonAfter?: ReactNode;
    /**
     * Props to pass to the `ExperimentalStepper` component, or `null` to render a `ExperimentalDivider` instead.
     * Defaults to match the `steps` and `currentStep` props of the parent `ExperimentalModal` (except if there is only one step
     * or if the `currentStep` is not among the `steps`, in which case a divider is rendered instead of the stepper).
     */
    stepper?: {
        count: NonNullable<ExperimentalStepperProps['count']>;
        currentIndex: ExperimentalStepperProps['currentIndex'];
    } | null;
}
export declare const ExperimentalModalHeader: import('react').ForwardRefExoticComponent<ExperimentalModalHeaderProps & import('react').RefAttributes<HTMLDivElement>>;
export interface ExperimentalModalBodyProps extends ComponentPropsWithoutRef<'div'> {
}
export declare const ExperimentalModalBody: import('react').ForwardRefExoticComponent<ExperimentalModalBodyProps & import('react').RefAttributes<HTMLDivElement>>;
export interface ExperimentalModalFooterProps extends ComponentPropsWithoutRef<'div'> {
    primaryButton?: ReactNode;
    secondaryButton?: ReactNode;
}
export declare const ExperimentalModalFooter: import('react').ForwardRefExoticComponent<ExperimentalModalFooterProps & import('react').RefAttributes<HTMLDivElement>>;
export interface ExperimentalModalStepProps {
    children: ReactNode;
}
export declare const ExperimentalModalStep: {
    ({ children }: ExperimentalModalStepProps): import("react/jsx-runtime").JSX.Element | null;
    displayName: string;
};
//# sourceMappingURL=Modal.parts.d.ts.map