import { AIAction, TranslateLanguage } from '@wanghe1995/docx-editor-ai';

/** AI 面板活动标签 */
export type AITab = 'writing' | 'layout' | 'analysis' | 'media';
/** AI 操作状态 */
export interface IAIOperationState {
    /** 是否正在处理 */
    loading: boolean;
    /** 当前操作类型 */
    action: AIAction | null;
    /** 输入文本 */
    inputText: string;
    /** AI 返回的结果 */
    result: string;
    /** 流式响应的实时内容 */
    streamContent: string;
    /** 错误信息 */
    error: string | null;
    /** 自定义 prompt */
    customPrompt: string;
    /** 翻译目标语言 */
    targetLanguage: TranslateLanguage;
}
/** AI 状态接口 */
export interface IAIState {
    /** 侧边栏是否可见 */
    visible: boolean;
    /** 当前活动标签 */
    activeTab: AITab;
    /** 操作状态 */
    operation: IAIOperationState;
    /** 结果抽屉是否打开 */
    drawerVisible: boolean;
    /** 历史记录 */
    history: Array<{
        action: AIAction;
        input: string;
        output: string;
        timestamp: number;
    }>;
}
declare function createAIStateStore(): {
    state: {
        readonly visible: boolean;
        readonly activeTab: AITab;
        readonly operation: {
            readonly loading: boolean;
            readonly action: AIAction | null;
            readonly inputText: string;
            readonly result: string;
            readonly streamContent: string;
            readonly error: string | null;
            readonly customPrompt: string;
            readonly targetLanguage: TranslateLanguage;
        };
        readonly drawerVisible: boolean;
        readonly history: readonly {
            readonly action: AIAction;
            readonly input: string;
            readonly output: string;
            readonly timestamp: number;
        }[];
    };
    setVisible: (visible: boolean) => void;
    setActiveTab: (tab: AITab) => void;
    startOperation: (action: AIAction, inputText: string) => void;
    appendStreamContent: (chunk: string) => void;
    completeOperation: (result: string) => void;
    failOperation: (error: string) => void;
    resetOperation: () => void;
    setDrawerVisible: (visible: boolean) => void;
    clearHistory: () => void;
    reset: () => void;
};
export declare const aiStateStore: {
    state: {
        readonly visible: boolean;
        readonly activeTab: AITab;
        readonly operation: {
            readonly loading: boolean;
            readonly action: AIAction | null;
            readonly inputText: string;
            readonly result: string;
            readonly streamContent: string;
            readonly error: string | null;
            readonly customPrompt: string;
            readonly targetLanguage: TranslateLanguage;
        };
        readonly drawerVisible: boolean;
        readonly history: readonly {
            readonly action: AIAction;
            readonly input: string;
            readonly output: string;
            readonly timestamp: number;
        }[];
    };
    setVisible: (visible: boolean) => void;
    setActiveTab: (tab: AITab) => void;
    startOperation: (action: AIAction, inputText: string) => void;
    appendStreamContent: (chunk: string) => void;
    completeOperation: (result: string) => void;
    failOperation: (error: string) => void;
    resetOperation: () => void;
    setDrawerVisible: (visible: boolean) => void;
    clearHistory: () => void;
    reset: () => void;
};
export type AIStateStore = ReturnType<typeof createAIStateStore>;
export {};
