/**
 * useThreadForm — state management hook for ThreadForm.
 * Manages data mutations, auto-save, and action dispatching.
 */
import type { ThreadFormData, ThreadTask, ThreadMessage, ContentItem } from '../types.js';
export interface UseThreadFormOptions {
    initial_data: ThreadFormData;
    on_form_change?: (data: ThreadFormData) => void;
    auto_save_ms?: number;
}
export interface UseThreadFormReturn {
    data: ThreadFormData;
    /** Add a message to a task's thread */
    add_message: (task_id: string, msg: ThreadMessage) => void;
    /** Update a task (status change, completion, etc.) */
    update_task: (updated: ThreadTask) => void;
    /** Add a new task to the form */
    add_task: (task: ThreadTask) => void;
    /** Update collected data selections */
    update_selections: (selections: Record<string, boolean>) => void;
    /** Update form status */
    update_status: (status: ThreadFormData['status']) => void;
    /** Edit a message's text and/or files */
    edit_message: (task_id: string, message_id: string, updated: {
        content_text?: string;
        content_items?: ContentItem[];
    }) => void;
    /** Delete a message from a task's thread */
    delete_message: (task_id: string, message_id: string) => void;
    /** Replace entire form data */
    replace_data: (data: ThreadFormData) => void;
    /** Update fields on a specific ContentItem across all messages (safe functional update) */
    update_content_item: (content_id: string, updates: Partial<ContentItem>) => void;
}
export declare function use_thread_form({ initial_data, on_form_change, auto_save_ms }: UseThreadFormOptions): UseThreadFormReturn;
//# sourceMappingURL=use_thread_form.d.ts.map