/**
 * Vim Mode State Machine
 *
 * Manages vim mode transitions between normal, insert, visual, and command modes.
 *
 * @since v1.58.0
 */
import type { VimActionResult, VimConfig, VimKeyEvent, VimMode, VimState, VimTransition, VisualType } from './vim-types.js';
/**
 * Create initial vim state
 */
export declare function createInitialVimState(config?: Partial<VimConfig>): VimState;
/**
 * Check if a transition is valid
 */
export declare function isValidTransition(from: VimMode, to: VimMode, trigger: string): boolean;
/**
 * Get transition info if valid
 */
export declare function getTransition(from: VimMode, trigger: string): VimMode | null;
/**
 * Vim State Machine
 */
export declare class VimStateMachine {
    private state;
    private config;
    private transitionHistory;
    private onModeChange?;
    constructor(config?: Partial<VimConfig>, onModeChange?: (mode: VimMode, prevMode: VimMode) => void);
    /**
     * Get current state
     */
    getState(): VimState;
    /**
     * Get current mode
     */
    getMode(): VimMode;
    /**
     * Check if vim mode is enabled
     */
    isEnabled(): boolean;
    /**
     * Enable vim mode
     */
    enable(): void;
    /**
     * Disable vim mode
     */
    disable(): void;
    /**
     * Toggle vim mode
     */
    toggle(): boolean;
    /**
     * Process a key event
     */
    processKey(event: VimKeyEvent): VimActionResult;
    /**
     * Process key in normal mode
     */
    private processNormalMode;
    /**
     * Process key in insert mode
     */
    private processInsertMode;
    /**
     * Process key in visual mode
     */
    private processVisualMode;
    /**
     * Process key in command mode
     */
    private processCommandMode;
    /**
     * Transition to a new mode
     */
    private transitionTo;
    /**
     * Enter visual mode at a specific index
     */
    enterVisualMode(startIndex: number, type?: VisualType): void;
    /**
     * Exit visual mode
     */
    exitVisualMode(): {
        start: number;
        end: number;
    } | null;
    /**
     * Get visual selection range
     */
    getVisualSelection(currentIndex: number): {
        start: number;
        end: number;
        type: VisualType;
    } | null;
    /**
     * Get and reset pending count
     */
    getPendingCount(): number;
    /**
     * Reset pending count without consuming
     */
    resetPendingCount(): void;
    /**
     * Get command input
     */
    getCommandInput(): string;
    /**
     * Set command input
     */
    setCommandInput(input: string): void;
    /**
     * Get transition history
     */
    getTransitionHistory(): VimTransition[];
    /**
     * Reset state
     */
    reset(): void;
    /**
     * Force mode change (for external triggers)
     */
    forceMode(mode: VimMode): void;
}
/**
 * Create a vim state machine instance
 */
export declare function createVimStateMachine(config?: Partial<VimConfig>, onModeChange?: (mode: VimMode, prevMode: VimMode) => void): VimStateMachine;
//# sourceMappingURL=vim-state.d.ts.map