import DivaCatalogData from '../../model/Catalog/CatalogData';
import DivaSetData, { InitSetsObject } from './DivaSet';
import DivaArticle from '../Article/DivaArticle';
import DivaBasketHandler from '../Basket/DivaBasketHandler';
import { Vector3 } from '../../model/Planner/wcVectors';
import { AccessoireItemType } from '../../interface/Articles/AccessoireItemType';
import { BasketData, BBoxType, OrderSetData, SetImageData } from '@crystaldesign/basket-model';
import { ParamsAddPlannerElement, Nav3DMode, Nav3DParams, PlannerDeletionType, PlannerTransform, ParamPlanPlannerElementInfo } from '../../interface/FunctionTypes';
import { ArticleOptionValueView } from '../../interface/OptionTypes/ArticleOptionValueView';
import { CatalogPlannerArticleViewDataType } from '../../interface/Articles/CatalogPlannerArticleViewDataType';
import Grid, { ReturnTryFit } from '../ConfigTree/Shelfplanner/ShelfPlannerGrid';
import { AlternativeRendering } from '../../interface/Rendering/AlternativeRendering';
import { DockingType } from '../../interface/Planner/DockingPointDataType';
import { PlannerType, ReturnTo } from '../../interface/webPlannerParams/WebPlannerParamsType';
import Door from '../ConfigTree/DoorPlanner/Door';
import DivaSet from './DivaSet';
import { FreePlacesOnGrids, PlannedPlacesOnGrids, ShelfAccessoriesView } from '../../interface/ShelfPlanner/ShelfAccessoiresView';
import { BboxInfo2D } from '../../interface/ReturnTypes';
import { BannerRule, NotificationEventType } from '../../interface/Rules/NotificationRule';
import { Hybrid3DInfo } from '../Planner/Rendering/types';
import { PlannedArticleViewDataType } from '../../interface/Articles/PlannedArticleViewDataType';
import { GeneralPlanningState, PlannerInteractionInformation } from '../../model/Planner/PlannerInteractionData';
import PlannerElementData from '@crystaldesign/web-planner-logic/model/Planner/PlannerElementData';
/**
 * This interface describes planner elements for the view, that are not planned but visualized through the 3D Exe.
 * This can be accessoires in the shelf planner.They do not have a SVG but are sent to the 3D Exe as single elements.
 * The parentElementId can be a string when working with shelf planner inside the shelf planner (T element)
 */
