import { SelectionRange } from "../client/editContext";
export type InlineAiPosition = {
    x: number;
    y: number;
    visible: boolean;
};
/**
 * Calculate position for selection within an input or textarea element.
 * Uses a hidden mirror element to measure text and determine cursor position.
 */
export declare function getInputSelectionPosition(element: HTMLInputElement | HTMLTextAreaElement, startOffset: number, endOffset: number): {
    x: number;
    y: number;
} | null;
/**
 * Hook to calculate the position for the inline AI trigger/dialog
 * based on the current text selection.
 */
export declare function useInlineAiPosition(selectedRange: SelectionRange | undefined): InlineAiPosition;
/**
 * Calculate optimal dialog position near the trigger
 */
export declare function calculateDialogPosition(triggerPosition: {
    x: number;
    y: number;
    anchorTop?: number;
}, dialogWidth?: number, dialogHeight?: number, align?: "center" | "start", anchorOrigin?: "trigger" | "caret" | "toolbar"): {
    x: number;
    y: number;
};
export default useInlineAiPosition;
