import { DialogOptions, DialogStore, DialogStoreProps } from '@ariakit/react'; import { ComponentProps, HTMLAttributes, PropsWithChildren } from 'react'; import { MergeProps } from '../../utils/forwardRefWithAs'; import { IconName } from '../Icon/types'; export type TriggerProps = PropsWithChildren<{ store: DialogStore; }>; export type UseModal = DialogStore; export type UseModalProps = DialogStoreProps & { /** * Call a function before closing the modal * @deprecated use onClose on instead */ onClose?: () => void; }; export type Size = 'auto' | 'sm' | 'md' | 'lg'; export interface ModalOptions { ariaLabel: string; children: React.ReactElement; fullscreen?: boolean; size?: Size; } type BaseDialogOptions = Omit, 'as'>; export type ModalProps = MergeProps>; export type HeaderProps = HTMLAttributes; export interface BodyOptions { iconName?: IconName; subtitle?: JSX.Element | string; title?: JSX.Element | string; } export type BodyProps = MergeProps>>; export type ContentProps = PropsWithChildren> & { withClosingButton?: boolean; }; export type BackdropProps = Pick; export type FooterProps = HTMLAttributes & { variant?: 'full' | 'right'; }; export {};