import BaseFoundation, { DefaultAdapter } from '../base/foundation'; export type OKType = 'primary' | 'secondary' | 'tertiary' | 'warning' | 'danger'; export type Size = 'small' | 'medium' | 'large' | 'full-width'; export interface ModalAdapter extends DefaultAdapter { disabledBodyScroll: () => void; enabledBodyScroll: () => void; notifyCancel: (e: any) => void | Promise; notifyOk: (e: any) => void | Promise; notifyClose: () => void; toggleDisplayNone: (displayNone: boolean, callback?: (displayNone: boolean) => void) => void; notifyFullScreen: (isFullScreen: boolean) => void; getProps: () => ModalProps; } export interface ModalProps { afterClose?: () => void; bodyStyle?: Record; cancelButtonProps?: any; cancelText?: string; centered?: boolean; className?: string; modalContentClass?: string; closable?: boolean; confirmLoading?: boolean; cancelLoading?: boolean; content?: any; footer?: any; hasCancel?: boolean; header?: any; height?: string | number; mask?: boolean; maskClosable?: boolean; maskStyle?: Record; maskFixed?: boolean; motion?: boolean; okButtonProps?: any; okText?: string; okType?: OKType; onCancel?: (e: any) => void | Promise; onOk?: (e: any) => void | Promise; style?: Record; title?: any; visible?: boolean; width?: string | number; zIndex?: number; icon?: any; getPopupContainer?: () => HTMLElement; closeIcon?: any; closeOnEsc?: boolean; size?: Size; lazyRender?: boolean; keepDOM?: boolean; direction?: any; fullScreen?: boolean; preventScroll?: boolean; footerFill?: boolean; } export interface ModalState { displayNone: boolean; isFullScreen: boolean; onOKReturnPromiseStatus?: "pending" | "fulfilled" | "rejected"; onCancelReturnPromiseStatus?: "pending" | "fulfilled" | "rejected"; } export default class ModalFoundation extends BaseFoundation { constructor(adapter: ModalAdapter); destroy(): void; handleCancel(e: any): void; handleOk(e: any): void; beforeShow(): void; afterHide(): void; enabledBodyScroll(): void; toggleDisplayNone: (displayNone: boolean, callback?: (displayNone: boolean) => void) => void; }