import pako from "pako";
import type { ModelGridsData } from "../utils/ModelGrids";
import type { ViewerMaterialMode, ViewerUploadMode } from "../types";
export type BmtIndexArray = Uint16Array | Uint32Array;
export interface BmtMaterialData {
    r: number;
    g: number;
    b: number;
    opacity: number;
    name: number;
}
export interface BmtGeomData {
    pos: Float32Array;
    norm?: Float32Array;
    ind: BmtIndexArray;
    isIfcSpace?: boolean;
    ids: Uint32Array;
    matrix?: string;
    mat: BmtMaterialData;
}
export type BmtPropertyValue = boolean | null | number | string | undefined | BmtPropertyValue[] | {
    [key: string]: BmtPropertyValue;
};
export type BmtPropertyRecord = Record<string, BmtPropertyValue>;
export type BmtPropertySet = {
    [key: string]: BmtPropertyValue;
    guid?: string;
    id?: number;
    isQuantities?: boolean;
    name?: string;
    props?: BmtPropertyValue[] | BmtPropertyRecord;
};
export type BmtElementProps = {
    [key: string]: BmtPropertyRecord | BmtPropertySet[] | BmtPropertyValue | undefined;
    guid?: string;
    id?: number;
    props?: BmtPropertyRecord;
    sets?: BmtPropertySet[];
};
export type BmtModelProps = Record<number, BmtElementProps>;
export type BmtModelStructureNode = {
    [key: string]: BmtModelStructureNode[] | BmtPropertyValue | undefined;
    children?: BmtModelStructureNode[];
    expressID?: number;
    expressId?: number;
    elementID?: number;
    elementId?: number;
    id?: number;
    name?: string;
    props?: BmtPropertyRecord;
    type?: string;
};
export type BmtModelStructure = BmtModelStructureNode | BmtModelStructureNode[] | Record<string, BmtModelStructureNode>;
export type BmtModelGeometryData = Record<number, BmtGeomData>;
export type BmtModelRenderSettings = {
    materialMode?: ViewerMaterialMode;
    uploadMode?: ViewerUploadMode;
    useDoubleSideMaterial?: boolean;
};
export interface BmtModelData {
    coordinationMatrix?: string;
    data: BmtModelGeometryData;
    grids?: ModelGridsData;
    name?: string;
    props: BmtModelProps;
    renderSettings?: BmtModelRenderSettings;
    structure: BmtModelStructure;
}
export type BmtGeometryChunkData = {
    chunkIndex: number;
    geometry: BmtGeomData;
    geometryID: number;
    isIfcSpace: boolean;
    loadedBytes: number;
    totalBytes: number;
};
export type BmtParseProgressData = {
    emittedChunks: number;
    loadedBytes: number;
    totalBytes: number;
};
export type BmtParseCallbacks = {
    onGeometryChunk?: (chunk: BmtGeometryChunkData) => void;
    onProgress?: (progress: BmtParseProgressData) => void;
    streamGeometryChunks?: boolean;
};
type BmtMeshData = {
    colorId: BmtMaterialData;
    ids: Uint8Array;
    ind: {
        data: Uint8Array;
        type: number;
    };
    pos: Uint8Array;
};
export declare class BinaryReader {
    view: DataView;
    offset: number;
    constructor(buffer: ArrayBuffer);
    readUint8(): number;
    readUint32(): number;
    readBytes(length: number): Uint8Array<ArrayBufferLike>;
    eof(): boolean;
}
export declare class BMTLoader {
    decodeBuffer(buffer: Uint8Array): string;
    decoder: typeof pako;
    textDecoder: TextDecoder;
    ChunkType: {
        PROP: number;
        MESH: number;
        STRUCTURE: number;
        GRIDS: number;
        MATRIX: number;
        MESHSPACE: number;
    };
    parseMesh(data: Uint8Array): BmtMeshData;
    private getExternalMetadataPath;
    private loadExternalMetadata;
    private getModelNameFromPath;
    loadModel(path: string, callbacks?: BmtParseCallbacks): Promise<BmtModelData>;
    parseBinaryFile(data: ArrayBuffer, callbacks?: BmtParseCallbacks): BmtModelData;
}
export {};
