import { type Cell, type Selection } from '@fortune-sheet/core'; import type { WorkSpreadsheetContent } from '../work-types'; import { type SpreadsheetRichTextToggleAttribute } from './spreadsheet-rich-text-selection-format'; interface SpreadsheetRichTextSelectionSnapshot { column: number; consumed: boolean; editor: HTMLElement; end: number; root: HTMLElement; row: number; sheetId: string; sourceCell: Cell; start: number; } export interface SpreadsheetRichTextSelectionCapture { content: WorkSpreadsheetContent; root: HTMLElement | null; selection: Selection | null | undefined; sheetId: string; } export declare class SpreadsheetRichTextSelectionController { private restoreTimer; private snapshot; capture(options: SpreadsheetRichTextSelectionCapture): boolean; clear(): void; canApply(content: WorkSpreadsheetContent, attribute: keyof Cell, value: unknown): boolean; apply(content: WorkSpreadsheetContent, onChange: (content: WorkSpreadsheetContent) => void, attribute: keyof Cell, value: unknown): boolean; canToggle(content: WorkSpreadsheetContent, attribute: SpreadsheetRichTextToggleAttribute): boolean; toggle(content: WorkSpreadsheetContent, onChange: (content: WorkSpreadsheetContent) => void, attribute: SpreadsheetRichTextToggleAttribute): boolean; private applyRequest; restore(): boolean; private cancelScheduledRestore; private request; private toggleRequest; } export declare function isSpreadsheetRichTextFormatPointerTarget(target: EventTarget | null): boolean; export declare function captureSpreadsheetRichTextSelection({ content, root, selection, sheetId, }: SpreadsheetRichTextSelectionCapture): SpreadsheetRichTextSelectionSnapshot | null; export {};