/**
 * Types for the FileTextbox block-based editor component.
 * A FileTextbox value is an array of blocks, where each block is either text or a file attachment.
 */
import type { FormFileAttachment } from './file_attachment.js';
/** A single block in the file textbox */
export type FileTextboxBlock = {
    type: 'text';
    content: string;
    tags?: string[];
} | {
    type: 'file';
    attachment: FormFileAttachment;
    tags?: string[];
    replaced_by?: string;
    replaces?: string;
};
/** The value type for HazoCollabFormFileTextbox */
export type FileTextboxValue = FileTextboxBlock[];
/** Normalize a raw value to FileTextboxValue (handles string backward compat) */
export declare function normalize_file_textbox_value(value: unknown): FileTextboxValue;
/** A single panel entry: comment + associated file blocks */
export interface FileTextboxEntry {
    entry_id: string;
    comment: string;
    files: FileTextboxBlock[];
}
/**
 * Parse flat blocks into grouped entries.
 * Each text block starts a new entry; subsequent file blocks belong to it.
 * Old data with no text blocks becomes a single entry with empty comment.
 */
export declare function blocks_to_entries(blocks: FileTextboxValue): FileTextboxEntry[];
/** Flatten entries back to FileTextboxBlock[] for onChange. */
export declare function entries_to_blocks(entries: FileTextboxEntry[]): FileTextboxValue;
//# sourceMappingURL=file_textbox.d.ts.map