import { BaseViewer, Plugin, PluginConfig } from "@x-viewer/core"; /** * Uploader plugin config. */ export interface UploaderConfig extends Partial { formats?: string[]; /** * Enable to drag and drop files. * Default to be true. */ enableDragDropFile?: boolean; } /** * @hidden */ export declare class IUploader extends Plugin { protected cfg: UploaderConfig; protected input: HTMLInputElement; protected dropZone: HTMLDivElement; protected _formats: string[]; /** * Callback function called when file loading starts. * @param event - Event object containing file information */ onStart?: (event: { file: File; fileName: string; }) => void; /** * Callback function called when file upload and loaded to scene successfully. * @param event - Event object containing file information */ onSuccess?: (event: { file: File; fileName: string; }) => void; /** * Callback function called when file upload fails. * @param event - Event object containing file information and error */ onError?: (event: { file: File; fileName: string; error: Error | unknown; }) => void; constructor(viewer: BaseViewer, cfg: UploaderConfig); protected formats(): string[]; protected uploadFiles(files: FileList): void; openFileBrowserToUpload(): void; destroy(): void; protected handleDragEnter: (e: DragEvent) => void; protected handleDragLeave: (e: DragEvent) => void; protected handleDragOver: (e: DragEvent) => void; protected handleDrop: (e: DragEvent) => void; }