import type { Attachment } from 'svelte/attachments'; import type { FileLoadCallback, TrajectoryFileLoadCallback } from './types'; export type FileDropOptions = { allow: () => boolean; max_files?: number; on_error?: (msg: string) => void; set_loading?: (loading: boolean) => void; } & ({ hdf5_as_blob?: false; on_drop: FileLoadCallback; } | { hdf5_as_blob: true; on_drop: TrajectoryFileLoadCallback; }); export declare const drag_over_handlers: (opts: { allow?: () => boolean; set_dragover: (over: boolean) => void; }) => { ondragover: (event: DragEvent) => void; ondragleave: () => void; }; export type DropSource = string | File; export interface DropBatchOptions { allow: () => boolean; max_files?: number; on_error?: (msg: string) => void; set_loading?: (loading: boolean) => void; handle: (source: DropSource) => Promise | void; } export declare const create_drop_batch_handler: (opts: DropBatchOptions) => ((event: DragEvent) => Promise); export declare const create_file_drop_handler: (opts: FileDropOptions) => ((event: DragEvent) => Promise); type DragoverOption = { on_dragover?: (over: boolean) => void; }; export declare const file_drop_zone: (options: FileDropOptions & DragoverOption) => Attachment; export declare const raw_file_drop_zone: (options: Omit & DragoverOption & { on_drop: (source: DropSource) => Promise | void; }) => Attachment; export {};