import { type ReactNode } from 'react';
import type { AiChatMessage, AiAgentContext, AiProposedAction, AiExecutedAction } from '../api/client';
export interface AiAssistantState {
    isOpen: boolean;
    isMinimized: boolean;
    isSending: boolean;
    conversation: AiChatMessage[];
    pendingActions: AiProposedAction[];
    lastExecutedActions: AiExecutedAction[];
    context: AiAgentContext;
    open: () => void;
    close: () => void;
    toggle: () => void;
    minimize: () => void;
    restore: () => void;
    sendMessage: (message: string) => Promise<void>;
    confirmAction: (action: AiProposedAction) => Promise<void>;
    rejectAction: (action: AiProposedAction) => Promise<void>;
    setContext: (ctx: Partial<AiAgentContext>) => void;
    clearConversation: () => void;
    /** Trigger a message from another component (e.g. suggest button, sanity check) */
    triggerMessage: (message: string, ctx?: Partial<AiAgentContext>) => Promise<void>;
    /** Subscribe to auto-executed actions (navigate, set_field when approved). Returns unsubscribe fn. */
    subscribeAutoAction: (handler: (action: AiProposedAction) => void) => () => void;
}
export declare function useAiAssistant(): AiAssistantState;
/** Safe version: returns null if outside provider (for optional integration). */
export declare function useAiAssistantOptional(): AiAssistantState | null;
export declare function AiAssistantProvider({ children }: {
    children: ReactNode;
}): import("react/jsx-runtime").JSX.Element;
