import { PlannerElementData, ViewPlannerConfig, Vector3, TabGroupTypes, PlannerPaletteViewDataType, BboxInfo2D } from '@crystaldesign/web-planner-logic';
import PlannerUIHandler from '../UI/PlannerUI';
import IViewPlanner2DGrid from './Interface/IViewPlanner2DGrid';
import SettingsState from '../../States/UIState/Settings';
export default class Planner2DGrid implements IViewPlanner2DGrid {
    private readonly autoDockingDistance;
    private readonly dimGroupWidthName;
    private readonly dimGroupHeightName;
    private canvas;
    private canvas2DGridID;
    private borderFactorHori;
    private borderFactorVert;
    private maxZoom;
    private deltaRotDeg;
    private inDragMode;
    private currZoomFactor;
    private currCenteringOffset;
    private zoomFactorBBoxDimLastFrame;
    private plannerPaletteViewInfo?;
    private settingsState;
    private getConfiguratorState;
    private updatePlannerTrans;
    private getPlannerElementById;
    private getPlannerViewConfig;
    private forceViewToEnterPlannerMode;
    constructor(getConfiguratorState: () => TabGroupTypes, getPlannerElementById: (setId: string, elementId: number) => PlannerElementData | undefined, getPlannerViewConfig: () => ViewPlannerConfig, forceViewToEnterPlannerMode: (doShowInfo: boolean) => void, plannerPaletteViewInfo: PlannerPaletteViewDataType | undefined, settingsState: SettingsState);
    /**
     * Method used for initializing the 3D Grid. All necessary document Elements are created.
     * @param updatePlannerTrans
     */
    initialize(updatePlannerTrans: (setId: string, plannerElementID: number, deltaMove: Vector3, deltaAngleDeg: number, rotCorrection: number, transState: 'START' | 'UPDATE' | 'END', autoDockingDistance: number) => void): void;
    /**
     * Clears the 2D Canvas of fabric. It clears both, User Interface elements and Fabric Shapes.
     */
    clearView(): void;
    /**
     * This function is called when the dragging of an element on the 2D Grid has started. If the configurator is not in planner mode - switch to planner mode.
     */
    /**
     *
     * This function is called when a drag start is detected. The whole system is set up to detect drag movement on a shape.
     */
    private onDragStarted;
    /**
     * This function is calledn when the Element is currently dragged on the 2D Grid.
     * The moving Information is updated in the logic
     * @param setId
     * @param elementId
     * @param deltaMoveOnScreen
     */
    private onDragMove;
    /**
     * This function is called when the Element has stopped being dragged
     * @param setId
     * @param elementId
     */
    private onDragEnd;
    /**
     * This function is called when clicking on a rotation button. This class knows how big is the angle to rotate the element.
     * It informs the plannerLogic to update the rotation of an element. The planner logic then informs the view with the new rotation value.
     * @param elementId     The element ID of the current selected Element
     * @param direction     The rotation direction
     */
    handleRotation(setId: string, elementId: number, direction: 'CLOCKWISE' | 'COUNTERCLOCKWISE'): void;
    /**
     * This function updates all userInterface elments on the 2D Grid.
     * The position Number is rendered, the dimension lines.
     * Furthermore, the trash icon and rotation icons for the current selected elements are rendered.
     * @param plannerElements
     * @param selectedElements
     * @param selectableElements
     * @param setAllElementsSelectable
     * @param selectedDP
     */
    updateUI(plannerUIHandler: PlannerUIHandler, allPlannerElementsDict: Map<string, PlannerElementData[]>, selectedElementsDict: Map<string, PlannerElementData[]>, selectableElementsDict: Map<string, PlannerElementData[]>, setAllElementsSelectable: boolean): void;
    /**
     * Returns the world corner to use for positioning UI elements.
     * @param plannerElement
     * @param useOltCorner  When true: OLT corner (for outline/draggable bbox with OLT dimensions).
     *                      When false: corner aligned with displayed shape (OLF when HasOLFPolygon, for posNr/trash/DPs).
     */
    private getWorldCorner;
    /**
     * This function adds a full transparent outline div Element over the fabric elements.
     * The function distinguishes between the outline of the current selected element and the rest.
     * The outline of the current selected element is draggable and the outline of the rest is selectable.
     * @param plannerElement    The current selected Element
     * @param isSelected
     */
    private addElemOutline;
    private getIconState;
    /**
     * Computes the position of the position number of the element.
     * @param plannerElement
     * @param elementIsSelected
     * @param elementIsSelectable
     */
    private addPosNrUI;
    /**
     *This function adds the trash symbol to the 2D planner
     * @param plannerElement    The current selected elemet.
     * @param screenPosPosNr    If the trash icon has to be placed over the posNum icon - this param holds all necessary information over the position and size of the posNum Icon
     */
    private addDelIcon;
    /**
     * This function is used to add the rotation icon to the 2D Grid.
     * @param plannerElement    The current selected planner Element
     * @param screenPosPosNr    The information of the position and size of the posNr Icon
     * @param screenPosTrashIcon    The information about position and size of the trash Icon
     */
    private addRotIcon;
    /**
     * This function adds all Docking Point user interfaces to the 2D Grid
     * @param plannerElement    The current selected planner element
     * @param selectedDP        This parameter is null when no DP is selected. If a DP is selected it is rendered in another optic.
     */
    private addDPUI;
    /**
     * This function computes the current zoom factor. This depends on the bounding box information of the current planning and its world position
     * @param boundingBox       The bounding box that holds size and position information of the planning
     */
    private calcZoomFactor;
    /**
     * This function corrects the background position of the 2D grid. It is important that the world point 0/0 is always on the same position on the 2D grid.
     */
    private correctBackgroundPos;
    /**
     * This function computes the correct position on the screen based on a world position
     * @param worldPos  The world Position in 2D
     */
    private worldPosToScreenPos;
    /**
     * This function computes the dimension lines in 2D (horizontal and vertical)
     * @param setGroup      Set Group that contains all fabricShapes
     * @param boundingBox   Size and position information of the whole planning
     */
    private drawDimensions;
    /**
     * This function is called in order to render the whole canvas with all planner shapes. First it cleans everything and then it updates everything.
     * @param plannerElements   All planner elements in the scene
     * @param boundingBox       The size and position information of the current planning
     */
    updatePlannerView(plannerUIHandler: PlannerUIHandler, plannerElementsDict: Map<string, PlannerElementData[]>, boundingBox: BboxInfo2D): void;
    resetSelectedElementsOnEnterPlannerMode: () => boolean;
    /**
     * Converts the current planning into a base64 JPG string
     */
    getContentAsJPG: () => string;
}
//# sourceMappingURL=Planner2DGrid.d.ts.map