import { StructureSchema } from '@ephox/boulder'; import { type Result } from '@ephox/katamari'; import * as FooterButton from './DialogFooterButton'; import * as Panel from './Panel'; import * as TabPanel from './TabPanel'; export type DialogDataItem = any; export type DialogData = Record; export interface DialogInstanceApi { getData: () => T; setData: (data: Partial) => void; setEnabled: (name: string, state: boolean) => void; focus: (name: string) => void; showTab: (name: string) => void; redial: (nu: DialogSpec) => void; block: (msg: string) => void; unblock: () => void; toggleFullscreen: () => void; close: () => void; } export interface DialogActionDetails { name: string; value?: any; } export interface DialogChangeDetails { name: keyof T; } export interface DialogTabChangeDetails { newTabName: string; oldTabName: string; } export type DialogActionHandler = (api: DialogInstanceApi, details: DialogActionDetails) => void; export type DialogChangeHandler = (api: DialogInstanceApi, details: DialogChangeDetails) => void; export type DialogSubmitHandler = (api: DialogInstanceApi) => void; export type DialogCloseHandler = () => void; export type DialogCancelHandler = (api: DialogInstanceApi) => void; export type DialogTabChangeHandler = (api: DialogInstanceApi, details: DialogTabChangeDetails) => void; export type DialogSize = 'normal' | 'medium' | 'large'; export interface DialogSpec { title: string; size?: DialogSize; body: TabPanel.TabPanelSpec | Panel.PanelSpec; buttons?: FooterButton.DialogFooterButtonSpec[]; initialData?: Partial; onAction?: DialogActionHandler; onChange?: DialogChangeHandler; onSubmit?: DialogSubmitHandler; onClose?: DialogCloseHandler; onCancel?: DialogCancelHandler; onTabChange?: DialogTabChangeHandler; } export interface Dialog { title: string; size: DialogSize; body: TabPanel.TabPanel | Panel.Panel; buttons: FooterButton.DialogFooterButton[]; initialData: T; onAction: DialogActionHandler; onChange: DialogChangeHandler; onSubmit: DialogSubmitHandler; onClose: DialogCloseHandler; onCancel: DialogCancelHandler; onTabChange: DialogTabChangeHandler; } export declare const dialogButtonFields: import("@ephox/boulder").FieldProcessor[]; export declare const dialogButtonSchema: import("@ephox/boulder").StructureProcessor; export declare const dialogSchema: import("@ephox/boulder").StructureProcessor; export declare const createDialog: (spec: DialogSpec) => Result, StructureSchema.SchemaError>; //# sourceMappingURL=Dialog.d.ts.map