import { type IfcElementsAssembly, type IfcPropertiesProgressData } from "./PropertySerializer";
import { Matrix4 } from "three";
import { IfcAPI, type LocateFileHandlerFn } from "web-ifc";
import { type GridData } from "./IfcGrid";
import type { BmtGeomData, BmtModelData, BmtModelProps, BmtModelStructure } from "../BmtLoader";
type IfcParserOptions = {
    geometryTransformation?: number[];
    maxGeometriesPerMesh: number;
    maxMeshBytes: number;
};
type IfcModelDataResult = {
    data: BmtModelData;
    grids: Record<string | number, GridData>;
    modelID: number;
    propsData: BmtModelProps;
    structure: BmtModelStructure;
};
export type IfcModelSource = string | File;
export type IfcLoadedModels = Record<number, BmtModelData>;
export type IfcCoordinationMatrixSource = Matrix4 | number[] | string | null | undefined;
export type IfcGeometryChunkData = {
    chunkIndex: number;
    geometry: BmtGeomData;
    geometryID: number;
    isIfcSpace: boolean;
    totalChunks: number;
};
export type IfcGeometryProgressData = {
    emittedChunks: number;
    processed: number;
    total: number;
};
export type IfcPropertyProgressData = IfcPropertiesProgressData;
export type IfcParsePhase = "opening" | "opened" | "streaming" | "properties" | "metadata";
export type IfcParseCallbacks = {
    onGeometryChunk?: (chunk: IfcGeometryChunkData) => void;
    onGeometryProgress?: (progress: IfcGeometryProgressData) => void;
    onPhase?: (phase: IfcParsePhase) => void;
    onPropertiesProgress?: (progress: IfcPropertyProgressData) => void;
    streamGeometryChunks?: boolean;
};
export declare class IFCLoader {
    useIfcElemetAssembly: boolean;
    useIfcColors: boolean;
    useIfcSpace: boolean;
    private coordinationMatrix;
    private parser;
    private propertySerializer;
    private _wasmPath;
    private parserReady;
    private readonly gridPoint;
    chunk: number;
    maxMeshBytes: number;
    constructor();
    getPath: LocateFileHandlerFn;
    initParser(func?: LocateFileHandlerFn, forceSingleThread?: boolean): Promise<void>;
    set wasmPath(path: string);
    get _parser(): IfcAPI;
    set _parser(parser: IfcAPI);
    loadModel(sources: IfcModelSource | IfcModelSource[], coordinationMatrix?: IfcCoordinationMatrixSource): Promise<IfcLoadedModels>;
    parseBinaryFile(file: ArrayBuffer, coordinationMatrix?: IfcCoordinationMatrixSource, callbacks?: IfcParseCallbacks): Promise<BmtModelData>;
    private loadSingleModel;
    private parseInitializedBuffer;
    getModelData(path: string): Promise<IfcModelDataResult>;
    setCoordinationMatrix(matrix: IfcCoordinationMatrixSource): void;
    resetCoordinationMatrix(): void;
    get coordinationMatrixData(): string | undefined;
    getModelDataFromBuffer(file: ArrayBuffer, coordinationMatrix?: IfcCoordinationMatrixSource, callbacks?: IfcParseCallbacks): Promise<IfcModelDataResult | false>;
    private createCoordinationMatrix;
    private getOptionalGridCoordinate;
    private transformGridPoint;
    private transformGridData;
}
export declare class IfcParser {
    private materials;
    elementsAssembly: IfcElementsAssembly | null;
    private parser;
    private ifcModelID;
    private options;
    private readonly meshMatrix;
    private readonly normalMatrix;
    constructor(parser: IfcAPI, ifcModelID: number, options: IfcParserOptions);
    getGeometryProgressTotal(): number;
    parseData(allIds: Set<number>, elementsAssembly: IfcElementsAssembly | null, includeSpaces?: boolean, callbacks?: IfcParseCallbacks): BmtModelData;
    private parseDataStreaming;
    private streamDynamicGeometryChunks;
    private getDynamicChunkBuilder;
    private writeGeometryPayloadToDynamicBuilder;
    private flushDynamicGeometryChunks;
    private emitDynamicGeometryChunk;
    private streamGeometryChunks;
    private applyGeometryTransformation;
    private planGeometryChunks;
    private streamMeshes;
    private getMaterialChunkPlan;
    private deleteFlatMesh;
    private canFitInChunk;
    private createChunkBuilders;
    private getChunkBuilder;
    private getPlacedGeometryStats;
    private getPlacedGeometryPayload;
    private createGeometryStats;
    private getGeometryByteSize;
    private writeGeometryPayload;
    private createModelDataFromChunks;
    private getTotalChunkCount;
    private emitCompletedGeometryChunk;
    private createGeometryDataFromBuilder;
    private getElementId;
    private getFiniteNumber;
    private getDisplayColor;
    private getMeshMaterial;
}
export {};
