import { BoundsStatic } from 'quill'; export interface RichtextFormats { italic: boolean; bold: boolean; underline: boolean; strike: boolean; link: string; list_bulleted: boolean; list_numbered: boolean; justify_left: boolean; justify_center: boolean; justify_right: boolean; } export interface ToolsState { hasSelection: boolean; hasFocus: boolean; disabledTools: ToolKeys; formats: RichtextFormats; bounds?: BoundsStatic; } type FunctionKeys = { [K in keyof T]: T[K] extends (...args: any[]) => any ? K : never; }[keyof T]; export interface RichTextFunctions { setItalic(): void; setBold(): void; setUnderline(): void; setStrike(): void; setListNumbered(): void; setListBulleted(): void; setLink(link: string): void; setJustifyLeft(): void; setJustifyCenter(): void; setJustifyRight(): void; setRemove(): void; } export type RichTextFunctionsKeys = FunctionKeys; export type ToolbarItem = { tool: Tool; selected: boolean; disabled: boolean; icon: string; toolFunctionName: RichTextFunctionsKeys; value?: string; }; export type Tool = 'bold' | 'italic' | 'underline' | 'strike' | 'list_numbered' | 'list_bulleted' | 'link' | 'justify_left' | 'justify_center' | 'justify_right' | 'clear'; export type ToolKeys = Tool[]; export type ToolLayout = 'bubble' | 'topbar'; export interface ToolboxInput { availableTools: ToolKeys; disabledTools: ToolKeys; class: string; } export {};