import { ComposerScript, SceneActionsExecutor } from '../Components/ActionExecutor/SceneActionExecutor';
import { MeshLocationsManager } from '../Components/CollapseExplode/MeshLocationsManager';
import { SceneDesignManager } from '../Components/DesignManagers/SceneDesignManager';
import { EnvironmentManager } from '../Components/Environment/EnvironmentManager';
import { GlowManager } from '../Components/Glow/GlowManager';
import { InfoPointContentHiddenListener, InfoPointContentShownListener, InfoPointPickedEventListener, InfoPointsManager, InfoPointsManagerStyle } from '../Components/InfoPointsManager/InfoPointsManager';
import { SceneHelper } from '../Components/SceneHelper';
import { IDisposable } from '../Interfaces/IDisposable';
import { Nullable } from '../types';
export type GroupPickedEventArgs = {
    groupID: number;
};
export type GroupPickedEventListener = (evt: GroupPickedEventArgs) => void;
export type FocusAttributesEventArgs = {
    groups: {
        groupId: number;
        visibleAttributes: number[];
        hiddenAttributes: number[];
    }[];
};
export type FocusAttributesEventListener = (evt: FocusAttributesEventArgs) => void;
export type ShowResizableCanvasEventArgs = {
    colorId: number;
    sideIds: number[];
    width: number;
    height: number;
    depth: number;
    borderRadius: number;
    type: 'colored' | 'mirrored';
    borderColor: string;
    columns: number;
    rows: number;
};
export type ArFileFormat = 'usdz' | 'glTF' | 'glb';
export declare enum BroadcastChannelEventType {
    CameraMovement = "camera-movement",
    ScriptExecution = "script-execution",
    DesignChanged = "design-changed"
}
export type DracoDecodingResult = {
    indices?: BABYLON.IndicesArray;
    positions?: BABYLON.FloatArray;
    normals?: BABYLON.FloatArray;
    uvs?: BABYLON.FloatArray;
    uvs2?: BABYLON.FloatArray;
};
export type DracoDecodingCallback = (result: DracoDecodingResult) => void;
export type SceneViewerOptions = {
    configPreview: boolean;
    defaultBackgroundColor?: string;
    showGround?: boolean;
};
export declare class SceneViewer implements IDisposable {
    protected _zkScene: Nullable<Zakeke.Scene>;
    protected _zkModel: Nullable<MPlaza.Model>;
    protected _canvasID: string;
    protected _canvas: Nullable<HTMLCanvasElement>;
    protected _domElement: Nullable<HTMLElement>;
    private _lastWidth;
    private _lastHeight;
    protected _engine: Nullable<BABYLON.Engine>;
    protected _scene: Nullable<BABYLON.Scene>;
    private _bindedResize;
    private _elementSelector;
    protected _sceneHelper: Nullable<SceneHelper>;
    protected _environmentManager: Nullable<EnvironmentManager>;
    protected _glowManager: Nullable<GlowManager>;
    protected _sceneActionsExecutor: Nullable<SceneActionsExecutor>;
    private _renderingNeeded;
    private _renderingPaused;
    protected _autoRender: boolean;
    protected _antialias: boolean;
    protected _postProcesses: BABYLON.PostProcess[];
    protected _camera: Nullable<BABYLON.Camera>;
    protected _hemiLight: Nullable<BABYLON.HemisphericLight>;
    protected _pointLight: Nullable<BABYLON.PointLight>;
    protected _highlightColor: string;
    protected _highlightSize: number;
    protected _highlightLayer: Nullable<BABYLON.HighlightLayer>;
    protected _highlightBlurHorizontalSize: number;
    protected _highlightBlurVerticalSize: number;
    protected _highlightAnimationID: Nullable<number>;
    protected _highlightCurrentMeshes: BABYLON.AbstractMesh[];
    protected _highlightNextMeshes: BABYLON.AbstractMesh[];
    protected _deviceType: MPlaza.DeviceType;
    private _destroyed;
    protected _sceneDesignManager: Nullable<SceneDesignManager>;
    protected _meshLocationsManager: Nullable<MeshLocationsManager>;
    private _groupPickedListeners;
    private _focusAttributesListeners;
    private _designNotifyMessageListeners;
    private _designRemoveMessageListeners;
    private _designEventMessages;
    private _onDelayLoadingStart;
    private _onDelayLoadingProgress;
    private _onDelayLoadingSuccess;
    private _onDelayLoadingError;
    private _infoPointPickedListeners;
    private _infoPointContentShownListeners;
    private _infoPointContentHiddenListeners;
    private _beginAssetsLoadingListeners;
    private _endAssetsLoadingListeners;
    private _nextSceneMeshesLoadedListeners;
    private _nextSceneTexturesLoadedListeners;
    private _beginSceneLoadingListeners;
    private _endSceneLoadingListeners;
    private _arFileUrls;
    private _designTextureResolution;
    private _configPreview;
    private _defaultBackgroundColor;
    private _grids;
    private _dracoCompression;
    protected _infoPointsManager: Nullable<InfoPointsManager>;
    protected _infoPointsManagerStyle: Nullable<InfoPointsManagerStyle>;
    protected _canShowInfoPoints: boolean;
    protected _canShowInfoPointsContent: boolean;
    private _broadcastChannel;
    private _isHologramSource;
    private _isHologram;
    private _lastResizableMeshID;
    private _brandLogoButton;
    private _advancedTexture;
    private _performanceInfo;
    private _currentRotation;
    private _isRotating;
    get zkScene(): Nullable<Zakeke.Scene>;
    get zkModel(): Nullable<MPlaza.Model>;
    get canvas(): Nullable<HTMLCanvasElement>;
    get engine(): Nullable<BABYLON.Engine>;
    get scene(): Nullable<BABYLON.Scene>;
    get autoRender(): boolean;
    set autoRender(value: boolean);
    get antialias(): boolean;
    set antialias(value: boolean);
    get isLowEndDevice(): boolean | null;
    get isHologramSource(): boolean;
    set isHologramSource(value: boolean);
    get isHologram(): boolean;
    set isHologram(value: boolean);
    getAntialiasEnabled(): boolean;
    setAntialiasEnabled(value: boolean): void;
    getARScale(): boolean;
    setARScale(value: boolean): void;
    getUseMaterialOffloading(): boolean;
    setUseMaterialOffloading(value: boolean): void;
    getPrefetchMeshes(): boolean;
    setPrefetchMeshes(value: boolean): void;
    getPrefetchMaterials(): boolean;
    setPrefetchMaterials(value: boolean): void;
    getShowHideInfoPoints(): boolean;
    setShowHideInfoPoints(value: boolean): void;
    get camera(): Nullable<BABYLON.Camera>;
    get deviceType(): MPlaza.DeviceType;
    set deviceType(value: MPlaza.DeviceType);
    getDeviceType(): MPlaza.DeviceType;
    get highlightColor(): string;
    set highlightColor(value: string);
    get highlightSize(): number;
    set highlightSize(value: number);
    get destroyed(): boolean;
    get onDelayLoadingStart(): Nullable<(evt: any) => void>;
    set onDelayLoadingStart(callback: Nullable<(evt: any) => void>);
    get onDelayLoadingProgress(): Nullable<(evt: any) => void>;
    set onDelayLoadingProgress(callback: Nullable<(evt: any) => void>);
    get onDelayLoadingSuccess(): Nullable<(evt: any) => void>;
    set onDelayLoadingSuccess(callback: Nullable<(evt: any) => void>);
    get onDelayLoadingError(): Nullable<(evt: any) => void>;
    set onDelayLoadingError(callback: Nullable<(evt: any) => void>);
    private get dracoCompression();
    get infoPointsShown(): boolean;
    get infoPointsManagerStyle(): Nullable<InfoPointsManagerStyle>;
    set infoPointsManagerStyle(style: Nullable<InfoPointsManagerStyle>);
    get canShowInfoPoints(): boolean;
    set canShowInfoPoints(value: boolean);
    get canShowInfoPointsContent(): boolean;
    set canShowInfoPointsContent(value: boolean);
    protected constructor(options?: SceneViewerOptions | boolean);
    static createSceneViewerAsync(options?: SceneViewerOptions | boolean): Promise<SceneViewer>;
    dispose(): void;
    setCameraLocked: (isBlocked?: boolean) => void;
    protected initAsync(): Promise<void>;
    protected init3DEngineAsync(): Promise<void>;
    protected createCanvas(): HTMLCanvasElement;
    private removeCanvas;
    private deleteEngine;
    protected deleteScene(): void;
    protected deleteComponents(): void;
    private disposeInfoPointsManager;
    protected disposePostProcesses(): void;
    protected emptyArFileCache(): void;
    resetSceneAsync(): Promise<void>;
    private closeBroadcastChannel;
    private openBroadcastChannel;
    private getOrCreateBroadcastChannel;
    protected createEngine(): void;
    createBrandLogoButton(): BABYLON.GUI.Button;
    createEmptySceneAsync(): Promise<void>;
    protected setupSceneAsync(): Promise<void>;
    onBeforeRender(): void;
    render(): void;
    protected checkRendering(): void;
    private resetPerformanceInfo;
    private checkPerformance;
    protected setupAntialiasPostProcesses(): void;
    protected createAntialiasPostProcesses(): void;
    protected canEnableAntialiasing(): boolean;
    protected enableAntialiasing(): void;
    protected disableAntialiasing(clearPostProcessed?: boolean): void;
    setRenderingNeeded(): void;
    setLongRenderingNeeded(): void;
    refreshRendering(): void;
    pauseRendering(): void;
    resumeRendering(): void;
    setLoadingScreen(loadingScreen: BABYLON.ILoadingScreen): void;
    private setRenderingOnDelayLoaded;
    protected createHighlightLayer(): void;
    protected setupHighlightLayerIntensity(): void;
    protected updateHighlightLayerExcludedDesignMeshes(): void;
    protected createDOMElement(): void;
    protected removeDomElement(): void;
    appendTo(element: HTMLElement): void;
    detach(): void;
    updateView(): void;
    protected resize(): void;
    switchFullScreen(parent: any): void;
    protected setupGlowManager(): void;
    protected setupSceneActionsExecutorAsync(): Promise<void>;
    restoreCameraState(): void;
    protected fixEnvironmentTexture(): void;
    checkSceneEmptyEnvironmentTexture(): void;
    protected setDefaultSceneEnvironmentTexture(): void;
    protected setSceneEnvironmentTexture(url: string, rotationY?: number, extensions?: string[], files?: string[], onLoad?: () => void): void;
    loadSceneFromModelAsync(zkModel: Nullable<MPlaza.Model>, zkScene: Zakeke.Scene, onProgress?: Nullable<(event: BABYLON.ISceneLoaderProgressEvent) => void>): Promise<void>;
    loadSceneFromModelDataAsync(zkModel: Nullable<MPlaza.Model>, zkScene: Zakeke.Scene, sceneJson: string, onProgress?: Nullable<(event: BABYLON.ISceneLoaderProgressEvent) => void>): Promise<void>;
    protected preSceneFileLoading(): void;
    protected postSceneFileLoading(): void;
    loadSceneFromRemoteFilesAsync(rootUrl: string, sceneFileName: string, onProgress?: Nullable<(event: BABYLON.ISceneLoaderProgressEvent) => void>): Promise<void>;
    getSkyboxTexture(): Nullable<BABYLON.BaseTexture> | undefined;
    loadSceneFromRemoteFilesAsync_OLD(rootUrl: string, sceneFileName: string, onProgress?: Nullable<(event: BABYLON.ISceneLoaderProgressEvent) => void>): Promise<void>;
    protected checkSceneShaderMaterials(zkScene: Zakeke.Scene): void;
    protected checkShaderMaterial(zkMaterial: Zakeke.Material): void;
    protected setupShadersStore(shaderInfo: {
        name: string;
        vertex: string;
        fragment: string;
    }): void;
    isRealMesh(mesh: any): boolean;
    countSceneMeshes(): number;
    getVisibleMeshes(): BABYLON.AbstractMesh[];
    getSceneBoundingInfo(): Nullable<BABYLON.BoundingInfo>;
    selectMesh(id: string): void;
    unselectMesh(id: string): void;
    unselectAllMeshes(): void;
    selectUnselectMesh(id: string, select: boolean): void;
    selectSingleMesh(mesh: BABYLON.AbstractMesh): void;
    unselectSingleMesh(mesh: BABYLON.AbstractMesh): void;
    selectMeshesWithMaterial(materialID: string): void;
    unselectMeshesWithMaterial(materialID: string): void;
    selectUnselectMeshesWithMaterial(materialID: string, select: boolean): void;
    protected onPointerDown(evt: BABYLON.IPointerEvent, pickInfo: BABYLON.PickingInfo): void;
    protected getSelectedRootMesh(): Nullable<BABYLON.AbstractMesh>;
    getMeshByID(id: string): Nullable<BABYLON.AbstractMesh>;
    getMeshByName(id: string): Nullable<BABYLON.AbstractMesh>;
    getMaterialByID(id: string): Nullable<BABYLON.Material>;
    setCameraLocation(locationID: string, onlyAngleOfView?: boolean, animate?: boolean): void;
    adjustCamera(animate?: boolean): void;
    zoomIn(): void;
    zoomOut(): void;
    zoom(perc: number): void;
    setCameraPivot(meshID: string | null | undefined): void;
    setCameraZoomEnabled(enabled: boolean): void;
    executeScriptAsync(script: ComposerScript): Promise<void>;
    executeActionsAsync(attributeID: Nullable<number>, selectedValue: Nullable<string>, actions: MPlaza.AttributeSceneAction[]): Promise<void>;
    prefetchMeshesForUnselectedOptionsAsync(actions: MPlaza.AttributeSceneAction[]): Promise<void>;
    prefetchDataForUnselectedOptionsAsync(actions: MPlaza.AttributeSceneAction[]): Promise<void>;
    refreshEnvironment(): void;
    highlightMeshes(meshes: BABYLON.AbstractMesh[]): void;
    highlightGroupForMesh(mesh: BABYLON.AbstractMesh): void;
    highlightGroupByID(groupID: number): void;
    highlightGroup(zkGroup: Nullable<MPlaza.AttributeGroup>): void;
    getGroupForMesh(mesh: BABYLON.AbstractMesh): Nullable<MPlaza.AttributeGroup>;
    highlightAttributeByID(attributeID: number): void;
    highlightAttribute(zkAttribute: Nullable<MPlaza.Attribute>): void;
    getVisibleHiddenAttributesForMesh(mesh: BABYLON.AbstractMesh): {
        groupId: number;
        visibleAttributes: number[];
        hiddenAttributes: number[];
    }[];
    protected fireGroupPickedEvent(e: GroupPickedEventArgs): void;
    addGroupPickedListener(listenerFunction: GroupPickedEventListener): void;
    protected fireFocusAttributesEvent(e: FocusAttributesEventArgs): void;
    addFocusAttributesListener(listenerFunction: FocusAttributesEventListener): void;
    addNotifyMessageListener(listener: (sideID: number, itemGuid: string, type: number, title: string, message: string, closable: boolean, requiredWidth: number, requiredHeight: number, addToCartDisabledIfVisible: boolean) => void): void;
    addRemoveMessageListener(listener: (sideID: number, itemGuid: string) => void): void;
    setEventMessages(eventMessages: any): void;
    addInfoPointPickedListener(listenerFunction: InfoPointPickedEventListener): void;
    addInfoPointContentShownListener(listenerFunction: InfoPointContentShownListener): void;
    addInfoPointContentHiddenListener(listenerFunction: InfoPointContentHiddenListener): void;
    addBeginAssetsLoadingListener(callback: () => void): void;
    private fireBeginAssetsLoadingEvent;
    addEndAssetsLoadingListener(callback: () => void): void;
    private fireEndAssetsLoadingEvent;
    addNextSceneMeshesLoadedListeners(callback: (meshLoaded: number, maxMeshes: number) => Promise<void>): void;
    private fireNextSceneMeshesLoadedEvent;
    addNextSceneTextureLoadedListeners(callback: (textureLoaded: number, maxTexture: number) => Promise<void>): void;
    private fireNextSceneTextureLoadedEvent;
    addBeginSceneLoadingListener(callback: () => void): void;
    private fireBeginSceneLoadingEvent;
    addEndSceneLoadingListener(callback: () => void): void;
    private fireEndSceneLoadingEvent;
    getSceneScreenshotAsync(width: number, height: number): Promise<Nullable<string>>;
    getSceneContentScreenshotAsync(width: any, height: any, padding?: number, zkDesign?: MPlaza.Design | null, legacyScreenshot?: boolean, camera?: Zakeke.SceneCameraLocation | null): Promise<Nullable<string>>;
    protected preSceneContentScreenshot(): void;
    protected postSceneContentScreenshot(): void;
    protected preSceneMaterialScreenshot(): void;
    protected postSceneMaterialScreenshot(): void;
    getMaterialScreenshotAsync(materialID: string, width: number, height: number): Promise<Nullable<string>>;
    clearListeners(): void;
    renderDesignAsync(zkDesign: MPlaza.Design, showDesign?: boolean): Promise<void>;
    resetDesign(): void;
    clearMeshDesignManagers(): void;
    refreshMeshesDesignAsync(meshes: Nullable<BABYLON.AbstractMesh[]>, effect: Nullable<MPlaza.ModelSceneMeshDesignEffect>): Promise<void>;
    refreshMeshDesignAsync(meshID: string, submeshID?: number, effect?: MPlaza.ModelSceneMeshDesignEffect): Promise<void>;
    setCustomizerGrids(grids: MPlaza.Grid[]): void;
    removeDesignItem(guid: string): void;
    addDesignItemText(settings: any, sideId: number): void | undefined;
    addDesignItemImage(imageID: number, sideId: number): Promise<void>;
    getDesignItemsInfo(): MPlaza.ItemInfo[];
    setDesignItemText(guid: string, text: string): void;
    setDesignItemBold(guid: string, bold: boolean): void;
    setDesignItemItalic(guid: string, italic: boolean): void;
    setDesignItemColor(guid: string, color: string): void;
    setDesignItemFontFamily(guid: string, fontFamily: string): void;
    setDesignItemImage(guid: string, image: MPlaza.Image): Promise<void>;
    setItemTextOnPath(guid: string, areaId: number, value: boolean): void;
    removeDesignItemImage(guid: string): void;
    setDesignVisibility(meshId: string, opacity: boolean): void;
    setupShaderMaterialsCameraPosition(): void;
    setupShaderMaterialCameraPosition(material: BABYLON.Material): void;
    setMeshLocation(locationID: string): void;
    explodeMeshes(): Promise<void>;
    collapseMeshes(): Promise<void>;
    dracoDecodingFunction(filename: string, fileBytes: ArrayBuffer, callback: DracoDecodingCallback): void;
    private decodeDracoFile;
    exportSceneToBabylon(): Nullable<string>;
    exportVisibleMeshesToBabylon(): Nullable<string>;
    exportMeshesForTyOnToBabylon(): Promise<Nullable<string>>;
    exportMeshToBabylon(meshID: string): Promise<Nullable<string>>;
    downloadMeshToBabylon(meshID: string): Promise<void>;
    saveSceneOnDatabaseAsync(fileId: string): Promise<void>;
    saveVisibleMeshesOnDatabaseAsync(fileId: string): Promise<void>;
    saveGlbOnDatabaseAsync(fileId: string): Promise<void>;
    private getArFileUrlCacheKey;
    private getCachedArFileUrl;
    private cacheArFileUrl;
    exportMeshToGLBBlob(meshID: string): Promise<Blob | null>;
    exportSceneToUsdzAsync(sceneID?: string, sceneCode?: string, useCacheWithDesign?: boolean): Promise<Nullable<string>>;
    loadFromGlbUrl(url: string, sceneConfig?: any): Promise<void>;
    exportMeshToUsdzAsync(meshID: string): Promise<Nullable<string>>;
    exportSceneToRemoteGlTFAsync(sceneID?: string, sceneCode?: string, useCacheWithDesign?: boolean): Promise<Nullable<string>>;
    exportMeshToRemoteGlTFAsync(meshID: string): Promise<Nullable<string>>;
    exportSceneToRemoteGLBAsync(sceneID?: string, sceneCode?: string, useCacheWithDesign?: boolean): Promise<Nullable<string>>;
    exportMeshToRemoteGLBAsync(meshID: string): Promise<Nullable<string>>;
    exportSceneToARAsync(): Promise<{
        format: string;
        arFileUrl: string;
    }[]>;
    exportMeshToARAsync(meshID: string): Promise<{
        format: string;
        arFileUrl: string;
    }[]>;
    isAREnabled(): boolean;
    exportSceneToLocalGLBAsync(): Promise<Blob | string | null>;
    downloadSceneLocalGLBAsync(): Promise<void>;
    exportSceneToLocalUSDZAsync(): Promise<string | null>;
    downloadSceneLocalUSDZAsync(): Promise<void>;
    getSceneRootUrl(): Promise<Nullable<string>>;
    isTryOnMeshVisibleEnabledToShow(): boolean;
    getTryOnMeshVisible(): BABYLON.Mesh | null;
    getTryOnFineTuningMeshVisible(): BABYLON.Mesh | null;
    refreshInfoPoints(): void;
    private getInfoPointsManagerStyle;
    private updateInfoPointsManagerStyle;
    showInfoPoints(): void;
    hideInfoPoints(): void;
    reloadAllLoadingErrorTexturesAsync(): Promise<void>;
    reloadMaterialLoadingErrorTexturesAsync(material: BABYLON.Material): Promise<void>;
    reloadLoadingErrorTextureAsync(texture: BABYLON.BaseTexture): Promise<void>;
    isTextureLoadingError(texture: BABYLON.BaseTexture): boolean;
    materialHasLoadingErrorTextues(material: BABYLON.Material): boolean;
    notifyCameraMovement(): void;
    notifyScriptExecution(script: ComposerScript): void;
    notifyDesignChanged(zkDesign: MPlaza.Design): void;
    protected notifyActionExecution(attributeID: Nullable<number>, selectedValue: Nullable<string>, actions: MPlaza.AttributeSceneAction[]): void;
    protected attachBroadcastChannelEventHandlers(): void;
    protected detachBroadcastChannelEventHandlers(): void;
    private onBroadcastMessageReceived;
    private processCameraMovementEvent;
    private processScriptExecution;
    private processDesignChanged;
    private showResizableCanvasModel;
    showResizableCanvasPerCurrentSide(args: ShowResizableCanvasEventArgs & {
        currentSideId: number;
    }): Promise<void>;
    showResizableCanvasPerVariant(args: ShowResizableCanvasEventArgs & {
        sidesIds: number[];
    }): Promise<void>;
    clearResizableProduct(): void;
    switchMode(mode: 'upload' | 'resizable'): void;
    rotate(angle: number, animate: boolean): Promise<void>;
}
