import type { ModelIdMap } from '@collabdt/plugin-kit/types/bim'; /** What the plugin stores about one space. The IFC model itself is never written to. */ export interface SpaceAnnotation extends Record { /** Replaces the IFC name in this plugin's own surfaces. */ name: string; colour: string; } export interface Space { /** `::` — stable for as long as the model is, and safe as a record key. */ key: string; modelId: string; localId: number; /** From the IFC, and never changed. */ ifcName: string; /** The annotation's name when there is one, otherwise the IFC's. */ name: string; colour: string; /** Whether the plugin has stored anything for this space. */ annotated: boolean; } export declare function spaceKey(modelId: string, localId: number): string; /** Sets, not arrays: `ModelIdMap` is `Record>`. */ export declare function toModelIdMap(spaces: Space[]): ModelIdMap; export interface DiscoveredSpace { modelId: string; localId: number; ifcName: string; } export declare function useSpaceDiscovery(): { discovered: DiscoveredSpace[]; scanning: boolean; }; /** * The spaces, plus the annotations this plugin stores against them. The IFC is read-only, so * a rename is an annotation, never a write to the model. */ export declare function useSpaces(): { spaces: Space[]; isLoading: boolean; lastError: string; selected: Space; select: (next: string | ((previous: string) => string)) => void; rename: (key: string, name: string) => Promise; setColour: (key: string, colour: string) => Promise; reset: (key: string) => Promise; }; /** * Whether the spaces are painted, applied from an effect so a recolour repaints at once. * The flag is plugin state, so the toolbar and the tab agree on it. */ export declare function useSpacePainting(): { painted: boolean; setPainted: (next: boolean | ((previous: boolean) => boolean)) => void; }; /** `#rrggbb` to the `0xRRGGBB` the appearance API takes. */ export declare function hexToInt(colour: string): number; //# sourceMappingURL=spaces.d.ts.map