import { default as CxPopup } from '../../../atoms/src/components/popup/popup.ts';
import { default as CxSpinner } from '../../../atoms/src/components/spinner/spinner.ts';
import { default as CortexElement } from '../../../base/src/cortex-element.ts';
import { CSSResultGroup, TemplateResult } from 'lit';
import { default as Cx3dViewerConfig } from './components/3d-viewer-config/3d-viewer-config';
import { default as Cx3dViewerControl } from './components/3d-viewer-control/3d-viewer-control';

/**
 * A comprehensive 3D model viewer component built with Babylon.js.
 * Supports GLB/GLTF models with animations, material variants, and interactive controls.
 *
 * Features:
 * - Model loading with automatic discovery of variants and animations
 * - Interactive control bar with environment, variant, and animation controls
 * - Scene effects: grid, shadows, textures, wireframe toggles
 * - Animation playback controls with seek functionality
 * - Fullscreen mode with integrated Babylon.js inspector
 * - WebGPU support for enhanced performance
 *
 * @example
 * ```html
 * <cx-3d-viewer
 *   src="model.glb"
 *   auto-rotate
 *   use-webgpu
 *   inspector>
 * </cx-3d-viewer>
 * ```
 */
export default class Cx3dViewer extends CortexElement {
    static readonly styles: CSSResultGroup;
    static readonly dependencies: {
        'cx-3d-menu-config': typeof Cx3dViewerConfig;
        'cx-3d-menu-control': typeof Cx3dViewerControl;
        'cx-popup': typeof CxPopup;
        'cx-spinner': typeof CxSpinner;
    };
    /** Canvas element for Babylon.js rendering */
    private readonly renderCanvas;
    private readonly controlComponent;
    readonly viewer: HTMLDivElement;
    /** URL of the 3D model to load (GLB/GLTF format) */
    src?: string;
    /** Width of the viewer (default: 400px) */
    width: number;
    /** Height of the viewer (default: 300px) */
    height: number;
    /** Enable automatic camera rotation around the model */
    autoRotate: boolean;
    /** Show Babylon.js inspector on load */
    showInspector: boolean;
    /** Use WebGPU instead of WebGL for rendering (experimental) */
    useWebGPU: boolean;
    canViewAR: boolean;
    /** Show the "Inspect in fullscreen" entry in the settings menu */
    canUseInspector: boolean;
    /** Core controllers for different aspects of the 3D scene */
    private sceneController;
    private cameraController;
    private lightingController;
    private modelLoader;
    private sceneEffects;
    private animationController;
    /** The main Babylon.js scene instance */
    private scene;
    private showHotspotsMenu;
    private showGrid;
    private showShadows;
    private showTextures;
    private showWireframe;
    private selectedSpeed;
    private isAnimationPlaying;
    private animationProgress;
    private currentTime;
    private totalTime;
    private currentAnimationGroup;
    isModelLoaded: boolean;
    isFullscreen: boolean;
    private inspectorInitialized;
    private mouseDownPosition;
    /** Model variants discovered from loaded GLB/GLTF file */
    private availableVariants;
    private availableEnvironments;
    /** Animations discovered from loaded GLB/GLTF file */
    private availableAnimations;
    /** Scene cameras discovered from GLB file */
    private availableSceneCameras;
    private availableSpeedRatios;
    /** All camera names including viewer camera */
    private allCameraNames;
    private hasAnimation;
    private activeEnvironment;
    private activeVariant;
    private selectedAnimation;
    private gridLoading;
    private inspectorLoading;
    private blobUrl;
    constructor();
    connectedUpdatedCallback(): void;
    /**
     * Lit lifecycle: Called when element is removed from DOM.
     * Ensures proper cleanup of Babylon.js resources.
     */
    disconnectedCallback(): void;
    loadBabylon(): Promise<any>;
    loadInspector(): Promise<void>;
    /**
     * Initializes the Babylon.js engine and scene.
     * Sets up WebGL/WebGPU context and begins model loading if src is provided.
     */
    initEngine(): Promise<void>;
    /**
     * Loads a 3D model from the specified URL.
     * Supports GLB and GLTF formats with automatic asset discovery.
     *
     * @param url - URL of the model file to load
     */
    private loadModel;
    /**
     * Called after a model is successfully loaded.
     * Initializes all managers, discovers model features, and sets up the scene.
     */
    private onSceneLoaded;
    /**
     * Properly disposes of all Babylon.js resources to prevent memory leaks.
     * Called when the component is removed from the DOM.
     */
    private dispose;
    /** Toggles hotspots menu visibility, closes other menus */
    /**
     * Selects a new environment/skybox and applies it to the scene.
     *
     */
    private handleEnvironmentSelect;
    /**
     * Selects a material variant and applies it to the model.
     * Also refreshes texture and wireframe states to ensure consistency.
     *
     */
    private handleVariantSelect;
    /**
     * Selects and plays an animation from the model.
     * Updates the animation controller to track playback state.
     */
    private handleAnimationSelect;
    /** Select speed ratio for animation playback */
    private handleSpeedSelect;
    /**
     * Scene effect toggle methods
     */
    /** Toggles grid visibility */
    private toggleGrid;
    /** Toggles shadow rendering */
    private toggleShadows;
    /** Toggles texture visibility on materials */
    private toggleTextures;
    /** Toggles wireframe rendering mode */
    private toggleWireframe;
    /**
     * Animation playback control methods
     */
    /** Toggles animation play/pause state */
    handlePlayButtonToggle(): void;
    /**
     * Seeks animation to a specific progress position.
     *
     * @param event - Input event from the seek slider
     */
    private handleAnimationSeek;
    /**
     * Sync component state with AnimationController
     */
    private syncAnimationState;
    /**
     * Camera switching methods
     */
    /** Switches to a scene camera or viewer camera */
    private handleResetPositionClick;
    /**
     * Toggles fullscreen mode and manages inspector visibility.
     * Inspector is automatically shown in fullscreen mode for debugging.
     */
    private handleInspectInFullScreen;
    private handleFullScreen;
    private handleReplayClick;
    /** Receive name and call corresponding toggle function */
    private handleSwitchToggle;
    private handleSelectEvent;
    private handleMouseDown;
    private handleMouseUp;
    private handleKeydown;
    handleFullscreenChange(): void;
    handleShowInspectorChange(): void;
    /**
     * Lit render method: Generates the component's HTML template.
     * Includes floating menu, animation controls, and canvas element.
     */
    render(): TemplateResult;
}
declare global {
    interface HTMLElementTagNameMap {
        'cx-3d-viewer': Cx3dViewer;
    }
}
