import type { TipMagicAction } from '../../context/TipMagicContext'; import type { TipAdvisorItem, TipAdvisorPresetItem } from '../../types/tipAdvisor'; import { type FuzzySearchResult } from './utils'; export interface UseTipAdvisorStateOptions { /** CSS selector for finding tip elements, or null to skip DOM scanning */ selector: string | null | undefined; /** Key to toggle the advisor */ triggerKey: string; /** Preset items to include (not tied to DOM elements) */ presetItems?: TipAdvisorPresetItem[]; /** Callback when advisor opens */ onOpen?: () => void; /** Callback when advisor closes */ onClose?: () => void; /** Context dispatch function */ dispatch: React.Dispatch; } export interface UseTipAdvisorStateReturn { isOpen: boolean; items: TipAdvisorItem[]; searchQuery: string; focusedIndex: number; filteredResults: FuzzySearchResult[]; searchInputRef: React.RefObject; itemRefs: React.MutableRefObject>; open: () => void; close: () => void; toggle: () => void; setSearchQuery: (query: string) => void; setFocusedIndex: (index: number) => void; handleItemClick: (item: TipAdvisorItem) => void; handleItemHover: (item: TipAdvisorItem, index: number) => void; handleItemLeave: () => void; handleKeyDown: (event: React.KeyboardEvent) => void; } /** * Hook that manages TipAdvisor state, keyboard navigation, and tooltip display. */ export declare function useTipAdvisorState(options: UseTipAdvisorStateOptions): UseTipAdvisorStateReturn; //# sourceMappingURL=useTipAdvisorState.d.ts.map