import BundleRule from '../../../interface/Rules/BundleRules';
import { DoChangeRetailArticleNumbers } from '../../../interface/Articles/ArticlePrefixesType';
import BoxPlannerGrid from './BoxPlannerGrid';
export default class ConstructionRulesHandler {
    private getValueOfOptionOfArticle;
    private checkArticleHasOption;
    private updateIDMSpecificFeatures;
    private updateGridElementDimensions;
    private updateCfgValuesByPlanner;
    /**
     * This object holds all the information for constructing the boxPlanner. If you place for example two elements one after another, so the left element has no right wall. However, the right element has a left wall.
     *  Futhermore, there are options, that are applied only to specific elements.
     */
    private constructionRules;
    private constructionRulesLoaded;
    private hideOptionsForConstruction;
    private partlistHelper;
    constructor(getValueOfOptionOfArticle: (elementId: number, optionCodex: string) => string | undefined, checkArticleHasOption: (elementId: number, optionCodex: string) => boolean, updateIDMSpecificFeatures: () => void, updateGridElementDimensions: () => void, updateCfgValuesByPlanner: (optionHandler: Map<number, Map<string, string>>, repairVariantValues?: boolean, partListBundleRules?: BundleRule[], doChangeRetailArticleNumbers?: DoChangeRetailArticleNumbers) => Promise<void>);
    /**
     * This function returns true if an array contains a specific value.
     * E.G. All unvalid options are separated using ; . This function now returns true, if a specific option is inside
     * @param rule
     * @param opt
     */
    private arrayContainsValue;
    private evalRule;
    /**
     * This function looks what value the option has in the current OptionHandler
     * @param elementId ElementId
     * @param opt       OptionKey
     */
    private getOptionVal;
    /**
     * this fuction check is an element has an option and retuns a bool
     * @param elementId ElementId
     * @param opt       OptionKey
     * @param optionHandler
     * @returns
     */
    private hasOptionValue;
    /**
     * This function sets a specific Option to be visible.
     * @param elementId     The elementID of the target element
     * @param option        The option that should be set to Visible
     * @param optionHandler The optionHandler that saves all optionChanges in order to fit the boxplannerLogic
     */
    private setOptionDoShow;
    /**
     * This function sets a specific Option to be hidden.
     * @param elementId     The elementID of the target element
     * @param option        The option that should be set to hidden
     * @param optionHandler The optionHandler that saves all optionChanges in order to fit the boxplannerLogic
     */
    private setOptionDoHide;
    private setOptionDoCustom;
    private getCurOptionBasedConstructionRules;
    /**
     * This function sets te OptionValue in the optionHandler and hideOptiosnForConstruction Information
     */
    private setOptionValue;
    /**
     * This function returns true, if the element has a bottom Plate. Elements with bottom plate are e.g. Offenes Fach oder Schubladen.
     * Elements without bottom plate are "Garderobe" or "Offenes Fach ohne Boden"
     */
    private getElementHasBottomPlate;
    /**
     * This function returns true if the current element is a corner element
     * @param curElement
     * @param optionHandler
     */
    private getElementIsCornerElement;
    private getElementIsGarderobeElement;
    private getCornerType;
    /**
     * This function returns true, if the element has a top plate. It has a top plate if it has no element on the top or one of the elements on the top has a ground plate.
     * It has no top plate, if the element on top has no ground plate, like a "Garderobe"
     * @param curElement
     * @param optionHandler
     */
    private getElementHasTopPlate;
    private setAllOptToDefault;
    /**
     * Eg. height or width changed
     * @param boxPlannerGrid
     * @param changedOPTs
     * @param onSelectionChangedElementId
     * @param optionHandler
     */
    private doCorrectAffectedElementsByOption;
    private handleVisibility_SHOW_HIDE;
    private handleBacksideVisibility_SHOW_HIDE;
    /**
     * This function forces both options to hide IF both options are visible. if only one Option is visible, nothing happens.
     * @param {*} curArticle
     * @param {*} neighborArticle
     * @param {*} rule
     */
    private handleVisibiliy_HIDE_HIDE;
    private correctSimpleOpt;
    /**
     * This function corrects the back after everything is set (Default + force options)
     * @param boxPlannerGrid
     * @param curElement
     */
    private correctBack;
    private correctBottom;
    private getValidLadder;
    private validateDimensionRule;
    private correctOverHangingElement;
    private correctFoot;
    private correctOptionsInfluencedByDimensions;
    private correctLadder;
    private correctCoverPlate;
    private correctSeries;
    private correctForceOptOfElement;
    private correctNeighborCustomOLTs;
    private doChangeRetailArticleNumbers;
    /** ------------------------------ Construction logci handler ---------------------------------------------------- */
    setConstructionRules(rules: any): void;
    getConstructionRulesLoaded(): boolean;
    updateOptionLogicBoxPlanner(boxPlannerGrid: BoxPlannerGrid, changedOPTs?: any, targetElements?: number[], forceResetCornerElements?: boolean): Promise<'BOXPLAN_ELEMENT_INCOMPATIBILE_BLACKFRAME_WARNING' | 'BOXPLAN_BLACKFRAME_INCOMPATIBLE_ELEMENT_WARNING' | 'BOXPLAN_BLACKFRAME_INCOMPATIBLE_HEIGHT_WARNING' | undefined>;
    /**
     * This function is called when an element is deleted. It deletes the saved constcutionInformation
     * @param elementId
     */
    onElemDeleted(elementId: number): void;
    /**
     * This function is called when an element is copied. The hideOptionsForConstruction information is copied from one element to the new one.
     * @param origElementId
     * @param newElementId
     */
    onElementCopy(origElementId: number, newElementId: number): void;
    getHasMaxElemCountPerColumn(): boolean;
    getMaxElemCountPerColumn(): any;
    /**
     * This function returns true when the whole planning can have only elements on the same hight like Elin configurator
     * @returns
     */
    getForceWholePlanningSameHeight(): boolean;
}
//# sourceMappingURL=ConstructionRulesHandler.d.ts.map