import type { BmtGeomData, BmtModelData } from "../Loaders/BmtLoader";
import { type IfcCoordinationMatrixSource } from "../Loaders/IFCLoader/IFCLoader";
import { type WorkerProgressEvent } from "./ProgressUtils";
export type IfcWorkerSource = {
    kind: "buffer";
    buffer: ArrayBuffer;
    name?: string;
} | {
    file: File;
    kind: "file";
    name?: string;
} | {
    kind: "url";
    name?: string;
    url: string;
};
export type IfcWorkerLoadOptions = {
    chunk?: number;
    coordinationMatrix?: IfcCoordinationMatrixSource;
    maxMeshBytes?: number;
    streamGeometryChunks?: boolean;
    useIfcColors?: boolean;
    useIfcElementAssembly?: boolean;
    useIfcSpace?: boolean;
    wasmPath?: string;
};
export type IfcWorkerLoadRequest = {
    options?: IfcWorkerLoadOptions;
    sources: IfcWorkerSource[];
    taskId: string;
    type: "load-ifc-model";
};
export type IfcWorkerError = {
    message: string;
    stack?: string;
};
export type IfcWorkerGeometryChunk = {
    chunkIndex: number;
    geometry: BmtGeomData;
    geometryID: number;
    isIfcSpace: boolean;
    modelIndex: number;
    modelName?: string;
    totalChunks: number;
};
export type IfcWorkerResponse = {
    error: IfcWorkerError;
    taskId: string;
    type: "error";
} | {
    models: Record<number, BmtModelData>;
    taskId: string;
    type: "complete";
} | {
    chunk: IfcWorkerGeometryChunk;
    taskId: string;
    type: "chunk";
} | {
    progress: WorkerProgressEvent;
    taskId: string;
    type: "progress";
};
