import PlannerElementData from '../../model/Planner/PlannerElementData';
import { Vector3 } from '../../model/Planner/wcVectors';
import DockingPoint from '../../model/Planner/DockingPoint';
import DivaSet from '../Set/DivaSet';
import { ISaveSetPlanner } from '../../interface/Planner/ISaveSetPlanner';
import BoundingBox from '../../model/Planner/BoundingBox';
import { ParamPlanPlannerElementInfo, ParamsAddPlannerElement, PlannerDeletionType, ReturnParamDeletePlannerElem } from '../../interface/FunctionTypes/index';
import { AlternativeRendering } from '../../interface/Rendering/AlternativeRendering';
import { ReturnParamUpdatePlanner } from '../../interface/ReturnTypes';
import { DockingType, PlannerBoundingBox } from '../../interface/Planner/DockingPointDataType';
import DivaCatalogData from '../../model/Catalog/CatalogData';
import { GeneralPlanningState, PlannerInteractionInformation } from '../../model/Planner/PlannerInteractionData';
export default class DivaStandardPlanner {
    private static readonly plannerType;
    private plannerID;
    private set;
    private plannerBoundingBox;
    private plannerElements;
    private doDisablePlanner2D;
    private plannerHasStaticBackground;
    private isIDM3DCat;
    private IDM3DCatCodex;
    private nextElementId;
    private collisionHandler;
    constructor(set: DivaSet, updatePlannerMsgContainer: any, plannerId: number, globalBoundingBox: BoundingBox, doDisablePlanner2D: boolean, plannerHasStaticBackground: boolean);
    /**
     * This function updates all position numbers of all planner elements.
     * The sorting of the position number depends on element chains. When Elements are docked via AVR and AVL - this is one chain.
     * The positioning starts with the chain with the smalles x.
     * The position of the accessoires are saved in a separate accPosNr.
     */
    private updatePlannerPosNr;
    /**
     * This function updates the world pos of a planner Element depending on the docking Point.
     * The docking Point contains all necessary information
     * @param plannerElement
     * @param dockingPoint
     */
    private updateWorldPos;
    /**
     * This function updates the position information of all elements. It is called after updating the SVG of 1 element.
     * The position is updated based on the posNr.
     * At the end - the collision is calculated
     */
    private updateAllElementsWorldPos;
    /**
     * this function tries to position a planner element to the current planner elements in the world.
     * If a element is selected it tries to dock the new planner Element to the selected planner element.
     * If additional a docking Point is selected - it only docks to the selected docking point.
     * If no element or DP is selected - it docks to the first free element.
     * @param plannerElement    The planner Element that is added to the planning scene
     * @param dockToElementId   A planner element the new plannerElement should be docked to.
     * @param docktToAVName     The AV Name of the dockToElement to dock.
     */
    private addElementToWorld;
    private tryToDockWithDifferentSVGWithFormula;
    private dockToAVUorAVOororAVNorAVSorAVC;
    private dockToAVLorAVR;
    getAllViewPlannerElements(): PlannerElementData[];
    getFreeDockingPointsByElementId(elementId: number, dockingType: DockingType): {
        dockingPoints: DockingPoint[];
        filter: string[];
    };
    getDockedDockingPointsByElementId(elementId: number, dockingTypes: DockingType[]): DockingPoint[];
    getNeighborElements(elementId: number, dockingType: DockingType): number[];
    /**
     * This function returns all grouped elements.
     * It contains also all Accessoires of the elements
     */
    getDockedGroups(): number[][];
    private getAccessoiresRecursive;
    getBoundingBox(): BoundingBox;
    initIDM3DMeta(IDM3DCatCodex: string | undefined): void;
    updatePlanner(): Promise<ReturnParamUpdatePlanner>;
    /**
     * This function extends one set. In order to position the new element correctly, use the information of the global Bounding box instead of the local bounding Box of the set.
     * @param setPlanData
     * @param globalBoundingBox
     */
    extendPlanner(setPlanData: string, globalBoundingBox: BoundingBox): Promise<void>;
    initPlanner(setPlanData: string): Promise<void>;
    private getPlannerElementByIndex;
    addPlannerElement(basketID: string, params: ParamsAddPlannerElement): Promise<void>;
    movePlannerElement(): void;
    /**
     * Handles copyying the planner Element. it can happen that also other planner elements are influenced
     * @param articleCopyRelation Holds the relation - which element with elementID is copyed and has a new Article. ElementToCopyID -> BasketID of new Article
     * @param params
     */
    copyPlannerElement(articleCopyRelation: {
        key: number;
        value: string;
    }[], copyInfo?: ParamPlanPlannerElementInfo): Promise<void>;
    /**
     * This function returns all Planner Elements that are influenced when deletingan element ID.
     * Forthe standard planner it is nothing.
     * @param elementId
     */
    getPlannerElementsInfluencedByDeletion(elementId: number, deletionType?: PlannerDeletionType): number[];
    getPlannerElementsInfluencedByCopy(elementId: number, copyInfo?: ParamPlanPlannerElementInfo): number[];
    /**
     * deletes a planner element
     * @param elementId     The elementId of the plannerelement.
     * @param autoCorrectAVL_AVR    If true the dockingpoints of the neighbor elements are tried to dock together. if a zwischenelement is deleted, the parents match again
     * @returns Returns the element id of the element that should be selected next
     */
    deletePlannerElement(elementId: number, autoCorrectAVL_AVR?: boolean): Promise<ReturnParamDeletePlannerElem>;
    /**
     * This functions tries to dock not docked accessories when another accessoire got deleted. Now check if a dockingpoint got freed
     * @param parent
     * @returns
     */
    private tryToDockForNotDockedAccessoire;
    /**
     *  This function calculates if any element collides with another element. It returns one or more collision pairs.
     * The result of the function is saved in the collisionHandler Variable.
     * Furthermore, this function informs the view if the collision has changed
     * @param calcCollisionPairs    If true, the collision with all elements is computed. If false - the algorithm stops when the first collision is detected
     * @param checkSingleElementId  If this parameter is set, the collision is only detected with this element
     */
    private checkCollision;
    /**
     * Updates the overall set posNr
     * @param startSetPosNr   Indicates the start PosNr for the planner
     * @returns The count of elements in this planner. Used to calculate the startSetPosNr for the next Planner
     */
    updateSetPosNr(startSetPosNr: number): number;
    /**
     * This function is called every time the transformation of a planner Element is changed in the view. For example when the user moves the 2D Shape around.
     * When it is the first action, all AVL and AVR docking Points are removed. When it is the last action "END" then the planner is updated an dockable docking points are searched.
     *
     * @param elementId
     * @param deltaMove
     * @param deltaAngleDeg
     * @param transState
     * @param autoDockingDistance    //Gibt an in welchem Radius automatisch gedockt werden muss
     */
    updatePlannerTrans(elementId: number, deltaMove: Vector3, deltaAngleDeg: number, rotCorrection: number, transState: 'START' | 'UPDATE' | 'END', autoDockingDistance: number): boolean;
    /**
     * Destroy all plannerinformation
     */
    destroyPlanner(): void;
    saveSetPlanner(): ISaveSetPlanner | null;
    getPlannerId(): number;
    getSetData(only3DCompatible: boolean, useSetPlanner: boolean, doShow3DDimensionLines: boolean, alternateRenderInfo?: AlternativeRendering): {
        constructionSet: any;
    };
    /**
     * This function returns the position information for each element. The infomration is returned as an object with elementId: posNr.
     */
    getElementPosInfo(): any;
    /**
     * Returns true if all AVL and AVR Filter are set. Specifies if a planning is complete
     */
    getPlanningIsComplete(forceCheck?: boolean): boolean;
    getPlannerBoundingBox(): PlannerBoundingBox;
    updatePlannerBoundingBox(): void;
    getCatalogData(): DivaCatalogData;
    private getAllPlannerElements;
    private getParentElement;
    /***Debug tools  */
    getPositionOfPlannerElements(): void;
    clonePlanner(set: DivaSet, plannerId: number): DivaStandardPlanner;
    getPlannerInteractionInformation(): PlannerInteractionInformation;
    getGeneralPlanningState(selectedElementId?: number): GeneralPlanningState;
}
//# sourceMappingURL=DivaStandardPlanner.d.ts.map