import * as THREE from "three";
import { BaseViewer } from "./BaseViewer";
import { ViewerName } from "./Constants";
import { Model3d } from "../model";
import { Viewer3dConfig, ModelConfig, Viewpoint } from "../../core/Configs";
import { CoordinateSpace, TransformGizmo, type TransformGizmoCallbacks, TransformMode } from "../../core/controls/TransformGizmo";
export declare class Viewer3d extends BaseViewer {
    name: ViewerName;
    loadedModels: Model3d[];
    private transformGizmo?;
    private transformGizmoCallbacks;
    /**
     * 3D selection set (supports multi-select). Order is insertion order.
     * For legacy single-select APIs, the "highlighted object" is the last selected.
     */
    private selectedObjects;
    constructor(viewerCfg: Viewer3dConfig, homeView?: Viewpoint);
    is3d(): boolean;
    loadLocalModel(url: string, modelCfg: ModelConfig, manager?: THREE.LoadingManager, onProgress?: (event: ProgressEvent) => void): Promise<void>;
    loadModel(modelCfg: ModelConfig, onProgress?: ((event: ProgressEvent<EventTarget>) => void) | undefined): Promise<void>;
    /**
     * Drops cached model bounds for the tree containing {@link object} so {@link BaseViewer.getBBox}
     * and camera helpers use up-to-date geometry after transforms.
     */
    invalidateModelBBoxForObject(object: THREE.Object3D): void;
    /**
     * Called after any external transform applied to {@link object}:
     * invalidates the model bbox cache and re-tunes camera near/far and orbit
     * min/max distances based on the updated scene bounds.
     */
    private onObjectTransformed;
    addModel(model: Model3d): void;
    /**
     * Sets distance culling factor in order to improve performance.
     * 0 means distance culling is disabled.
     * 100 means a 1x1 squre mesh is visible within 100.
     * @hidden
     */
    setDistanceCullingFactor(val: number): void;
    /**
     * Gets distance culling factor.
     * @hidden
     */
    getDistanceCullingFactor(): number;
    /**
     * Sets an object's opacity.
     */
    setObjectOpacity(object: THREE.Object3D, opacity: number): void;
    /**
     * Sets an object's opacity.
     */
    setOtherObjectsOpacity(object: THREE.Object3D, opacity: number): void;
    /**
     * Clears an object's opacity.
     */
    clearObjectOpacity(object: THREE.Object3D): void;
    /**
     * Sets a model's opacity.
     */
    setModelOpacity(modelId: string): void;
    /**
     * Clears a model's opacity.
     */
    clearModelOpacity(modelId: string): void;
    /**
     * Sets all models' opacity.
     */
    setModelsOpacity(opacity: number): void;
    /**
     * Clears all models' opacity.
     */
    clearModelsOpacity(): void;
    /**
     * Checks if there is any transparent object in any model.
     * Note that this only consider the objects that we set as transparent,
     * it does not count objects that are transparent by default (like glass).
     */
    hasTransparentObject(): boolean;
    /**
     * Sets an object's visibility.
     */
    setObjectVisible(object: THREE.Object3D, visible: boolean): void;
    /**
     * Hides all other objects except the given one.
     */
    hideOtherObjects(object: THREE.Object3D): void;
    /**
     * Sets a model's visibility.
     */
    setModelVisible(modelId: string, visible: boolean): void;
    /**
     * Sets all models' visibility.
     */
    setModelsVisible(visible: boolean): void;
    /**
     * Enables a model's outline.
     */
    enableModelOutline(modelId: string, enable: boolean): void;
    /**
     * Enables all models' outline.
     */
    enableModelsOutline(enable: boolean): void;
    /**
     * Highlights an object.
     * TODO: support merged object and InstancedMesh
     */
    setObjectHighlight(object: THREE.Object3D): void;
    /**
     * Gets highlighted object.
     */
    getHighlightedObject(): THREE.Object3D | undefined;
    clearHighlight(): void;
    /**
     * Adds an object to the current selection set (multi-select).
     * Does not clear existing selection.
     * We may allow to add invisible object to selection!
     */
    addObjectToSelection(object: THREE.Object3D): void;
    /** Removes an object from current selection set (multi-select). */
    removeObjectFromSelection(object: THREE.Object3D): void;
    /** Returns a shallow copy of current selection set (multi-select). */
    getSelectedObjects(): THREE.Object3D[];
    /** True when {@link object} is in the current selection set. */
    isObjectSelected(object: THREE.Object3D): boolean;
    setDoubleSidedMaterials(): void;
    revertDoubleSidedMaterials(): void;
    clearSelection(): void;
    /** True when the user has an active pick selection (independent of the current cursor hit). */
    hasSelectedObject(): boolean;
    /**
     * Gets if selection is enabled.
     */
    get enableSelection(): boolean;
    /**
     * Sets if selection is enabled.
     */
    set enableSelection(enable: boolean);
    /**
     * Checks if there is any visible object.
     */
    hasVisibleObject(): boolean;
    /**
     * Checks if there is any invisible object.
     */
    hasInvisibleObject(): boolean;
    enableSsao(enable: boolean): void;
    getSsaoEnabled(): boolean;
    setEnvironmentData(data?: Uint16Array): Promise<void>;
    setEnvironment(hdrUrl: string): Promise<void>;
    showVertexNormals(show: boolean, size?: number): void;
    getLights(): {
        sun: THREE.DirectionalLight;
        ambient: THREE.Object3D<THREE.Object3DEventMap> | undefined;
        hemisphere: THREE.Object3D<THREE.Object3DEventMap> | undefined;
    };
    debugLights(enable: boolean): void;
    setModelClipPlanes(modelId: number, planes: THREE.Plane[]): void;
    setGlobalClipPlanes(planes: THREE.Plane[]): void;
    /**
     * Generates "uv1" for specified mesh or all meshes in this model. "uv1" is useful for lightmap.
     */
    generateSmartUv1(object?: THREE.Object3D): void;
    resize(): void;
    /**
     * Optional callbacks for transform gizmo drag lifecycle (e.g. disable camera navigation while dragging).
     */
    setTransformGizmoCallbacks(callbacks: TransformGizmoCallbacks): void;
    private getOrCreateTransformGizmo;
    /**
     * Lazily created transform gizmo instance, if any operation has run.
     */
    getTransformGizmo(): TransformGizmo | undefined;
    attachTransformGizmo(object: THREE.Object3D): void;
    /**
     * Notifies the viewer that an object's transform was changed externally
     * (e.g. Property panel input fields): invalidates model bbox cache,
     * re-tunes camera near/far and orbit distances, and refreshes gizmo handles.
     */
    notifyObjectTransformed(object: THREE.Object3D): void;
    /**
     * Repositions transform gizmo handles when the attached object was moved from outside the gizmo
     * (e.g. Property panel transform fields).
     */
    refreshTransformGizmo(): void;
    detachTransformGizmo(): void;
    setTransformMode(mode: TransformMode): void;
    getTransformMode(): TransformMode;
    setTransformSpace(space: CoordinateSpace): void;
    getTransformSpace(): CoordinateSpace | undefined;
    /**
     * Whether scene graph editing is allowed (delete, future copy/paste/undo).
     * Controlled by {@link Viewer3dConfig.enableSceneEditing}; false for view-only embeds.
     */
    get enableSceneEditing(): boolean;
    /**
     * Removes a node from the loaded scene (whole model or a subtree node).
     * No-op when {@link enableSceneEditing} is false.
     * Dispatches {@link ViewerEvent.SceneObjectRemoved}; whole-model removal also fires {@link ViewerEvent.ModelRemove}.
     */
    /**
     * Finds an object in loaded models by {@link THREE.Object3D.uuid}.
     */
    findSceneObjectByUuid(uuid: string): THREE.Object3D | undefined;
    /**
     * Re-inserts a subtree previously removed (undo delete). No-op when editing is disabled.
     */
    insertSceneNode(snapshot: {
        detachedClone: THREE.Object3D;
        parentUuid: string;
        childIndex: number;
    }): boolean;
    /**
     * Applies local transform for undo/redo of gizmo or property edits.
     */
    applySceneObjectTransform(state: {
        objectUuid: string;
        position: THREE.Vector3;
        rotation: THREE.Euler;
        scale: THREE.Vector3;
    }): boolean;
    removeSceneObject(object: THREE.Object3D): boolean;
    destroy(): void;
}
