import { IThemePalette } from '../../styles/utils'; import { PropsWithChildren, ReactNode } from 'react'; export type IDialogProvider = PropsWithChildren & { zIndex: number; }; export type IDialogContext> = { add: (dialog: IDialogContent) => void; remove: (id: IDialogContent['id']) => void; update: (dialog: IDialogContent) => void; dialogHistory: IDialogContent[]; }; export type IDialogItem = { add: () => void; remove: () => void; id: string | null; isOpen: boolean; }; export type IDialogContent> = { props?: IUseDialog; id?: string; index?: number; onRemove?: () => void; }; export type IUseDialogDependencies = (keyof IDialogContext)[]; export type IUseDialog> = { content?: IDialogContentNode; propsDialog?: IDialogDialogProps; propsCustom?: T; onRemove?: () => void; }; type IDialogDialogProps = { maxWidth?: string; maxHeight?: string; padding?: string; borderRadius?: string; background?: IThemePalette; isRemoveOnOutsideClick?: boolean; }; export interface IDialogContentNodeProps> { remove?: () => void; isAnimating?: boolean; id: string; propsCustom?: T; } type IDialogContentNode = (props: IDialogContentNodeProps) => ReactNode; export type IDialogElement = IDialogContent; export type IDialogLayoutStyle = Pick; export type IDialogElementStyle> = Pick, 'propsDialog'>; export {};