import type { ComponentType, PropsWithChildren, ReactNode } from 'react'; import type { Dictionary, Fn } from '../@aileron/declare/index.js'; import type { ModalBackground } from './background.js'; import type { ModalFrameProps } from './modal.js'; export interface BaseModal { group?: string; title?: ReactNode; subtitle?: ReactNode; background?: ModalBackground; dimmed?: boolean; duration?: number; manualDestroy?: boolean; closeOnBackdropClick?: boolean; handleResolve?: Fn<[result: T | null]>; ForegroundComponent?: ForegroundComponent; BackgroundComponent?: BackgroundComponent; } export type ForegroundComponent = ComponentType>; export type BackgroundComponent = ComponentType; export interface ContentComponentProps { onConfirm: Fn; onCancel: Fn; context: Context; } export type WrapperComponentProps = PropsWithChildren<{ context: Context; }>; export interface FooterOptions { confirm?: ReactNode; hideConfirm?: boolean; cancel?: ReactNode; hideCancel?: boolean; } export type FooterComponentProps = { confirmLabel?: ReactNode; hideConfirm?: boolean; cancelLabel?: ReactNode; hideCancel?: boolean; disabled?: boolean; onConfirm: Fn; onCancel?: Fn; context: Context; };