/**
 * @license
 * Copyright 2025 Vybestack LLC
 * SPDX-License-Identifier: Apache-2.0
 */
import React from 'react';
import { Config } from '@vybestack/llxprt-code-core';
import { Suggestion } from '../components/SuggestionsDisplay.js';
import { CommandContext, SlashCommand } from '../commands/types.js';
import { TextBuffer } from '../components/shared/text-buffer.js';
/**
 * @plan:PLAN-20251013-AUTOCOMPLETE.P05
 * @requirement:REQ-001
 * @requirement:REQ-002
 * @pseudocode ArgumentSchema.md lines 71-90
 * Integration of schema-driven completion system
 *
 * The schema system provides a more structured approach to command completion:
 * - Import: import { createCompletionHandler } from '../commands/schema/index.js';
 * - Create handler: const handler = createCompletionHandler(commandSchema);
 * - Use handler: const suggestions = await handler(commandContext, partialArg, fullLine);
 *
 * Schema completion is now available for commands that provide a schema definition.
 * The integration maintains existing UI behavior while providing enhanced completion.
 */
/**
 * @plan:PLAN-20251013-AUTOCOMPLETE.P08
 * @requirement:REQ-002
 * @requirement:REQ-003
 * @requirement:REQ-004
 * @pseudocode ArgumentSchema.md lines 71-90
 * Full integration of schema-driven completion system with hints
 * - Line 71: call createCompletionHandler with current command context
 * - Line 72: supply schema specific to active command
 * - Line 73: capture { suggestions, hint } result
 * - Line 74: set state for suggestions and new activeHint field
 * - Line 75: handle pending async results with sequence/timestamp guard
 * - Line 76-78: gracefully handle resolver errors (log + fallback to empty suggestions + hint)
 * - Line 79-80: ensure cleanup on component unmount / completion reset
 */
export interface UseSlashCompletionReturn {
    suggestions: Suggestion[];
    activeSuggestionIndex: number;
    visibleStartIndex: number;
    showSuggestions: boolean;
    isLoadingSuggestions: boolean;
    isPerfectMatch: boolean;
    activeHint: string;
    setActiveSuggestionIndex: React.Dispatch<React.SetStateAction<number>>;
    setShowSuggestions: React.Dispatch<React.SetStateAction<boolean>>;
    resetCompletionState: () => void;
    navigateUp: () => void;
    navigateDown: () => void;
    handleAutocomplete: (indexToUse: number) => void;
}
export declare function useSlashCompletion(buffer: TextBuffer, dirs: readonly string[], cwd: string, slashCommands: readonly SlashCommand[], commandContext: CommandContext, reverseSearchActive?: boolean, config?: Config): UseSlashCompletionReturn;
