import type { SidebarActionTarget } from "@/lib/sidebar/sidebarActionTarget"; export interface SidebarDangerDialogOption { checked: boolean; label: string; hint: string; compact?: boolean; danger?: boolean; onChange?: (checked: boolean) => void | Promise; } export interface SidebarDangerDialogProgress { completed: number; total: number; phase?: "preparing" | "executing"; } export interface SidebarDangerDialogTextInput { value: string; label: string; placeholder?: string; inputMode?: "text" | "numeric"; onInput?: (value: string) => void | Promise; } export interface SidebarDangerDialogRequest { target: SidebarActionTarget; title: string; message: string; confirmLabel: string; sql?: string; copySql?: string | (() => string); details?: string; detailsText?: string; loading?: boolean; /** Keeps the confirm button held back until the request's own precondition is met (e.g. a typed target name). */ confirmDisabled?: boolean; closeOnConfirm?: boolean; progress?: SidebarDangerDialogProgress; option?: SidebarDangerDialogOption; options?: SidebarDangerDialogOption[]; textInput?: SidebarDangerDialogTextInput; cancelRunning?: () => void | Promise; confirm: () => void | boolean | Promise; }