import { Bind } from '../bind/Bind'; /** * This is a representation of a Confirm dialog. */ export interface ConfirmBase { /** * is the dialog currently shown? */ open: boolean; /** * Uses Bind to setup enablement and label etc */ cancelButton: Bind; /** * The message content */ content: string; /** * If not falsely shown as Header of the dialog */ header?: string; /** * Called by the UI when the dialog is cancelled */ onCancel(): void; /** * Show the dialog with a given value. The implementation uses the value on confirm * @param {T} value */ show(value?: T): void; } export interface Confirm extends ConfirmBase { /** * Uses Bind to setup enablement and label etc */ confirmButton: Bind; /** * Called by the UI when the dialog is confirmed */ onConfirm(): void; }