import { type BmtGeomData, type BmtModelData } from "../Loaders/BmtLoader";
import { type WorkerProgressEvent } from "./ProgressUtils";
export type BmtWorkerSource = {
    buffer: ArrayBuffer;
    kind: "buffer";
    name?: string;
} | {
    file: File;
    kind: "file";
    name?: string;
} | {
    kind: "url";
    name?: string;
    url: string;
};
export type BmtWorkerLoadOptions = {
    streamGeometryChunks?: boolean;
};
export type BmtWorkerLoadRequest = {
    options?: BmtWorkerLoadOptions;
    sources: BmtWorkerSource[];
    taskId: string;
    type: "load-bmt-model";
};
export type BmtWorkerError = {
    message: string;
    stack?: string;
};
export type BmtWorkerGeometryChunk = {
    chunkIndex: number;
    geometry: BmtGeomData;
    geometryID: number;
    isIfcSpace: boolean;
    modelIndex: number;
    modelName?: string;
};
export type BmtWorkerResponse = {
    error: BmtWorkerError;
    taskId: string;
    type: "error";
} | {
    chunk: BmtWorkerGeometryChunk;
    taskId: string;
    type: "chunk";
} | {
    models: Record<number, BmtModelData>;
    taskId: string;
    type: "complete";
} | {
    progress: WorkerProgressEvent;
    taskId: string;
    type: "progress";
};
