import { Level } from '../../types'; import { ButtonProps } from '../Button/Button'; import * as React from 'react'; export interface ModalProps { children?: React.ReactNode; /** * Whether the modal can be dismissed. * If set to false, the modal will not close when pressing the Escape key or outside of the modal. * @default true */ canBeDismissed?: boolean; /** * If set to true, the modal will have a fixed max-width of 600px. * @default 'hug' */ maxWidth?: true | 'hug' | 'full'; /** * Whether the modal is currently open. * This prop controls the visibility of the modal. * If false, the modal will not be rendered. * @default false */ isOpen: boolean; /** * Sets the attention level and displays icon before the title. */ level?: Level; /** * Callback triggered when the close button, Escape key, or outside of the modal is pressed. * If `canBeDismissed` is false, this function will not be called. */ onClose: () => void; /** * Callback triggered when the modal finished closing. * This is called after the closing animation ends. * Useful for cleanup or state updates. */ onClosed?: () => void; /** * Callback triggered when the modal starts opening. */ onOpen?: () => void; /** * Callback triggered when the modal finished opening. * This is called after the opening animation ends. * Useful for analytics or state updates. */ onOpened?: () => void; } export interface ModalHeaderProps { children?: React.ReactNode; subheader?: React.ReactNode; } export interface ModalContentProps { children: React.ReactNode; } export interface ModalFooterProps { children: (state: { actionButtonProps: ButtonProps; primaryButtonProps: ButtonProps; level: Level | undefined; secondaryButtonProps: ButtonProps; }) => React.ReactNode; } export declare const Modal: React.ForwardRefExoticComponent> & { Header: React.FC; Content: React.FC; Footer: React.FC; };