import React from "react";
export declare function clampInlineAiDialogPosition(position: {
    x: number;
    y: number;
}, dialogSize: {
    width: number;
    height: number;
}, viewportSize: {
    width: number;
    height: number;
}, padding?: number): {
    x: number;
    y: number;
};
export type InlineAiDialogProps = {
    selectedText?: string;
    /** Plain text context before the selection (captured at selection time) */
    contextBefore?: string;
    /** Plain text context after the selection (captured at selection time) */
    contextAfter?: string;
    onAccept: (newText: string) => boolean;
    onClose: () => void;
    position?: {
        x: number;
        y: number;
    };
    className?: string;
};
type AiTextEditResponse = {
    replacementText?: string;
    replacementTexts?: string[];
    error?: string;
};
export declare function parseAiTextEditResponse(raw: string): AiTextEditResponse;
export declare function InlineAiDialog({ selectedText, contextBefore, contextAfter, onAccept, onClose, position, className, }: InlineAiDialogProps): React.JSX.Element;
export default InlineAiDialog;
