import type { ColorRepresentation, Group } from "three";
import type { SelectedStore, UserDevice, ViewerGridAxesVisibility, ViewerGridAxisSide, ViewerStoreApi } from "../store/ViewerStore";
import { type ViewerPropertiesApi } from "./ViewerPropertiesApi";
import type { ViewerClippingApi } from "../utils/ClippingUtils";
import type { ViewerColorConfigByModel, ViewerModelColorConfig } from "../utils/ColorsUtils/useElementColors";
import type { ViewerDimensionsApi } from "../utils/DimentionsUtils";
import type { ViewerCameraGetIntersection } from "../Camera/useCameraUtils";
import type { BmtConversionResult, BmtConverterOptions, BmtConverterSource } from "../Loaders/BmtConverter";
import { FilteredElementsCollector } from "../Selector/FilteredElementsCollector";
import type { ViewerLoadedModels, ViewerLoadModelOptions, ViewerModelSource } from "./loader";
import type { WorkerProgressEvent } from "../workers";
export type { ViewerClippingApi } from "../utils/ClippingUtils";
export type { ViewerColorConfigByModel, ViewerModelColorConfig, } from "../utils/ColorsUtils/useElementColors";
export type { ViewerDimensionsApi } from "../utils/DimentionsUtils";
export type { ViewerCameraGetIntersection } from "../Camera/useCameraUtils";
export type ViewerSelection = Record<number, number[]>;
export type ViewerGeometryUtilsApi = {
    getAllIds: () => number[];
    getIfcSpacesVisibility: () => boolean;
    getModelGeometry: (modelID: number) => Group | null;
    getModelsGeometry: () => Group[];
    hideByIds: (ids: number[]) => void;
    hideSelected: () => void;
    isolateByIds: (ids: number[]) => void;
    isolateSelected: () => void;
    resetIsolation: () => void;
    setIfcSpacesVisibility: (visible: boolean) => void;
    showAll: () => void;
    showByIds: (ids: number[]) => void;
    toggleIIfcSpacesVisibility: () => void;
};
export type ViewerSelectorApi = {
    addSelected: (modelID: number, ids: number[], setTarget?: boolean, fitTarget?: boolean) => void;
    collector: () => FilteredElementsCollector;
    getPreselectionColor: () => ColorRepresentation;
    getSelectionColor: () => ColorRepresentation;
    getSelected: () => ViewerSelection;
    removeSelected: (modelID: number, ids: number[]) => void;
    resetSelection: (modelID?: number) => void;
    setPreselectionColor: (color: ColorRepresentation) => void;
    setSelectionColor: (color: ColorRepresentation) => void;
    setSelected: (modelID: number, ids: number[], reset?: boolean, setTarget?: boolean, fitTarget?: boolean) => void;
};
export type ViewerSceneSelectorApi = {
    setTargetToSelection: (selection: ViewerSelection, fitTarget?: boolean) => void;
};
export type ViewerColorsApi = {
    clearAllColors: () => void;
    clearColor: (modelID: number, ids: number[]) => void;
    clearModelColors: (modelID: number) => void;
    rebuildByColors: (colorsByModel: ViewerColorConfigByModel, defaultColor?: ColorRepresentation) => void;
    rebuildModelByColors: (modelID: number, colorsByIds: ViewerModelColorConfig, defaultColor?: ColorRepresentation) => void;
    setColor: (modelID: number, ids: number[], color: ColorRepresentation) => void;
};
export type ViewerUtilsApi = {
    getDefaultHotkeysEnabled: () => boolean;
    getGridAxesVisibility: () => ViewerGridAxesVisibility;
    getShowNavCube: () => boolean;
    getShowGridAxes: () => boolean;
    getShowStats: () => boolean;
    getUserDevice: () => UserDevice;
    setGridAxesVisibility: (gridAxesVisibility: Partial<ViewerGridAxesVisibility>) => void;
    setDefaultHotkeysEnabled: (enabled: boolean) => void;
    setGridAxisVisibility: (side: ViewerGridAxisSide, visible: boolean) => void;
    toggleDefaultHotkeys: () => void;
    setShowNavCube: (showNavCube: boolean) => void;
    setShowGridAxes: (showGridAxes: boolean) => void;
    setShowStats: (showStats: boolean) => void;
    toggleShowGridAxes: () => void;
    toggleShowNavCube: () => void;
};
export type ViewerCameraApi = {
    fitCamera: () => void;
    getIntersection: ViewerCameraGetIntersection;
};
export type ViewerBmtConverterOptions = Pick<BmtConverterOptions, "activeView" | "fileName" | "fileNames" | "filterElement" | "useIfcColors" | "useIfcElementAssembly" | "useIfcSpace" | "useMinVersion">;
export type ViewerConverterApi = {
    convertIfcFileToBmt: (sources: BmtConverterSource, options?: ViewerBmtConverterOptions) => Promise<BmtConversionResult>;
    convertToBmt: (options?: ViewerBmtConverterOptions) => BmtConversionResult;
};
export type ViewerLoadModelsOptions = ViewerLoadModelOptions & {
    clearViewer?: boolean;
    fitToView?: boolean;
    onModelLoadingChange?: (loading: boolean) => void;
    onModelProgress?: (progress: WorkerProgressEvent | null) => void;
    onModelsDataChange?: (modelsData: ViewerLoadedModels | undefined) => void;
};
export type ViewerModelsApi = {
    getData: () => ViewerLoadedModels | undefined;
    getLoading: () => boolean;
    getProgress: () => WorkerProgressEvent | null;
    loadModels: (sources: ViewerModelSource[], options?: ViewerLoadModelsOptions) => Promise<ViewerLoadedModels>;
    reset: () => void;
};
export type ViewerApi = {
    camera: ViewerCameraApi;
    clipping: ViewerClippingApi;
    colors: ViewerColorsApi;
    converter: ViewerConverterApi;
    dimensions: ViewerDimensionsApi;
    geometryUtils: ViewerGeometryUtilsApi;
    models: ViewerModelsApi;
    properties: ViewerPropertiesApi;
    selector: ViewerSelectorApi;
    utils: ViewerUtilsApi;
};
export type ViewerSceneApi = {
    camera: ViewerCameraApi;
    clipping: ViewerClippingApi;
    colors: ViewerColorsApi;
    converter: ViewerConverterApi;
    dimensions: ViewerDimensionsApi;
    geometryUtils: ViewerGeometryUtilsApi;
    selector: ViewerSceneSelectorApi;
};
export declare function serializeSelected(selected: SelectedStore): ViewerSelection;
export declare function createSelectedStore(selection: ViewerSelection): SelectedStore;
export declare function createPublicViewerApi(viewerStore: ViewerStoreApi, getSceneApi: () => ViewerSceneApi | null, getModelsApi: () => ViewerModelsApi | null): ViewerApi;
