import type { MentionOccurrence } from './Mentions.types'; import type { MentionWalk } from './utils/walk-mentions'; type MentionsControlElement = HTMLTextAreaElement | HTMLInputElement; export interface MentionsSelectionRange { start: number; end: number; } interface UseMentionsSelectionInput { controlRef: React.RefObject; onSelectionChange: ((selection: MentionsSelectionRange, mentions: MentionOccurrence[]) => void) | undefined; onCompositionStart: React.CompositionEventHandler | undefined; onCompositionEnd: React.CompositionEventHandler | undefined; } export declare function useMentionsSelection({ controlRef, onSelectionChange, onCompositionStart, onCompositionEnd, }: UseMentionsSelectionInput): { selection: MentionsSelectionRange; selectionRef: import("react").RefObject; setCaret: (caret: number, walk: MentionWalk) => void; syncSelection: (target: MentionsControlElement, walk: MentionWalk) => { start: number; end: number; }; readLiveSelection: (target: MentionsControlElement) => { start: number; end: number; }; isCaretRestorePending: () => boolean; compositionHandlers: { onCompositionStart: (event: React.CompositionEvent) => void; onCompositionEnd: (event: React.CompositionEvent) => void; }; }; export {};