import { IGXC } from "@intelligentgraphics/ig.gfx.core";
import { IGXE } from "@intelligentgraphics/igd.core";
import { GfxRepresentationOptions, GfxRepresentationResult } from "../GfxRepresentation";
import { ArticleNumber } from "../ArticleNumber";
import { TVariantText, ArticleCategories, ArticleTypes, SourcePlacement } from "../Article";
import { IImpressionProvider } from "./ImpressionProvider";
import { ISessionProvider } from "./SessionProvider";
declare type NameTypeMapping = {
    ImpressionProvider: IImpressionProvider;
    SessionProvider: ISessionProvider;
};
export declare type ProductDataManagerTypeNames = keyof NameTypeMapping;
export { IImpressionProvider, ISessionProvider };
export interface IProductDataManager {
    is<K extends keyof NameTypeMapping>(name: K): this is NameTypeMapping[K];
    /**
     * Adds an article to an (internal) article repository.
     * @param articleNo: Structured article number to be added.
     * @param initialConfiguration: Configuration to be applied after the
     *        creation with default properties. OR: comId of an existing
     *        article, whose configuration should be used
     * @param source: In case of multiple product sources, give the source
     *        ID here.
     * @returns The new commercial ID of the created article. This is the
     *          reference for all other ProductDataManager functions.
     *          Rejects promise with an Error when the given article is not
     *          part of the product data.
     */
    addArticle(articleNo: ArticleNumber, initialConfiguration?: IGXE.PropertyValueChanges | string, source?: string): Promise<string>;
    /**
     * Removes an article from the article repository.
     * @param comId: Commercial ID of the article instance.
     * @returns True when succeeded.
     *          Rejects promise with comIdError when comId is not part of
     *          the article repository.
     */
    removeArticle(comId: string): Promise<boolean>;
    /**
     * Duplicates an article. Useful for Copy/Paste operations.
     * @param comId: Commercial ID of the article instance.
     * @returns The new commercial ID of the duplicated article.
     *          Rejects promise with comIdError when comId is not part of
     *          the article repository.
     */
    duplicateArticle(comId: string): Promise<string>;
    getArticleType(comId: string): Promise<ArticleTypes>;
    /**
     * Aquires the article number.
     * @param comId: Commercial ID of the article instance.
     * @returns The article number.
     *          Rejects promise with comIdError when comId is not part of
     *          the article repository.
     */
    getArticleID(comId: string): Promise<string>;
    getArticleName(comId: string): Promise<string | undefined>;
    /**
     * Aquires the short text of an article.
     * @param comId: Commercial ID of the article instance.
     * @returns An array of lines.
     *          Rejects promise with comIdError when comId is not part of
     *          the article repository.
     */
    getArticleShortText(comId: string): Promise<string[]>;
    /**
     * Aquires the long text of an article.
     * @param comId: Commercial ID of the article instance.
     * @returns An array of lines.
     *          Rejects promise with comIdError when comId is not part of
     *          the article repository.
     */
    getArticleLongText(comId: string): Promise<string[]>;
    /**
     * Aquires the variant text of an article.
     * @param comId: Commercial ID of the article instance.
     * @returns An array of key/value pairs describing the configuration of
     *          the article.
     *          Rejects promise with comIdError when comId is not part of
     *          the article repository.
     */
    getArticleVariantText(comId: string): Promise<TVariantText>;
    /**
     * Aquires the variant code of an article.
     * @param comId: Commercial ID of the article instance.
     * @returns The Variant Code as string.
     *          Rejects promise with comIdError when comId is not part of
     *          the article repository.
     */
    getArticleVariantCode(comId: string): Promise<string>;
    /**
     * Aquires the manufacturer ID of an article.
     * @param comId: Commercial ID of the article instance.
     * @returns The manufacturer ID.
     *          Rejects promise with comIdError when comId is not part of
     *          the article repository.
     */
    getArticleManufacturerID(comId: string): Promise<string>;
    /**
     * Aquires the program ID of an article.
     * @param comId: Commercial ID of the article instance.
     * @returns The program ID.
     *          Rejects promise with comIdError when comId is not part of
     *          the article repository.
     */
    getArticleProgramID(comId: string): Promise<string>;
    /**
     * Aquires the manufacturer name of an article.
     * @param comId: Commercial ID of the article instance.
     * @returns The manufacturer name.
     *          Rejects promise with comIdError when comId is not part of
     *          the article repository.
     */
    getArticleManufacturerName(comId: string): Promise<string>;
    /**
     * Aquires the series name of an article.
     * @param comId: Commercial ID of the article instance.
     * @returns The program name.
     *          Rejects promise with comIdError when comId is not part of
     *          the article repository.
     */
    getArticleProgramName(comId: string): Promise<string>;
    getArticleCategories(comID: string): Promise<Partial<ArticleCategories>>;
    /**
     * Aquires the current configuration an article.
     * @param comId: Commercial ID of the article instance.
     * @returns The current configuration dictionary.
     *          Rejects promise with comIdError when comId is not part of
     *          the article repository.
     */
    getArticleConfiguration(comId: string): Promise<IGXE.IArticleConfiguration>;
    /**
     * Like getArticlePropertyKeys, it reads the current articles
     * configuration state. But it returns a list of full property
     * definitions instead of keys only.
     * @param comId: Commercial ID of the article instance.
     * @returns An array of property definitions.
     *          Rejects promise with comIdError when comId is not part of
     *          the article repository.
     */
    getArticlePropertyList(comId: string): Promise<IGXE.IProperty[]>;
    /**
     * Retrieves the article prices. This contains the base price and
     * possible additional prices based on its configuration.
     * @param comId: Commercial ID of the article instance.
     * @returns An array of price items in the correct order.
     *          Rejects promise with comIdError when comId is not part of
     *          the article repository.
     */
    getArticlePrices(comId: string): Promise<IGXE.IPrice[]>;
    /**
     * Retrieves the catalog image of the article.
     * @param comId: Commercial ID of the article instance
     * @returns Full path of the image
     */
    getArticleCatalogImage(comId: string): Promise<string | undefined>;
    /**
     * Changes the value of a property, if possible. It performs all needed
     * checks for the property and resolves dependend conditions.
     *
     * @param {string} comId Commercial ID of the article instance.
     * @param {string} changedPropKey The key of the changed property. In case of
     *        structured properties (property classes), a dot is used as
     *        divider (<PropClassId>.<PropertyKey>).
     * @param {IGXE.TPropertyValue} newPropValue The new value.
     * @returns {Promise<void>} The method will reject in case of a failed property setting.
     */
    setPropValue(comId: string, changedPropKey: string, newPropValue: IGXE.TPropertyValue): Promise<void>;
    setPropValues(comId: string, changes: IGXE.PropertyValueChanges): Promise<void>;
    /**
     * Checks if a change of the given property/properties should trigger
     * a geometric update of the article.
     * @param comId: Commercial ID of the article instance.
     * @param propKey: Key of a property or an array of keys to be checked.
     * @returns True, if at least one of the properties are defined as
     *          geometric.
     *          Rejects promise with comIdError when comId is not part of
     *          the article repository.
     */
    isGeometricProperty(comId: string, propKey: string | string[]): Promise<boolean>;
    /**
     * Gets the geometry for the given article instance
     * @param comId Commercial ID of the article instance.
     * @returns The graphics representation.
     */
    getGfxRepresentation(comId: string, options?: GfxRepresentationOptions): Promise<GfxRepresentationResult>;
    getIGXCRepresentation(comId: string): Promise<string | IGXC.Scene | undefined>;
    /**
     * Searches for commercial sub articles based on the current
     * configuration as defined in the InterProduct rules.
     * @param comId Commercial ID of the article instance.
     * @returns Array of article numbers.
     *          Rejects promise with comIdError when comId is not part of
     *          the article repository.
     */
    getSubArticleIDs(comId: string): Promise<string[]>;
    /**
     * 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>;
    getArticleCustomData?(comId: string): Promise<object | undefined>;
}
export * from "./ImpressionProvider";
