import PlannerElementData from '../../../model/Planner/PlannerElementData';
import DockingPoint from '../../../model/Planner/DockingPoint';
import { DockingpointSvgLine } from '../../../interface/Planner/DockingPointDataType';
import { PlannerConfigParams } from '../../../model/Catalog/CatalogData';
/**
 * This class is used like a service.
 * It handles different actions on planner Elements and its docking Points
 */
declare class DockingPointHandler {
    /**
     * This function returns the rotation of a vector that is specified by two positions in the 2 Dim Space
     * The rotation is 0 when the Vector is pointing downwards (pos1 is directly above pos2). The rotation is then computed clockwise
     * The result is resturned in degrees
     * @param pos1 2 Dimensional position
     * @param pos2 2 Dimensional position
     */
    private getRotOfDP;
    private getReferenceDPType;
    sortDockingPoints(dir: 'LEFT_TO_RIGHT' | 'RIGHT_TO_LEFT', dockingPoints: DockingPoint[]): DockingPoint[];
    /**
     * Check if the docking Points Filter match for the two elements.
     * @param plannerElement1
     * @param plannerElement2
     */
    private checkDPAVLFilterDoMatch;
    private checkDPAVRFilterDoMatch;
    /**
     * This function checks if two docking Points can be docked
     */
    private checkDPsDoMatch;
    /**
     * This function assumes that the two docking points are matching and can be docked
     * @param dp1
     * @param dp2
     */
    private doDock;
    initDockingPointsFromSvg(plannerElement: PlannerElementData, dockingVectors: DockingpointSvgLine[], minBorderSVG: {
        svgMinXVal: number;
        svgMinYVal: number;
    }, plannerconfig: PlannerConfigParams): void;
    /**
     * This function removes all docking Point relations from the Element .
     * It removes them as well in the docked elements.
     * This function is used when deleting a plannerElement
     * @param plannerElement
     */
    removeDockingPointRelations(plannerElement: PlannerElementData): void;
    /**
     * This function removes all docking Point relations with the type from the Element .
     * It removes them as well in the docked elements.
     * This function is used when deleting a plannerElement
     * @param plannerElement
     * @param dpTypeList    The Type of the docking Point like AVL or AVR
     */
    removeDockingPointRelationsByType(plannerElement: PlannerElementData, dpTypeList: string[]): number[];
    /**
     * This function returns a list of docking points that are dockable to the source Planner Element. The function only returns docking Points that lay within a specific area.
     *
     * @param sourceElement
     * @param targetElements
     * @param autoDockingDistance   //gibt die distance an in der er automatisch snappen muss. Infinity _> Docke überall. 0 Docke nie
     * @returns saves dockable dockingpoints per type with the distance
     */
    searchDockableElementsInArea(sourceElement: PlannerElementData, targetElements: PlannerElementData[], autoDockingDistance: number): Map<string, {
        sourceDP: DockingPoint;
        targetDP: DockingPoint;
        distance: number;
    }>;
    /**
     * This function tries to dock an element sourcePlannerElement to one element in the targetElements
     * @param sourcePlannerElement  the element that must be docked
     * @param sourceDPType  the type of the element that must be docked
     * @param targetElements    the target Element on which the element should be docked
     * the function returns true when the Element is docked
     */
    tryDockElement(sourcePlannerElement: PlannerElementData, sourceDPType: string, targetElements: PlannerElementData[]): any;
    /**
     * This function tries to dock an element sourcePlannerElement to the targetElement and a specific DockingPoint of the targetElement
     * @param sourcePlannerElement  the element that must be docked
     * @param sourceDPType  the type of the element that must be docked
     * @param targetElements    the target Element on which the element should be docked
     * the function returns true when the Element is docked
     */
    tryDockElementToDP(sourcePlannerElement: PlannerElementData, targetElement: PlannerElementData, targetDP: DockingPoint): any;
    /**
     * This function tries to dock an element sourcePlannerElement to the targetElement and a specific DockingPoint of the targetElement
     * @param sourcePlannerElement  the element that must be docked
     * @param sourceDPType  the type of the element that must be docked
     * @param sourceDP      The source DP
     * @param targetElements    the target Element on which the element should be docked
     * the function returns true when the Element is docked
     */
    tryDockElementDPToDP(sourcePlannerElement: PlannerElementData, targetElement: PlannerElementData, sourceDP: DockingPoint, targetDP: DockingPoint): any;
    /**
     * this function updates the dockingPoint relations. It is called after reloading one or more SVGs (StretchAreas / SVG Tausch) . For example when changing the ArmRests of
     * two docking sofas - the old docking information is saved in the plannerElement. The new DockingPoints must be updated based on the previous docking information.
     * @param plannerElements
     * @returns returns the list of all Articles that have lost their dockingPoint relations
     */
    updateDockingRelations(plannerElements: Map<number, PlannerElementData>): PlannerElementData[];
    /**
     * This function is used when initialiazing a planning. In the old planner we do only know that a docking point of a specific kind (AVL) of the source Element docks with any docking Point of the targetPlannerElement.
     * If there is only one target docking Point in the reference object - dock to that. However, when looking at AVOs, there can be that the target element has two AVUs. In this case search the docking point that is the neares.
     * @param sourcePlannerElement
     * @param targetPlannerElement
     * @param sourceDPType  The type of the dockingPoint
     */
    initDockingPointRelationByArea(sourcePlannerElement: PlannerElementData, targetPlannerElement: PlannerElementData, sourceDPType: string): void;
    /**
     * This function returns true if the two elements are docking. False if they are not
     * @param element1
     * @param element2
     */
    checkElementsAreDocking(element1: PlannerElementData, element2: PlannerElementData): boolean;
}
declare const dockingPointHandlerInst: DockingPointHandler;
export default dockingPointHandlerInst;
//# sourceMappingURL=DockingPointHandler.d.ts.map