import { Editor } from '../../Editor.js';
import { PositionHit } from '../../../../../../../layout-engine/layout-bridge/src/index.js';
/** MIME type for external field annotation drag operations (legacy compatibility) */
export declare const FIELD_ANNOTATION_DATA_TYPE: "fieldAnnotation";
/** Classifies what kind of data a drag event carries. */
export type DropPayloadKind = 'fieldAnnotation' | 'internalObject' | 'imageFiles' | 'none';
/**
 * Attributes for a field annotation node.
 */
export interface FieldAnnotationAttributes {
    fieldId: string;
    fieldType: string;
    displayLabel: string;
    type: string;
    fieldColor?: string;
}
/**
 * Information about the source field being dragged.
 */
export interface SourceFieldInfo {
    fieldId: string;
    fieldType: string;
    annotationType: string;
}
/**
 * Payload structure for field annotation drag-and-drop data.
 */
export interface FieldAnnotationDragPayload {
    attributes?: FieldAnnotationAttributes;
    sourceField?: SourceFieldInfo;
}
/**
 * Data extracted from a draggable field annotation element.
 */
export interface FieldAnnotationDragData {
    fieldId?: string;
    fieldType?: string;
    variant?: string;
    displayLabel?: string;
    pmStart?: number;
    pmEnd?: number;
    attributes?: Record<string, string>;
}
/**
 * Callback to process and insert a single image file into the editor.
 */
export type ImageInsertHandler = (params: {
    file: File;
    editor: Editor;
    view: Editor['view'];
    editorOptions: Editor['options'];
    getMaxContentSize: () => {
        width?: number;
        height?: number;
    };
}) => Promise<'success' | 'skipped'>;
/**
 * Dependencies injected from PresentationEditor.
 */
export type DragDropDependencies = {
    /** Get the active editor (body or header/footer) */
    getActiveEditor: () => Editor;
    /** Hit test to convert client coordinates to ProseMirror position */
    hitTest: (clientX: number, clientY: number) => PositionHit | null;
    /** Schedule selection overlay update */
    scheduleSelectionUpdate: () => void;
    /** Show a transient drag/drop insertion indicator at the given PM position */
    showDragDropIndicator: (pos: number) => void;
    /** Clear any transient drag/drop insertion indicator */
    clearDragDropIndicator: () => void;
    /** The viewport host element (for event listeners) */
    getViewportHost: () => HTMLElement;
    /** The painter host element (for internal drag detection) */
    getPainterHost: () => HTMLElement;
    /** Handler for inserting a single dropped image file */
    insertImageFile: ImageInsertHandler;
};
/**
 * Type guard to validate field annotation attributes.
 */
export declare function isValidFieldAnnotationAttributes(attrs: unknown): attrs is FieldAnnotationAttributes;
/**
 * Checks if a drag event may contain files.
 *
 * During dragover, `dataTransfer.files` is empty due to browser security
 * restrictions — only `dataTransfer.types` is available. This function checks
 * the types array, which works for both dragover and drop events.
 *
 * Note: This cannot distinguish image files from other file types during
 * dragover. Actual image filtering happens at drop time via `getDroppedImageFiles`.
 */
export declare function hasPossibleFiles(event: DragEvent): boolean;
/**
 * Extracts image File objects from a drop event's dataTransfer.
 * Only usable on drop events — files are not accessible during dragover.
 */
export declare function getDroppedImageFiles(event: DragEvent): File[];
/**
 * Classifies the drag payload kind. Evaluated in order — first match wins.
 *
 * Field annotations take precedence over files in mixed payloads,
 * since they are an internal editor concept with stricter semantics.
 *
 * During dragover, this returns 'imageFiles' for any file drag (since we
 * can't inspect file types yet). On drop, callers use `getDroppedImageFiles`
 * to filter to actual images.
 */
export declare function getDropPayloadKind(event: DragEvent): DropPayloadKind;
export declare class DragDropManager {
    #private;
    setDependencies(deps: DragDropDependencies): void;
    bind(): void;
    unbind(): void;
    destroy(): void;
}
//# sourceMappingURL=DragDropManager.d.ts.map