import { type ComponentProps, type ReactNode } from 'react';
import type { GDSComponentProps } from '@graphprotocol/gds-css';
import type { RenderProp } from './base/Render.tsx';
import { ModalMeta } from './Modal.meta.ts';
import { type StepperProps } from './Stepper.tsx';
export interface ModalProps<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<ComponentProps<'div'>, 'children'>, GDSComponentProps<typeof ModalMeta> {
    /**
     * Element that opens the modal when clicked, or a function that returns such an element (where
     * you can fully customize the interaction that opens the modal, e.g. `trigger={(renderProps, {
     * openModal }) => <button {...renderProps} onMouseEnter={openModal} />}`).
     */
    trigger?: RenderProp<{
        open: boolean;
        setOpen: (open: boolean) => void;
        openModal: () => void;
        currentStep: Step;
        setCurrentStep: (step: Step) => void;
    }> | undefined;
    open?: boolean | undefined;
    /** Defaults to `false` if `trigger` is provided, or `true` otherwise. */
    defaultOpen?: boolean | undefined;
    onOpenChange?: ((open: boolean) => void) | undefined;
    /**
     * Whether the user should be able to close the modal on their own, either by clicking outside of
     * it, by pressing Escape, or by clicking the close button that gets rendered in `Modal.Header`
     * when `dismissible` is `true` (though it can be replaced or removed altogether with the
     * `buttonAfter` prop). Defaults to `true` if either `trigger` or `onOpenChange` is provided, or
     * `false` otherwise.
     */
    dismissible?: boolean | undefined;
    /**
     * One of `dialog` or `alertdialog`. Defaults to `dialog` if `dismissible` is `true`, or
     * `alertdialog` if it's `false`.
     */
    role?: 'dialog' | 'alertdialog' | undefined;
    steps?: Steps | undefined;
    currentStep?: Step | undefined;
    onCurrentStepChange?: ((step: Step) => void) | undefined;
    children?: ReactNode | ((state: {
        open: boolean;
        setOpen: (open: boolean) => void;
        closeModal: () => void;
        currentStep: Step;
        setCurrentStep: (step: Step) => void;
    }) => ReactNode) | undefined;
}
export declare const ModalRoot: {
    <Steps extends number | readonly string[], Step extends Steps extends readonly string[] ? Steps[number] : number>({ ref: passedRef, variant, size, trigger, open: controlledOpen, defaultOpen, onOpenChange, dismissible: passedDismissible, role, steps: passedSteps, currentStep: controlledCurrentStep, onCurrentStepChange, className, style, children, ...props }: ModalProps<Steps, Step>): import("react/jsx-runtime").JSX.Element;
    displayName: string;
};
export interface ModalHeaderProps extends Omit<ComponentProps<'div'>, 'title' | 'children'> {
    title: ReactNode;
    /** Defaults to a back button if there is a previous step, or `null` otherwise. */
    buttonBefore?: ReactNode | undefined;
    /** Defaults to a close button if the modal is `dismissible`, or `null` otherwise. */
    buttonAfter?: ReactNode | undefined;
    /**
     * Props to pass to the `Stepper` component, or `null` to render a `Divider` instead. Defaults to
     * match the `steps` and `currentStep` props of the parent `Modal` (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<StepperProps['count']>;
        currentIndex: StepperProps['currentIndex'];
    } | null | undefined;
}
export declare const ModalHeader: {
    ({ title, buttonBefore: passedButtonBefore, buttonAfter: passedButtonAfter, stepper: passedStepper, className, ...props }: ModalHeaderProps): import("react/jsx-runtime").JSX.Element;
    displayName: string;
};
export interface ModalBodyProps extends ComponentProps<'div'> {
}
export declare const ModalBody: {
    ({ className, children, ...props }: ModalBodyProps): import("react/jsx-runtime").JSX.Element;
    displayName: string;
};
export interface ModalFooterProps extends ComponentProps<'div'> {
    primaryButton?: ReactNode | undefined;
    secondaryButton?: ReactNode | undefined;
}
export declare const ModalFooter: {
    ({ primaryButton, secondaryButton, className, children, ...props }: ModalFooterProps): import("react/jsx-runtime").JSX.Element;
    displayName: string;
};
export interface ModalStepProps {
    children: ReactNode;
}
export declare const ModalStep: {
    ({ children }: ModalStepProps): import("react/jsx-runtime").JSX.Element | null;
    displayName: string;
};
//# sourceMappingURL=Modal.parts.d.ts.map