import { type Ref } from 'vue';
import type { AnnotationStamp } from '@/utils/types';
import type { PDFPageProxy, PageViewport } from 'pdfjs-dist';
export interface AnnotationDragOptions {
    /** Container element ref for drag operations */
    containerRef: Ref<HTMLElement | null>;
    /** Current page proxy */
    page: Ref<PDFPageProxy>;
    /** Current viewport */
    viewport: Ref<PageViewport>;
    /** Current annotation being dragged */
    annotation: Ref<AnnotationStamp>;
    /** Parent dimensions [width, height] */
    parentDimensions: Ref<[number, number]>;
    /** Page dimensions [width, height] */
    pageDimensions: Ref<[number, number]>;
    /** Editor dimensions (normalized 0-1 coordinates) */
    editorDimensions: {
        x: number;
        y: number;
        width: number;
        height: number;
    };
    /** Callback when annotation needs to be updated */
    onUpdate?: (annotation: AnnotationStamp) => void;
    /** Callback when dragging starts */
    onDragStart?: () => void;
    /** Callback when dragging stops */
    onDragEnd?: () => void;
    /** Optional resizing state to prevent conflicts */
    isResizing?: Ref<boolean>;
    /** Optional existing drag session state */
    existingDragState?: {
        dragPointerId: Ref<number | null>;
        prevDragX: Ref<number>;
        prevDragY: Ref<number>;
        hasDraggingStarted: Ref<boolean>;
        dragAbortController: Ref<AbortController | null>;
    };
}
export interface AnnotationDragReturn {
    /** Whether currently dragging */
    isDragging: Ref<boolean>;
    /** Current drag session state */
    dragSession: {
        id: string;
        active: boolean;
        savedX: number;
        savedY: number;
        savedPageIndex: number;
        newX: number;
        newY: number;
        newPageIndex: number;
    };
    /** Start drag session */
    startDragSession: (event: PointerEvent) => void;
    /** Handle drag movement */
    handleDragMove: (event: PointerEvent) => void;
    /** End drag session */
    endDragSession: (event: PointerEvent) => void;
    /** Apply drag translation */
    applyDragTranslation: (tx: number, ty: number) => void;
    /** Convert screen coordinates to page coordinates */
    screenToPageTranslation: (screenX: number, screenY: number) => [number, number];
    /** Find new parent page based on coordinates */
    findNewParentPage: (x: number, y: number) => number | null;
    /** Get base translation for border offset */
    getBaseTranslation: () => [number, number];
    /** Current page index */
    currentPageIndex: Ref<number>;
}
export declare function useAnnotationDrag(options: AnnotationDragOptions): AnnotationDragReturn;
