/**
 * Shared CLI State Hook
 *
 * Contains all common state and logic shared between rendering modes.
 * Both AlternateBufferCLI and StaticCLI use this hook.
 */
import React from 'react';
import { type QueuedMessage } from '@dexto/core';
import type { Message, StartupInfo, UIState, InputState, SessionState, TodoItem } from '../state/types.js';
import type { ApprovalRequest } from '../components/ApprovalPrompt.js';
import { InputService, MessageService } from '../services/index.js';
import type { OverlayContainerHandle } from '../containers/OverlayContainer.js';
import { type TextBuffer } from '../components/shared/text-buffer.js';
import type { TuiAgentBackend } from '../agent-backend.js';
export type { UIState, InputState, SessionState, TodoItem } from '../state/types.js';
export interface UseCLIStateProps {
    agent: TuiAgentBackend;
    initialSessionId: string | null;
    startupInfo: StartupInfo;
    initialBypassPermissions?: boolean;
    /** Optional keyboard scroll handler for alternate buffer mode */
    onKeyboardScroll?: (direction: 'up' | 'down') => void;
}
export interface CLIStateReturn {
    messages: Message[];
    setMessages: React.Dispatch<React.SetStateAction<Message[]>>;
    pendingMessages: Message[];
    setPendingMessages: React.Dispatch<React.SetStateAction<Message[]>>;
    dequeuedBuffer: Message[];
    setDequeuedBuffer: React.Dispatch<React.SetStateAction<Message[]>>;
    steerMessages: QueuedMessage[];
    setSteerMessages: React.Dispatch<React.SetStateAction<QueuedMessage[]>>;
    queuedMessages: QueuedMessage[];
    setQueuedMessages: React.Dispatch<React.SetStateAction<QueuedMessage[]>>;
    todos: TodoItem[];
    setTodos: React.Dispatch<React.SetStateAction<TodoItem[]>>;
    ui: UIState;
    setUi: React.Dispatch<React.SetStateAction<UIState>>;
    input: InputState;
    setInput: React.Dispatch<React.SetStateAction<InputState>>;
    session: SessionState;
    setSession: React.Dispatch<React.SetStateAction<SessionState>>;
    approval: ApprovalRequest | null;
    setApproval: React.Dispatch<React.SetStateAction<ApprovalRequest | null>>;
    approvalQueue: ApprovalRequest[];
    setApprovalQueue: React.Dispatch<React.SetStateAction<ApprovalRequest[]>>;
    buffer: TextBuffer;
    inputService: InputService;
    messageService: MessageService;
    overlayContainerRef: React.RefObject<OverlayContainerHandle | null>;
    visibleMessages: Message[];
    agent: TuiAgentBackend;
    startupInfo: StartupInfo;
}
export declare function useCLIState({ agent, initialSessionId, startupInfo, initialBypassPermissions, onKeyboardScroll: _onKeyboardScroll, }: UseCLIStateProps): CLIStateReturn;
//# sourceMappingURL=useCLIState.d.ts.map