import { IGXE } from "@intelligentgraphics/igd.core";
import { GfxRepresentation, IProductDataManager, ArticleNumber, TVariantText, ArticleTypes, SourcePlacement, IMaterialAssignments } from "../Types";
export declare enum EIGXEProductDataManagerDebugInfo {
    All = 1,
    Condition = 2,
    Properties = 3,
    ArticlePolymorphy = 4,
    Init = 5
}
export interface IIGXEProductDataManagerConfig {
    /** The native data as it comes from the manufacturer. The native data
     * must be complete, all mandatory fields must be filled.
     */
    nativeData: IGXE.IGXE_Object;
    /** Array of additional data like properties for article polymorphy.
     * Must match nativeData, all fields are optional and are merged into
     * nativeData.
     */
    additionalData?: IGXE.IGXE_Object[];
    pushInterProductPropertysToTop?: boolean;
    /** Debug infos */
    debugInfos?: EIGXEProductDataManagerDebugInfo[];
}
declare type BasketArticleConfiguration = Record<string, IGXE.IPropertyValue>;
export interface IInternalBasketArticle {
    articleID: string;
    articleConfiguration: BasketArticleConfiguration;
    source?: any;
}
export interface IInternalBasket {
    [comID: string]: IInternalBasketArticle;
}
/**
 * IGXEProductDataManager is an implementation of the IProductDataManager interface
 * that uses the IGD.IGXE product data format as data source.
 */
export declare class IGXEProductDataManager implements IProductDataManager {
    private pd;
    private ipPropsTop;
    private dbgInfo;
    private basket;
    constructor(config: IIGXEProductDataManagerConfig);
    is(): boolean;
    addArticle(articleNo: ArticleNumber, initialConfiguration?: IGXE.PropertyValueChanges | string, source?: any): Promise<string>;
    removeArticle(comID: string): Promise<boolean>;
    duplicateArticle(comID: string): Promise<string>;
    getArticleType(comId: string): Promise<ArticleTypes>;
    getArticleID(comID: string): Promise<string>;
    getArticleName(comId: string): Promise<string | undefined>;
    getArticleShortText(comID: string): Promise<string[]>;
    getArticleLongText(comID: string): Promise<string[]>;
    getArticleVariantText(comID: string): Promise<TVariantText>;
    getArticleVariantCode(comID: string): Promise<string>;
    getArticleManufacturerID(comID: string): Promise<string>;
    getArticleProgramID(comID: string): Promise<string>;
    getArticleManufacturerName(comID: string): Promise<string>;
    getArticleProgramName(comID: string): Promise<string>;
    getArticleCategories(comId: string): Promise<{}>;
    getArticleConfiguration(comID: string): Promise<IGXE.IArticleConfiguration>;
    getArticleCatalogImage(comID: string): Promise<string | undefined>;
    private _intGetArticleConfiguration;
    /**
     * @param propKey Property key in the format <PropClassId>.<PropertyID>
     * @returns IProperty object
     */
    private getProperty;
    /**
     * @param articleID The article whose properties should be aquired
     * @param articleConfiguration The article configuration, this is used
     * to check preconditions of property classes and properties
     * @returns An Array of property keys in the format <PropClassId>.<PropertyID>,
     * sorted by PropClass and the .Position value of IProperty
     */
    getArticlePropertyKeys(comID: string): Promise<string[]>;
    getArticlePropertyList(comID: string): Promise<IGXE.IProperty[]>;
    getArticleSubProperties(comID: string, parentPropertyKey: string): Promise<IGXE.IProperty[]>;
    private getPropertyValues;
    getArticlePrices(comID: string): Promise<IGXE.IPrice[]>;
    /**
     * Returns true if the article should be added to basket/BOM upon creation
     * @param comID: Commercial ID of the article instance.
     */
    articleIsCommercial(comID: string): Promise<boolean>;
    /**
     * Returns true if the article has a graphic representation that
     * getGfxRepresentation can process
     * @param comID: Commercial ID of the article instance.
     */
    articleHasGraphics(comID: string): Promise<boolean>;
    isGeometricProperty(comID: string, propKey: string | string[]): Promise<boolean>;
    getMaterialAssignment(comID: string, propKey: string | string[]): Promise<IMaterialAssignments>;
    getInterProductPropertyKeys(interProductID: string): Promise<string[]>;
    getFirstArticleIdOfInterProduct(interProductID: string): Promise<string | undefined>;
    getInterProductID(articleID: string): Promise<string | undefined>;
    /**
     * Searches all sub-articles for the given main article based on its configuration
     */
    getSubArticleIDs(comID: string): Promise<string[]>;
    setPropValue(comID: string, changedPropKey: string, newPropValue: IGXE.TPropertyValue): Promise<void>;
    setPropValues(comId: string, values: IGXE.PropertyValueChanges): Promise<void>;
    /**
     * This IGXEProductDataManager-specific method returns the native IGXE property
     * definition of the given property.
     * @param propKey Property key in the format <PropClassId>.<PropertyID>
     * @returns IGXE.IProperty object
     */
    getIGXEProperty(propKey: string): IGXE.IProperty | undefined;
    assignMaterialPropertyValues(article: {
        comId: string;
        gfxId: string;
    }): Promise<void>;
    private checkCondition;
    private mergeIGXE;
    private mergeRecursive;
    private debug;
    private _intGetTPropValue;
    private _intGetIPropValue;
    private _intGetInterProductArticleID;
    getIGXCRepresentation(comId: string): Promise<undefined>;
    getGfxRepresentation(comID: string): Promise<GfxRepresentation | undefined>;
    /**
     * Get the connected articles based on comIDs.
     * @param comIDs Commercial IDs of the base articles (i.e. the one the user clicks on)
     * @returns Array of the comIDs of all articles in the group (incl. comID)
     */
    getConnectedArticles(comIDs: string[]): Promise<string[]>;
    getArticlePlacement(comId: string): Promise<SourcePlacement | undefined>;
}
export {};
