import { jsx as _jsx } from "react/jsx-runtime";
import { useUIState } from '../contexts/UIStateContext.js';
import { useUIActions } from '../contexts/UIActionsContext.js';
import { InputPrompt } from './InputPrompt.js';
/**
 * The Composer component handles user input in the CLI.
 * It wraps the InputPrompt component and connects it to the UIState and UIActions contexts.
 */
export const Composer = ({ config, settings: _settings, onSuggestionsVisibilityChange, }) => {
    // settings is passed for future use but currently not used
    const uiState = useUIState();
    const uiActions = useUIActions();
    const { buffer, inputWidth, suggestionsWidth, slashCommands, commandContext, shellModeActive, isFocused, vimModeEnabled, showAutoAcceptIndicator, placeholder, inputHistory, } = uiState;
    return (_jsx(InputPrompt, { buffer: buffer, inputWidth: inputWidth, suggestionsWidth: suggestionsWidth, onSubmit: uiActions.handleUserInputSubmit, userMessages: inputHistory, onClearScreen: uiActions.handleClearScreen, config: config, slashCommands: slashCommands, commandContext: commandContext, shellModeActive: shellModeActive, setShellModeActive: uiActions.setShellModeActive, onEscapePromptChange: uiActions.handleEscapePromptChange, onSuggestionsVisibilityChange: onSuggestionsVisibilityChange, focus: isFocused, vimHandleInput: uiActions.vimHandleInput, placeholder: placeholder, approvalMode: showAutoAcceptIndicator, vimModeEnabled: vimModeEnabled }));
};
//# sourceMappingURL=Composer.js.map