import { ShelfAccessories3DValues } from '../../../interface/ShelfPlanner/ShelfPlanner3DValues';
import { ShelfAccessories, ShelfAccessoriesView } from '../../../interface/ShelfPlanner/ShelfAccessoiresView';
import ShelfPlannerData, { GridAllowOnCells, ShelfPlandata, TakePlaceOnOtherGrids } from '../../../interface/ShelfPlanner/plannerData';
import DivaArticle from '../../Article/DivaArticle';
import Grid, { ReturnTryFit } from './ShelfPlannerGrid';
export default class ShelfPlanner {
    private article;
    grids: Grid[];
    isVisible?: boolean;
    showOnRule?: string;
    showAfterOPT?: string;
    private data;
    private freeArticlesPossible;
    private freeArticlesPlanned;
    private gridAllowedOnCells?;
    private gridAllowedOntoArticles?;
    private takePlaceOnOtherGrids?;
    private disableCellsByElement?;
    private montageOptions;
    constructor(data: ShelfPlannerData, article: DivaArticle);
    /**
     *  init dictionary of all the accessoires that which can be free in theory
     */
    private initFreeArticles;
    get IsVisible(): boolean | undefined;
    /**
     * if the shelfplanner step was not visible but is visible again the initAcc get initialized but only if !this.article.shelfPlanData -> the shelfplanner get initialized from basket
     * if the shelfplanner step is no more visible delete all the accessoires
     * @param isVisible new value
     */
    setIsVisible(isVisible: boolean): Promise<void>;
    /**
     * if the config is changed and the grid gets new height / accessories a new grid gets created
     */
    onConfigChanged(variantValues: {
        [opt: string]: string;
    }): Promise<void>;
    private creatNewGrid;
    /**
     * runs through the InitAccArr and initialized all the accessoires eg: Kleiderstange gets placed
     * if the replaceFromParent == true it removed the same article from the parent shelfplanner if one is found  eg: Kleiderstange gets removed from schrank when the T-Sück gets initialized
     */
    initAccList(gridIndex?: number): Promise<void>;
    /**
     * finds all the accessoires of one grid by articleCodex
     * @param shelfId
     * @param articleCodex
     * @returns
     */
    getAccessorireByCodex(shelfId: string, articleCodex: string): DivaArticle[];
    triggerVisibility(gridGroup?: string): Promise<void>;
    deleteAllAcc(): Promise<void>;
    get GridAllowedOnCells(): GridAllowOnCells | undefined;
    get GridAllowedOntoArticles(): string[] | undefined;
    get TakePlaceOnOtherGrids(): TakePlaceOnOtherGrids | undefined;
    /**
     * its checked if the accessoire has place on a specific grid  on a specific cell
     * if the accessoire doesTakePlaceOnOtherGrids == true then we must check on the other grids aswell if there is place
     * @param gridIndex specific grid
     * @param cellIndex specific cell
     * @param accessoire
     * @returns
     */
    tryFitOnShelfOfGrid(gridIndex: number, cellIndex: number, accessoire: DivaArticle): ReturnTryFit | false;
    /**
     *
     * @param gridName
     * @param accessoire
     * @param excludeAccessoireInfluence for the drag and drop usecase we need to calc all the free grids with exluding the moving accessoire
     * @returns
     */
    getFreeSpacesOfAccessoireOfGrids(gridName: string, accessoire: DivaArticle): {
        [gridName: string]: {
            freeCells: number[];
            idx: number;
        };
    };
    getPlannedSpacesOfGrids(): {
        [gridName: string]: {
            accessories: ShelfAccessories[];
            idx: number;
        };
    };
    /**
     * delete specific accessoire in the grid
     * @param gridIndex
     * @param cellIndex
     * @returns
     */
    deleteAccessoireOfCellInGrid(gridIndex: number, cellIndex: number): Promise<DivaArticle | undefined>;
    /**
     * if the deleted accessoire was free (no price) check if another existing one can now become free
     * @param accessoire
     * @param gridIndex
     */
    private checkForNewFreeAccessoire;
    /**
     * clears all the placeholders of other grids if the accessorie TakePlaceOnOtherGrids == true
     * @param gridIndex
     * @param cellIndex
     * @param accessoire
     */
    private handleDeleteTakePlaceOnOtherGrids;
    /**
     * accessoire gets planned on a grid in a specific cellIndex which was already controlled if it fits there via function tryFitOnShelfOfGrid
     * @param accessoire
     * @param gridIndex
     * @param cellIndex
     * @param type
     */
    addAccessoireInCellInGrid(accessoire: DivaArticle, gridIndex: number, cellIndex: number, type: 'fitsOn' | 'fitsOnParentRule' | 'fitsOnToAccessoire' | 'fitsOnParentRuleButOriginalNotAllowed', params?: {
        noDelete?: boolean;
        noMove?: boolean;
        partlistCodex?: string;
    }): Promise<void>;
    /**
     * check if new accessoire can be free
     * @param accessoire
     */
    private checkForFreeAccessoire;
    /**
     * checks if the accessoire should TakePlaceOnOtherGrids
     * @param takePlaceOnOtherGrids
     * @returns
     */
    private doesTakePlaceOnOtherGrids;
    get accessoires(): {
        [basketId: string]: DivaArticle;
    } | undefined;
    get DisableCellsByElement(): "RH_OVER_AVR" | "RH_OVER_AVL" | undefined;
    getActAccessoireOfGrid(index: number): string | undefined;
    setActAccessoireOfGrid(gridName: string, articleCodex?: string): boolean;
    /**
     * values that get saved in the basket to re-initialize the shelf
     * @returns
     */
    generateShelfPlandata(): {
        ShelfPlanner2: ShelfPlandata[][];
        DoorPlannerData: {
            Type: string;
            toElement: string;
            toType: string;
        }[] | undefined;
    };
    /**
     * collecting all the information that is needed for the 3D exe
     * @param accessoires
     * @returns
     */
    getShelfPlannerAccessoires3DValues(accessoires: ShelfAccessories3DValues[]): ShelfAccessories3DValues[];
    /**
     * return specific shelfElementId. works reqursive. Used to identify every grid on their parents and parents-parent etc. for the 3DValues
     * @returns
     */
    private getShelfElementId;
    /**
     * return the index of the accessoire on which it is placed in the parent
     * @returns
     */
    private getRHOnParentArticle;
    /**
     * retrun all the required values of the current selectable accessoires for the view
     * @param configStepKey
     * @returns
     */
    getShelfPlannerItems(configStepKey: string): {
        accessoires: ShelfAccessoriesView[];
        grids: Grid[];
    };
    /**
     * helperfuntion to get the parentshelfId of an shelfPlanner eg: T-Stück
     * @returns
     */
    getShelfParentShelfId(): string | undefined;
    /**
     * if the dockingpoints get updated check updateDisabledCells
     * @param dpType
     */
    updateOnDockingChanged(dpType?: 'AVL' | 'AVR'): void;
    /**
     * calls the update/check on itself and the docket article
     */
    updateDisabledCells(): void;
    private updateDisabledCellsOnDockedElements;
    private checkOnDockedHeight;
    /**
     * this function checks if cells are still disabled by a neighbour and updates them
     * @param count
     * @param fromDockSide
     */
    disableCellsByDockedShelfs(count?: number): Promise<void>;
    getGridByGridName(shelfId: string): Grid | undefined;
    getGridByIndex(index: number): Grid | undefined;
    GridsOrGroupById(shelfId: string): Grid[];
    getSelectedAccessoireById(shelfId: string): string | undefined;
    getCellIndexOfBasketId(gridIndex: number, basketId: string): number | undefined;
    get allGrids(): Grid[];
    get activeGrids(): Grid[];
    get allMontageOptions(): string[];
    getRelatedToGridIdByArticleCodex(articleCodex: string, gridIndex: number): string | undefined;
}
//# sourceMappingURL=ShelfPlanner.d.ts.map