import { Vector3 } from '../../model/Planner/wcVectors';
import DivaStandardPlanner from './DivaStandardPlanner';
import DivaBoxPlanner from './BoxPlanner/DivaBoxPlanner';
import { ISavePlanner } from '../../interface/Planner/ISaveSetPlanner';
import DivaCatalogData from '../../model/Catalog/CatalogData';
import { Nav3DMode, Nav3DParams, ParamPlanPlannerElementInfo, ParamsAddPlannerElement, PlannerDeletionType, RenderRequestInfos, ReturnParamDeletePlannerElem } from '../../interface/FunctionTypes';
import { DockingPoint, PlannerMessageType, Rendering } from '../../';
import { ReturnParamUpdatePlanner, BboxInfo2D } from '../../interface/ReturnTypes';
import { AlternativeRendering } from '../../interface/Rendering/AlternativeRendering';
import { SetImageData } from '@crystaldesign/basket-model';
import { DockingType, PlannerBoundingBox } from '../../interface/Planner/DockingPointDataType';
import HQRenderScript from './Rendering/HQRenderScript';
import DivaSet, { InitSetsObject } from '../Set/DivaSet';
import { Hybrid3DInfo, Hybrid3DInfo_Camera } from './Rendering/types';
import { GeneralPlanningState, PlannerInteractionInformation } from '../../model/Planner/PlannerInteractionData';
import PlannerElementData from '@crystaldesign/web-planner-logic/model/Planner/PlannerElementData';
export interface PlannerHandlerFunctions {
    updateCamInfo?: (camInfo: any) => void;
    updatePlannerRendering?: (rendering: Rendering) => void;
    updatePlannerHqRenderScript?: (hqRenderscript: HQRenderScript) => void;
    setRotationOrbitCube?: ((forceOrbitTo: boolean, rotHori: number, rotVert: number) => void) | undefined;
    onRoomListLoaded?: () => void;
    doAllowSetPlanner: () => boolean;
    updatePlannerMsgContainer?: (codex: PlannerMessageType, doShowPlannerMsg: boolean, type: 'WARNING' | 'INFO', content: string, autoHide: boolean, timeoutDuration?: number) => void;
    getOrigConfiguration: () => {
        originDivaNr?: string | undefined;
        originArticleCodexes?: string[] | undefined;
        originCatalogCodex?: string | undefined;
    };
    clearAiImages?: () => void;
}
export type DivaPlanner = DivaStandardPlanner | DivaBoxPlanner;
export default class DivaPlannerHandler {
    private plannerList;
    private handler3D;
    private setPlannerHandler;
    private divaNr;
    private plannerHandlerFunctions;
    private plannerIDCount;
    constructor(onlyRunLogic: boolean);
    /**
     * This method is called when a new planning is started. This happens when a new Planning is started or a Planning is loaded.
     * @param divaNr The divaNr of the planning
     */
    initPlanner(initSetState: InitSetsObject, plannerHandlerFunctions: PlannerHandlerFunctions): Promise<void>;
    /**
     * This function updates the Planner. It is called after a configuration changed.
     * @returns it returns all elementIds that should be deleted
     */
    updatePlanner(setId: string, changedOPT: {
        [optCodex: string]: string;
    }, targetElementIds?: number[]): Promise<ReturnParamUpdatePlanner>;
    /**
     * This function is called when a product is added to a existing set
     * @param set
     * @param setPlanData
     */
    extendSet(set: DivaSet, setPlanData: string, lastSetToInitialize: boolean): Promise<boolean>;
    /**
     * This function is called to initialize a new Planner - SetPlandata is used to initialize it if a already existing planning is loaded.
     * If it is empty a empty Planner is init.
     * @param set
     * @param setPlanData
     */
    initSet(set: DivaSet, catalogData: DivaCatalogData, setPlanData?: string, lastSetToInitialize?: boolean): Promise<void>;
    private updateAllPlannerBBs;
    /**
     * This function returns a JSON Object of the whole planner Saving
     */
    savePlanner(setId: string): ISavePlanner | undefined;
    getDivaNr(): string;
    getSetBoundingBox(setId: string): PlannerBoundingBox;
    /**
     * This function returns the base 64 representation of the current displaying rendering
     * @param setId
     */
    getSetImageAsBase64(setId: string): string;
    /**
     * This function returns the rendering of the last saved rendering
     * @param setId
     */
    getSetRendering(setId: string): Promise<Rendering | undefined>;
    /**
     * This function returns the URL of the last saved rendering
     * @param setId
     */
    getSetImageAsUrl(setId: string): Promise<{
        url: string | undefined;
        dimensions: {
            w: number | undefined;
            h: number | undefined;
            d: number | undefined;
        };
    }>;
    getSetHQRenderScript(): HQRenderScript | undefined;
    /**
     * This function returns all lastsaved alternate Set Renderings as renderings
     * @param setId
     * @returns
     */
    getAlternateSetRenderings(setId: string): Promise<Rendering[]>;
    /**
     * returns the URLs of all saved alternate renderings
     * @param setId
     */
    getAlternateSetImagesAsSetImageData(setId: string): Promise<SetImageData[]>;
    saveSetHQRenderScript(): Promise<void>;
    saveSetImage(overwriteLastSavedRendering: boolean): Promise<boolean>;
    /**
     * This function makes shure that all alternate set images are saved
     * @param catCodex
     * @param catGUID
     * @returns
     */
    saveAlternateSetImages(catCodex: string, catGUID: string): Promise<boolean>;
    saveSet2DImage(catCodex: string, catGUID: string, planning2DAsJPGBase64: string): Promise<any>;
    saveAiImage(promptId: string, catCodex: string, catGUID: string, imageDataOrUrl: string): Promise<SetImageData>;
    /**
     * This function is called in order to destroy a planner. All elements are cleared all saved resources are cleared.
     * @param setId The setID the planner belongs to
     * @return Returns true when the planner was destroyed successfully
     */
    destroyPlanner(setId: string): boolean;
    /**
     * This function destroys all planner elements that are currently loaded.
     */
    destroyAllPlanner(): boolean;
    /**
     * This function is called in order to clear all renderings in the render cache
     */
    clearHandler3D(): void;
    addPlannerElement(setId: string, basketId: string, initParams: ParamsAddPlannerElement): Promise<PlannerElementData | undefined>;
    deletePlannerElement(setId: string, elementId: number, autoCorrectAVL_AVR?: boolean, deletionType?: PlannerDeletionType): Promise<ReturnParamDeletePlannerElem>;
    /**
     * This function gets all Elements that are copyied when copying one element.
     * @param setId
     * @param elementId
     * @param copyInfo
     */
    getPlannerElementsInfluencedByCopy(setId: string, elementId: number, copyInfo?: ParamPlanPlannerElementInfo): number[];
    /**
     * This function gets all Elements that are deleted when deleting one element.
     * @param setId
     * @param elementId
     */
    getPlannerElementsInfluencedByDeletion(setId: string, elementId: number, deletionType?: PlannerDeletionType): number[];
    /**
     * This function is used to move an element in the planner
     * @param setId
     * @param articleCopyRelation
     * @param copyInfo
     */
    movePlannerElements(setId: string, elementId: number, copyInfo: {
        x: number;
        y: number;
    }): Promise<void>;
    /**
     * This function is used to copy an element in the planner
     * @param setId
     * @param articleCopyRelation
     * @param copyInfo
     */
    copyPlannerElements(setId: string, articleCopyRelation: {
        key: number;
        value: string;
    }[], copyInfo?: ParamPlanPlannerElementInfo): Promise<void>;
    /**
     * This function is called when the planner Elements position or rotation are modified in the view.
     *@param setId              The set id of the planning
     * @param plannerElementID   This is the element ID of the planner Element that is changed.
     *@param deltaMove          This is the delta in centimeters the element was moved in each direction
     * @param deltaAngleDeg      This is the angle the element was rotated in degrees
     * @param doUpdate           This indicates if the element Should be updated with the new position. If false it can only be used to check if there are possible DockingPoints
     */
    updatePlannerTrans(setId: string, plannerElementID: number, deltaMove: Vector3, deltaAngleDeg: number, rotCorrection: number, transState: 'START' | 'UPDATE' | 'END', autoDockingDistance: number): boolean;
    getPlanningIsComplete(setId: string, forceCheck?: boolean): boolean;
    /**
     * This function returns the neighbor elements of a specific elements based on a given docking Type.
     * E.g. dockingType "AVR" returns the element that is docking to the AVR vector
     * @param setId   The current setId of the element
     * @param elementId   The elementId of the element
     * @param dockingType   The dockingType
     * @returns   An array of all elements indicated by the elementId
     */
    getNeighborElementIds(setId: string, elementId: number, dockingType: DockingType): number[];
    getFreeDockingPointsByElementId(setId: string, elementId: number, dockingType: DockingType): {
        dockingPoints: DockingPoint[];
        filter: string[];
    } | undefined;
    getDockedDockingPointsByElementId(setId: string, elementId: number, dockingTypes: DockingType[]): DockingPoint[];
    getDockedGroups(setId: string): number[][];
    getPlannerInteractionInformation(setId: string): PlannerInteractionInformation | undefined;
    getGeneralPlanningState(setId: string, selectedElementId?: number): GeneralPlanningState | undefined;
    handle3DVisualizationChanged(mode: Nav3DMode, params: Nav3DParams, doShow3DDimensionLines?: boolean, alternateRenderingsExist?: boolean): void;
    /**
     * This function returns all viewPlannerElements of all planner
     */
    getAllViewPlannerElements(): Map<string, PlannerElementData[]>;
    getStaticRoomListItems(): import("../../").StaticRoomDataType[];
    get2DViewPlannerBoundingBox(): BboxInfo2D;
    request3D(doRequestRendering: boolean, doRequestHqRenderScript: boolean, alternateRenderingsExist?: boolean, alternateRenderInfo?: AlternativeRendering, forceReloadPlanning?: boolean, renderRequestInfos?: RenderRequestInfos, hybrid3DInfo?: Hybrid3DInfo, useLatestHybridInfo?: boolean): Promise<{
        planningHash: string;
        renderHash: string;
    } | undefined>;
    /**
     * This function returns the Project (JSON) of the planning data of a specific set.
     * @param setId     Only contains planner Information of this set
     * @returns         The JSON of the planning data
     */
    getProject3D(setId?: string): string;
    /**
     * This function is called when the program only wants to update the view - it does not send the whole planning.
     * However, if no 3D Client has loaded the current planning the request has to be sent again and force to load the whole planning
     */
    noRenderClientFound: (doMakeRendering: boolean, doMakeHQRenderScript: boolean, width: number, height: number, isFullscreenRendering: boolean, planner3DGridEnabled: boolean, doShow3DDimensionLines: boolean, plannerMeasureDigits: number, alternateRendererInfo?: AlternativeRendering, alternateRenderingsExist?: boolean) => void;
    /**
     * This function creates the hash for the current PLANNING. It ignores viewpoint/rendering3D related aspects like size of the rendered image or the room it is displayed in.
     */
    private createPlanningHash;
    getAllPlanners(): DivaPlanner[];
    openARObserverConnection(handleNoHqrs: () => void): Promise<string>;
    updateCamPosition(cam: Hybrid3DInfo_Camera): void;
    clonePlannerHandler(set: DivaSet, origSet: DivaSet): DivaPlannerHandler;
}
//# sourceMappingURL=DivaPlannerHandler.d.ts.map