import { Box3, Mesh, Object3D } from "three";
import type { MeshBVH } from "three-mesh-bvh";
import type { ViewerModelRef } from "../../types";
export type IndexArray = Uint16Array | Uint32Array;
export type IndexRange = {
    count: number;
    start: number;
};
export type MeshGeometryRecord = {
    hiddenIds: Set<number>;
    initialVisible: boolean;
    isIfcSpace: boolean;
    mesh: Mesh;
    modelID: number;
    originalBoundsTree: MeshBVH | null;
    originalIndex: IndexArray;
    visibleStateKey: string;
    triangleRanges: Array<IndexRange & {
        id: number;
    }>;
};
export type ElementIndexEntry = {
    record: MeshGeometryRecord;
    vertexRanges: IndexRange[];
};
export type GeometryIndex = {
    elementBounds: Map<number, Map<number, Box3>>;
    elementIndex: Map<number, ElementIndexEntry[]>;
    ifcSpacesVisible: boolean;
    indexedModel: Object3D | null;
    isolatedIdsByModel: Map<number, Set<number>> | null;
    isolatedIds: Set<number> | null;
    records: Set<MeshGeometryRecord>;
    version: string;
};
export type GeometryIndexApi = {
    buildIndex: () => GeometryIndex;
    resetIndex: () => void;
};
export default function useGeometryIndex(modelRef: ViewerModelRef): GeometryIndexApi;
