"use strict";
/**
 * UI State Type Definitions
 *
 * Defines the state structure for worktree UI management using useReducer
 * Based on Issue #13 UX Improvement design specification (Section 16)
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.initialErrorState = exports.initialLayoutState = exports.initialPromptState = exports.initialTerminalState = void 0;
exports.createInitialUIState = createInitialUIState;
/**
 * Initial terminal state
 */
exports.initialTerminalState = {
    output: '',
    realtimeSnippet: '',
    isActive: false,
    isThinking: false,
    autoScroll: true,
    lastUpdated: null,
};
/**
 * Initial prompt state
 */
exports.initialPromptState = {
    data: null,
    messageId: null,
    visible: false,
    answering: false,
};
/**
 * Initial layout state
 */
exports.initialLayoutState = {
    mode: 'split',
    mobileActivePane: 'terminal',
    leftPaneTab: 'history',
    splitRatio: 0.5,
};
/**
 * Initial error state
 */
exports.initialErrorState = {
    type: null,
    message: null,
    retryable: false,
    retryCount: 0,
};
/**
 * Initial UI state (factory function for creating fresh state)
 */
function createInitialUIState() {
    return {
        phase: 'idle',
        terminal: { ...exports.initialTerminalState },
        prompt: { ...exports.initialPromptState },
        layout: { ...exports.initialLayoutState },
        error: { ...exports.initialErrorState },
        messages: [],
        wsConnected: false,
    };
}