export interface IDivaViewVisualizedNotPlannedElement {
    isShelfAcc: boolean;
    parentElementId: string;
    shelfRasterHeight?: number;
    shelfGridId?: number;
}
declare class DivaSetHandler {
    constructor();
    private createSet;
    private initOrderLineArticles;
    initSetsByOrderSet(orderSets: OrderSetData[], initSetState: InitSetsObject): Promise<DivaSetData[]>;
    getOrderSetShouldInitPlanner(orderSets: OrderSetData[], index: number): boolean;
    /**
     * When loading a product, the relative position of the whole set should be in the origin.
     * When a product was saved with position information in the world, the values are corrected here
     * @param orderSets
     * @returns
     */
    correctPivotPosInOrderSets(orderSets: OrderSetData[]): OrderSetData[];
    initSet(orderSet: OrderSetData, initSetState: InitSetsObject, updateSetImage?: any, lastSetToInitialize?: boolean): Promise<DivaSetData>;
    /**
     * This function destroyes the plannerHandler of the actSet. For Setplanner. Eventuell von alle sets zerstören - je nach use case
     * @param doDestroy3DHostConnection  Do clear 3D host connection and clear render Cache
     */
    destroyPlannerHandler(set: DivaSetData, doDestroy3DHostConnection: boolean): Promise<void>;
    getConfigStepKeyOfOption(set: DivaSetData, optCodex: string): string | undefined;
    getFirstConfigStep(set: DivaSetData): string | undefined;
    addPlannerElement(set: DivaSetData, artCodex: string, initParams: ParamsAddPlannerElement, from?: 'initializingProduct'): Promise<DivaArticle>;
    /**
     * This function moves an Element. Depending on the planner, copying one element can result in copying multiple elements.
     * It first creates an article for each planner element to copy.
     * Then it adds the Elements to the planner
     * @param setId
     * @param elementId
     * @param copyInfo
     *
     * @returns this function returns the new selected article
     */
    movePlannerElement(set: DivaSetData, elementId: number, absoluteMoveIndex: {
        x: number;
        y: number;
    }): Promise<void>;
    /**
     * This function copys an Element. Depending on the planner, copying one element can result in copying multiple elements.
     * It first creates an article for each planner element to copy.
     * Then it adds the Elements to the planner
     * @param setId
     * @param elementId
     * @param copyInfo
     *
     * @returns this function returns the new selected article
     */
    copyPlannerElement(set: DivaSetData, elementId: number, copyInfo?: ParamPlanPlannerElementInfo): Promise<DivaArticle | undefined>;
    getVariantValuesOfElement(set: DivaSetData, elementId: number): {
        [codex: string]: string;
    } | undefined;
    getAllViewPlannerElements(set: DivaSetData): Map<string, PlannerElementData[]>;
    /**
     * This function returns all planner elements that do not have an SVG and are an Accessoire of another element. They are visualized in the 3D Client and sent as single elements.
     * @returns
     */
    getAllVisualiedNotPlannedElements(set: DivaSetData): Map<string, IDivaViewVisualizedNotPlannedElement[]>;
    get2DViewPlannerBoundingBox(set: DivaSetData): BboxInfo2D;
    /**
     * This function copys one Article by elementId. It creates a new article with the same attributes as the original and returns it
     * @param elementId
     */
    private copyArticleByElementId;
    resetArticle(set: DivaSet, basketId: string): Promise<void>;
    private addArticleToActSet;
    updateAccessoireQuantity(set: DivaSetData, accessoireItem: AccessoireItemType, relatedToBasketId: string, nQuantity: number, forceConfigSingle?: boolean): Promise<{
        somethingChanged: boolean;
        changed3D: boolean;
    }>;
    deleteElementFromSetByElemId(set: DivaSetData, elementId: number, autoCorrectAVL_AVR?: boolean, deletionType?: PlannerDeletionType): Promise<{
        success: boolean;
        selectElementId?: number;
        setId: string;
        oldTransform?: PlannerTransform;
    }>;
    deleteElementFromSet(set: DivaSetData, article: DivaArticle, autoCorrectAVL_AVR?: boolean, deletionType?: PlannerDeletionType, dontReload?: boolean, dontCheckInfluencedPlannerElements?: boolean): Promise<{
        success: boolean;
        selectElementId: number | undefined;
        setId: string;
        oldTransform?: PlannerTransform;
    }>;
    addAccessorieOnShelfPlanner(set: DivaSetData, gridIndex: number, cellIndex: number, parentBasketId: string, params?: {
        noDelete?: boolean;
        noMove?: boolean;
        byInit?: boolean;
        partlistCodexToInit?: string;
    }): Promise<false | ReturnTryFit>;
    moveShelfItem(set: DivaSetData, grid: Grid, initialIndex: number, finalIndex: number): Promise<"SUCCESS" | "RESETTED_CELLS" | "NOTHING_CHANGED" | undefined>;
    moveDoors: (set: DivaSetData, movedDoor: Door, targetDoor: Door) => void;
    selectShelfAccArticle(set: DivaSetData, gridGroup: string, targetArticles: string[], articleCodex?: string): boolean;
    getFreeShelfGrids(set: DivaSetData, gridGroup: string): Promise<FreePlacesOnGrids[] | undefined>;
    getFreeToMoveShelfGrids(set: DivaSet, gridName: string, basketId: string): FreePlacesOnGrids[] | undefined;
    private getFreePlaces;
    getPlannedShelfGrids(set: DivaSetData): PlannedPlacesOnGrids[];
    moveShelfItemToGrid(set: DivaSet, accessoireBasketId: string, parentBasketId: string, gridName: string, cellIndex: number): Promise<string | undefined>;
    deleteAccessorieOnShelfPlanner(set: DivaSetData, gridIndex: number, cellIndex: number, parentBasketId: string, dontReload?: boolean): Promise<void>;
    updatePlannerTrans(set: DivaSetData, plannerElementID: number, deltaMove: Vector3, deltaAngleDeg: number, rotCorrection: number, transState: 'START' | 'UPDATE' | 'END', autoDockingDistance: number): Promise<void>;
    getNeighborElementsByBasketId(article: DivaArticle, type: DockingType): DivaArticle[];
    getDockedGroupedArticles(set: DivaSetData): {
        [basketId: string]: DivaArticle;
    }[];
    /**
     * This function returns all planner Interaction informations for a specific set
     * @param set
     * @returns
     */
    getPlannerInteractionInformation(set: DivaSetData): PlannerInteractionInformation | undefined;
    getGeneralPlanningState(set: DivaSetData, selectedElementId?: number): GeneralPlanningState | undefined;
    getLastElementInGroup(article: DivaArticle): DivaArticle | undefined;
    getPlanningIsComplete(set: DivaSetData, forceCheck?: boolean): boolean;
    handle3DVisualizationChanged(set: DivaSetData, mode: Nav3DMode, params: Nav3DParams, doShow3DDimensionLines?: boolean): void;
    deleteAccessoire(set: DivaSetData, articleCodex: string, parentBasketId: string): Promise<boolean | {
        success: boolean;
        selectElementId: number | undefined;
        setId: string;
        oldTransform?: PlannerTransform;
    }>;
    /**
     * Invokes a new rendering
     * @param renderSize
     * @param planner3DGridEnabled
     * @param mediaServiceSaveMode
     * @param alternateRenderInfo   Contains information if the rendering is an alternate rendering  (Zubehörbild)
     */
    update3DPlannerView(doRequestRendering: boolean, doRequestHqRenderScript: boolean, set: DivaSetData, renderSize: any, planner3DGridEnabled: boolean, mediaServiceSaveMode: 'STREAM' | 'PERMANENT', doShow3DDimensionLines?: boolean, alternateRenderInfo?: AlternativeRendering, hybrid3DInfo?: Hybrid3DInfo, useLatestHybridInfo?: boolean): void;
    getPlannerPaletteViewInfo(set: DivaSetData, type?: 'PLANNERSWITCH' | 'ART' | 'ART_2', selectedArticle?: string): {
        catalogPlannerArticles: CatalogPlannerArticleViewDataType[];
        filterType: {
            [filterType: string]: boolean;
        };
        startFilter: string[];
        startHideArticles: string[];
        showAllItemsInPlanner?: boolean;
        plannerConfiguration: import("@crystaldesign/web-planner-logic").PlannerConfigParams;
    };
    getPlanner2Dot0PaletteViewInfo(set: DivaSetData): PlannedArticleViewDataType[];
    setActSet(sets: {
        [setId: string]: DivaSetData;
    }, setId: string): boolean;
    getAccessoriesOfArticles(set: DivaSetData, targetArticles: string[]): (AccessoireItemType | ShelfAccessoriesView)[] | undefined;
    /**
     * This function returns the element ids of a list of articles. The articles are specified by an array of basketIds
     * @param setId
     * @param targetArticles
     */
    private getElementIdsOfArticles;
    /**
     * This function returns the base Parent Article of an Accessoire. it runs through the whole accessoire chain until it finds an article that is not an accessoire.
     * If the current Article is no accessoire, it returns itself
     * @param accBasketId   BasketID of the accessoire
     */
    getBaseParentArticleOfAccessoire(set: DivaSetData, accBasketId: string): DivaArticle;
    /**
     * This function changes the State of Config-Single. If it goes form true to false there is a Posibility that now articles have in the same step different values set.
     * Because of that @param groupedOptions is send aswell to configure all articles with Values of the first article of the Options of @param groupedOptions
     * @param newIsConfigSingle
     * @param groupedOptions
     * @param groupedArticles
     */
    configSingleIsChanged(set: DivaSetData, newIsConfigSingle: boolean, groupedOptions?: string[], groupedArticles?: string[]): Promise<void>;
    getNewConfigStepKeyInOption(set: DivaSetData, configStepKey: string, optionCodex: string, tabGroupKey: string): string | undefined;
    loadConfigStructureOfActSet(set: DivaSetData, plannerType: PlannerType): Map<string, import("@crystaldesign/web-planner-logic").TabGroup>;
    loadConfigStructureForOnlyProductsList(): Map<string, import("@crystaldesign/web-planner-logic").TabGroup>;
    buildConfigSturcture(set: DivaSetData, plannerType: PlannerType): void;
    getHiddenOptions(set: DivaSetData): import("../ConfigTree/DivaConfigTree").default | undefined;
    getBasketIdOfElementId(set: DivaSetData, elementIds: number[]): string[];
    loadPaletteInfos(set: DivaSetData, configStepKey?: string, activeArticles?: string[], targetArticles?: string[]): {
        articleInfos: {
            [posNr: string]: {};
        } | undefined;
        doShowConfigSingle: boolean;
        isConfigSingle: boolean;
        articleName: string;
        bbox: BBoxType;
    };
    loadConfigItemsOfActSetByConfigStepKey(set: DivaSetData, configStepKey: string, visible: boolean, hidePricePreview: boolean): Promise<{
        contentItemId: string | undefined;
        conceptFilter: import("@crystaldesign/web-planner-logic").AdditionalGroupFilter[] | undefined;
        contentItemTeaser: import("@crystaldesign/web-planner-logic").ContentItemTeaser | undefined;
        description: string | undefined;
        optionCodex: string;
        partOfGroup: {
            groupName: string;
            position: "l" | "r" | undefined;
        } | undefined;
        isMultiselect: boolean;
        actStepName: string;
        groupsDefaultClosed: boolean;
        paletteType: import("@crystaldesign/web-planner-logic").ItemPaletteType;
        filterType: string;
        stepInfo: string | undefined;
        configItems: ArticleOptionValueView[];
        option: import("../../model/Options/ArticleOptionData").default | undefined;
        selectedItems: ArticleOptionValueView[];
        notTotallyMatichingOPVs: boolean | undefined;
        isRenderedNotInSettingPalette: boolean;
        isRenderedInAccessorieStep: boolean;
        visible: boolean;
    } | {
        contentItemId: string | undefined;
        conceptFilter: import("@crystaldesign/web-planner-logic").AdditionalGroupFilter[] | undefined;
        contentItemTeaser: import("@crystaldesign/web-planner-logic").ContentItemTeaser | undefined;
        description: string | undefined;
        optionCodex: string;
        partOfGroup: {
            groupName: string;
            position: "l" | "r" | undefined;
        } | undefined;
        isMultiselect: boolean;
        actStepName: string;
        groupsDefaultClosed: boolean;
        paletteType: import("@crystaldesign/web-planner-logic").ItemPaletteType;
        filterType: string;
        stepInfo: string | undefined;
        configItems: ArticleOptionValueView[];
        selectedItems: never[];
        option?: undefined;
        notTotallyMatichingOPVs?: undefined;
        isRenderedNotInSettingPalette: boolean;
        isRenderedInAccessorieStep: boolean;
        visible: boolean;
    }>;
    private removeDockingInfluencableconfigItems;
    /**
     * here if needed the all the visible variants get precalced for price information or to check if a product is in stock
     * similar usecases where the values need to be precalced like this the usecase can easliy be added and the required infos can be gathered in the function: calcVariants
     * @param configItems
     * @param configStepKey
     * @param paletteType
     * @returns
     */
    private variantsEvaluator;
    private calcVariants;
    private getVariant;
    private checkIfPriceDiffers;
    private checkForReversingChanges;
    /**
     * This function updates the option values of the articles
     * @param myValues
     * @param targetArticles
     * @returns returns true if the configuration changed something in the elementCount (deleted or add a new article)
     */
    updateArticlesOptionStatesOfActSet(set: DivaSet, myValues: {
        [optCodex: string]: string;
    }, targetArticlesWithNewValues: string[], ignorePlanner?: boolean, from?: 'FromViewClick' | 'calcVariant' | 'initializing' | 'initializingPartlist' | 'initializingProduct' | 'initializingAfterTrans', partlistDiff?: number): Promise<{
        articleCountChanged: boolean;
        elementIdsToUpdateSelection: number[] | undefined;
        setId: string;
    }>;
    checkBannerRules(set: DivaSet, visitedOptions: {
        [basketId: string]: string[];
    }, event: NotificationEventType): BannerRule | undefined;
    checkNotificationRules(set: DivaSet, targetArticles: string[], visitedOptions: {
        [basketId: string]: string[];
    }, event: NotificationEventType): any[] | undefined;
    updatePosNrOfAccessoiresOfTargetArticles(set: DivaSetData, targetArticles: string[]): void;
    private updateEdoArticles;
    updateNavigation(set: DivaSet): Promise<void>;
    defineArticlesOnOptions(sets: {
        [setId: string]: DivaSetData;
    }, set: DivaSetData, basketIdsOnOptions: {
        [basketId: string]: string[];
    } | 'defineAll'): void;
    checkIfAllOptionsAreDefined(sets: {
        [setId: string]: DivaSetData;
    }): true | {
        articles: string[];
        options: {
            title: string;
            configStepKey: string;
        }[];
    };
    getActSetTitle(set: DivaSetData): void;
    getStaticRoomListItems(set: DivaSetData): import("@crystaldesign/web-planner-logic").StaticRoomDataType[];
    getShelfPlannerItems(set: DivaSetData, configStepKey: string): {
        accessoires: ShelfAccessoriesView[];
        grids: Grid[];
    };
    getDoorPlannerItems(set: DivaSetData, configStepKey: string): import("@crystaldesign/web-planner-logic").DoorPlannerView[];
    getSetsCatalogDatas(sets: {
        [setId: string]: DivaSetData;
    }): DivaCatalogData[];
    /***********************************************Speichern Prozess / OrderSets******************************************************/
    getTotalViewPrice(sets: {
        [setId: string]: DivaSetData;
    }): number;
    getTotalViewBruttoPrice(sets: {
        [setId: string]: DivaSetData;
    }): number | undefined;
    /**
     * This function returns the price format of the current catalog
     */
    getActSetPriceFormat(set: DivaSetData): string;
    fillOrderLinesAndOrderSets(sets: {
        [setId: string]: DivaSetData;
    }, divaBasketHandler: DivaBasketHandler, repairOnly: boolean, setPlanner: boolean, returnTo?: ReturnTo): Promise<BasketData>;
    getFreeDockingPointsOfArticle(article: DivaArticle): {
        OpenAVRFilter: string[] | undefined;
        OpenAVLFilter: string[] | undefined;
    };
    private getSetPlannerInfos;
    private repairOrderSets;
    /**************************SpeicherRoutinen*************************************/
    isNoArticleToSave(sets: {
        [setId: string]: DivaSetData;
    }): boolean;
    private getOrderSet;
    /**
     * This function saves the rendering of the current planning/configuration.  It saves it permanent
     * @param set
     * @param overwriteLastSavedRendering   If set to true, it always asks for a new rendering. If false it returns the previously saved rendering (When entering Summary)
     */
    getSetImage(set: DivaSetData, overwriteLastSavedRendering: boolean): Promise<{
        dimensions: {
            w: number | undefined;
            h: number | undefined;
            d: number | undefined;
        };
        url: string | undefined;
    } | {
        dimensions: {
            w: undefined;
            h: undefined;
            d: undefined;
        };
        url?: undefined;
    }>;
    getHQRenderScript(set: DivaSetData, divaNr: string): Promise<any>;
    /**
     * This function saves the rendering of the current planning/configuration.  It saves it permanent
     * The alternateSet Images are returned in a basket compatible datastructure
     * @param set
     * @param overwriteLastSavedRendering   If set to true, it always asks for a new rendering. If false it returns the previously saved rendering (When entering Summary)
     */
    private getAlternateSetImages;
    get2DSetImage(set: DivaSetData): Promise<string | undefined>;
    getAiImages(set: DivaSetData): Promise<SetImageData[]>;
    getAiImage(set: DivaSetData): Promise<SetImageData | undefined>;
    getBBoxObject(set: DivaSetData, dimensions?: {
        w?: number;
        h?: number;
        d?: number;
        wOLT?: number;
        dOLT?: number;
        hOLT?: number;
    }): BBoxType;
    findLoadedSet(sets: {
        [setId: string]: DivaSetData;
    }, catalogCodex: string, accountGUID: string): DivaSetData | undefined;
    addOrderSetArticlesToExistingSet(set: DivaSetData, orderSet: OrderSetData, lastSetToInitialize: boolean): Promise<void>;
    private actSet;
}
declare const setHandlerInstance: DivaSetHandler;
export default setHandlerInstance;
//# sourceMappingURL=DivaSetHandler.d.ts.map