/**
 * useIdeState
 *
 * Owns all IDE tab state: file tree, open files, active tab, live
 * refresh from the filesystem watcher SSE stream, and save.
 *
 * Designed to be the single place where network, SSE, and reducer
 * logic live so the view components stay tiny and presentational.
 */
import { type FileTreeEntry, type OpenFile } from './types.js';
export interface OpenFileOptions {
    /**
     * `'preview'` (default): opens as a VSCode-style italic preview tab.
     * If a preview tab already exists, its slot is reused (the previous
     * preview is swapped out).
     *
     * `'persistent'`: opens as a normal non-preview tab that will never
     * be reused. Use this for double-clicks.
     */
    mode?: 'preview' | 'persistent';
}
export interface UseIdeStateResult {
    tree: FileTreeEntry | null;
    treeError: string | null;
    treeLoading: boolean;
    openFiles: OpenFile[];
    activePath: string | null;
    openFile: (path: string, options?: OpenFileOptions) => void;
    closeFile: (path: string) => void;
    selectFile: (path: string) => void;
    /** Promote an open file from preview → persistent (e.g. on double-click). */
    promoteFile: (path: string) => void;
    updateBuffer: (path: string, content: string) => void;
    /** Toggle between `source` (Monaco) and `rendered` (markdown preview). */
    toggleViewMode: (path: string) => void;
    saveActive: () => Promise<void>;
}
export declare function useIdeState(applicationId: string): UseIdeStateResult;
//# sourceMappingURL=use-ide-state.d.ts.map