import ShelfPlannerData, { InitArticle } from '../../../interface/ShelfPlanner/plannerData';
import { ShelfAccessories } from '../../../interface/ShelfPlanner/ShelfAccessoiresView';
import DivaArticle from '../../Article/DivaArticle';
import Cell from './ShelfPlannerCell';
import { Langs } from '../../../interface/Configuration';
import ShelfPlanner from './ShelfPlanner';
export interface ReturnTryFit {
    type: FittingType;
    index?: number;
    size: number;
    canOnlyFitOn?: (number | string)[];
    accessoire?: DivaArticle;
}
export type FittingType = 'fitsOn' | 'fitsOnParentRule' | 'fitsOnToAccessoire' | 'fitsOnParentRuleButOriginalNotAllowed' | 'doesNotFit' | 'notAllowedByAccessoireRule' | 'notAllowedByParentRule' | 'notAllowedByMaxQuantityReached';
export default class Grid {
    private article;
    private shelfId;
    private _group?;
    private shelfIndex;
    private requiredWarning?;
    private heightGridCellRequired?;
    private showAfterOPT?;
    private showOnRule?;
    private disabledByRule;
    private actAccessoire?;
    private cells;
    private articleRelations;
    private articleRelationsForOtherGroups?;
    disableCellsByRules?: {
        cells: number[];
        rule?: string;
    }[];
    private montageOptions?;
    private disableCellsByMeasures?;
    private visitOption?;
    private heightGridCellCountOnRule?;
    private currentLoadedRuleIndex;
    private accessoires;
    private direction;
    private initAccArr?;
    private gridName;
    private maxAccessoireInGridCounter?;
    private excludeAccessoiresByAccessoiresInGrid?;
    private influencedByNeighborGrids?;
    private influencedByOverlappingGrids?;
    constructor(index: number, article: DivaArticle, data: ShelfPlannerData);
    /**
     * this logic tries to fit in an accessoire on certain index
     * if gridAllowedOnCells is not undefined it means the accessoire has some certain indexes where it can be placed.
     * @param size cellsize of the accessoire
     * @param index place where try to fit
     * @param gridAllowedOnCells specific rules bounded with a parentCodex
     * @returns
     *
     * type:
     * "fitsOn" |               -> accessoires has space
     * "fitsOnParentRule" |     -> accessoires has space on the specific parent rule
     * "doesNotFit" |           -> accessoires has not space
     * "notAllowedByParentRule" -> accessoires has not space on the specific parent rule
     * "fitsOnParentRuleButOriginalNotAllowed" -> accessoires has space somewhere eles but not on the original space
     *
     * index?: number          -> final index where the accessoire has enough space to be placed
     * size: number
     * canOnlyFitOn?: number[] -> made for the error message to tell the user where the accessoire only can take place
     */
    tryFitOnShelf(accessoire: DivaArticle, index: number, accessorieShelfPlanner?: ShelfPlanner, checkParentRuleOnly?: boolean): false | ReturnTryFit;
    private checkIfFitting;
    private tryFitOnIndex;
    private tryFitOnIndexWithFitOnArray;
    private checkIfPlacedOnToAccessoireRule;
    private getNamesOfArticles;
    /**
     * new accessoire gets placed in the grid
     * @param index
     * @param accessoire
     * @param type
     * @param onlyPlaceHolder
     */
    addAccessoireInCells(index: number, accessoire: DivaArticle, type: 'fitsOn' | 'fitsOnParentRule' | 'fitsOnParentRuleButOriginalNotAllowed' | 'fitsOnToAccessoire', noMove?: boolean, noDelete?: boolean, onlyPlaceHolder?: boolean): Promise<void>;
    private takePlaceOnOtherGrids;
    /**
     *  accessoire gets deleted in the grid
     * @param index
     */
    deleteAccessoireInCells(index: number): Promise<DivaArticle | undefined>;
    deleteAllAccOfGrid(): Promise<void>;
    private updateMontageOption;
    private updateAccessoireMontageOption;
    private doesTakePlaceOnOtherCells;
    private blockedByMontageRule;
    /**
     * here the rules in heightGridCellCountOnRule get checked and controlled if the new rules != the current rule
     * @returns
     */
    onConfigChanged(): string[];
    /**
     * complicated but well testet logic to move accessoires with drag and drop in the grid
     * @param initialIndex from index
     * @param finalIndex to index
     * @returns
     */
    moveCell(initialIndex: number, finalIndex: number): Promise<"SUCCESS" | "RESETTED_CELLS" | undefined>;
    /**
     *
     * @returns if one or more cells a still required return true
     */
    areCellsStillRequired(): boolean;
    /**
     * here the heightGridCellRequired gets evaluated and updated in the cells
     * gets always called after something was added, moved or removed in the cells
     */
    private updateRequredCells;
    getFreeSpacesOfAccessoire(accessoire: DivaArticle): number[];
    checkAccessoireInGridRules(accessoire: DivaArticle): boolean;
    private checkIfNeighborsAreBlockingCell;
    getPlannedSpaces(): ShelfAccessories[];
    private getCellsAreRequired;
    getCellCount(dp?: 'AVL' | 'AVR'): number;
    getDisabledCellsByRule(): number[];
    get ShelfId(): string;
    get GridName(): string;
    get group(): string | undefined;
    get gridGroup(): string;
    get alternativeGridGroups(): string[];
    /**
     * helperfuntion to get the parentshelfId of an shelfPlanner eg: T-Stück
     * @returns
     */
    getShelfParentShelfId(): string | undefined;
    get basketId(): string;
    get ActAccessoire(): string | undefined;
    set ActAccessoire(accessoire: string | undefined);
    getArticleRelationsById(id: string): string[];
    getGridIdByArticleCodex(articleCodex: string): string | undefined;
    getAllArticleRelations(): string[];
    get InitAccArr(): InitArticle[] | undefined;
    get ShowAfterOPT(): string | undefined;
    get ShowOnRule(): string | undefined;
    get Accessoires(): {
        [basketId: string]: DivaArticle;
    };
    getAccessoireByBasketId(basketId: string): DivaArticle | undefined;
    get Cells(): Cell[];
    getIndexOfBasketId(basketId: string): number | undefined;
    get ShelfIndex(): number;
    get Direction(): "horizontal" | "vertikal";
    get DisabledByRule(): boolean;
    get DisableCellsByMeasures(): {
        options: {
            opt: string;
            dp?: "AVL" | "AVR";
        }[];
        maxMeasure: number;
    } | undefined;
    get ArticleRelationsForOtherGroups(): {
        Group: string;
        ArticleRelations: string[];
        addToTabgroup: string;
    }[] | undefined;
    set DisabledByRule(val: boolean);
    get VisitOption(): string | undefined;
    get montageOptionsList(): string[];
    getRequiredWarning(lang: Langs): string | undefined;
}
//# sourceMappingURL=ShelfPlannerGrid.d.ts.map