import { IGXE, IGXA } from "@intelligentgraphics/igd.core";
import { ArticleNumber } from "./ArticleNumber";
import { IPlacement, GfxRepresentationOptions, GfxRepresentationResult } from "./GfxRepresentation";
import { ArticleData, ArticleCategories } from "./Article";
export interface CreateArticleParams {
    /**
     * The target source of this operation
     *
     * @type {string}
     */
    source: string;
    /**
     * When this option is enabled, a newly created article will receive the configuration of the first matching article instance
     * in the following order:
     *
     * 1. article with the same article id inside the application state's selection
     * 2. article inside the application state's selection
     * 3. article of the target source with the same article id
     * 4. article of the target source
     *
     *
     * @type {boolean}
     */
    applySceneConfiguration?: boolean;
    /**
     * Can either be a map of property key to value or the comId of another article instance
     *
     * This will be merged with the scene configuration (if available and enabled)
     *
     * @type {(IGXE.PropertyValueChanges | string)}
     */
    initialConfiguration?: IGXE.PropertyValueChanges | string;
    /**
     * Initial placement of the new article
     *
     * @type {Required<IPlacement>}
     */
    initialPlacement?: Required<IPlacement>;
    /**
     * Custom application data for the new article
     *
     * @type {ArticleData}
     */
    data?: ArticleData;
    categories?: Partial<ArticleCategories>;
    /**
     * GfxId of an existing scene object, which should be associated with the new article.
     *
     * Should only be used for room articles
     *
     * @type {string}
     */
    gfxId?: string;
}
export interface CreateArticleFromArticleNumberParams extends CreateArticleParams {
    articleNumber: ArticleNumber;
}
export interface CreateArticleFromCatalogItemParams extends CreateArticleParams {
    catalogItem: IGXA.TArticleLikeItem;
    additionalInfo?: Partial<ArticleNumber>;
}
export interface CloneArticleParams {
    comId: string;
    initialPlacement?: Required<IPlacement>;
    data?: Record<string, string>;
}
/**
 * Executes operations using the articles/sources operator and passes the results to the OperationResultHandler
 *
 * @export
 * @interface ArticleManager
 */
export interface ArticleManager {
    /**
     * Creates an article from an articleNumber
     *
     * @param {CreateArticleFromArticleNumberParams} params
     * @returns {Promise<string>}
     */
    createArticleFromArticleNumber(params: CreateArticleFromArticleNumberParams): Promise<string>;
    /**
     * Creates an article from a catalog item
     *
     * @param {CreateArticleFromCatalogItemParams} params
     * @returns {Promise<string>}
     */
    createArticleFromCatalogItem(params: CreateArticleFromCatalogItemParams): Promise<string>;
    /**
     * Clones an article with all of its properties
     *
     * @param {CloneArticleParams} params
     * @returns {Promise<string>}
     */
    cloneArticle(params: CloneArticleParams): Promise<string>;
    /**
     * Changes a property for all of the supplied articles
     *
     * @param {string[]} comIds
     * @param {string} propertyKey
     * @param {IGXE.TPropertyValue} value
     * @returns {Promise<void>}
     */
    changeProperty(comIds: string[], propertyKey: string, value: IGXE.TPropertyValue): Promise<void>;
    /**
     * Changes multiple properties for all of the supplied articles
     *
     * @param {string[]} comIds
     * @param {RIGXE.PropertyValueChanges} changes
     * @returns {Promise<void>}
     */
    changeProperties(comIds: string[], changes: IGXE.PropertyValueChanges): Promise<void>;
    /**
     * Changes a property for the supplied article
     *
     * @param {string} comId
     * @param {string} propertyKey
     * @param {IGXE.TPropertyValue} value
     * @returns {Promise<void>}
     */
    changeArticleProperty(comId: string, propertyKey: string, value: IGXE.TPropertyValue): Promise<void>;
    /**
     * Changes multiple properties for the supplied article
     *
     * @param {string} comId
     * @param {IGXE.PropertyValueChanges} changes
     * @returns {Promise<void>}
     */
    changeArticleProperties(comId: string, changes: IGXE.PropertyValueChanges): Promise<void>;
    /**
     * Deletes articles and all of their children
     *
     * @param {string[]} comIds
     * @returns {Promise<void>}
     */
    deleteArticles(comIds: string[]): Promise<void>;
    /**
     * Deletes and article and all of its children
     *
     * @param {string} comId
     * @returns {Promise<void>}
     */
    deleteArticle(comId: string): Promise<void>;
    /**
     * Sets the gfxId of an article
     *
     * @param {string} comId
     * @param {string} gfxId
     */
    setArticleGfxId(comId: string, gfxId: string): void;
    /**
     * Sets the data property of an article
     *
     * @param {string} comId
     * @param {ArticleData} data
     */
    setArticleData(comId: string, data: ArticleData): void;
    /**
     * Sets the placement property of an article
     *
     * @param {string} comId
     * @param {Required<IPlacement>} placement
     */
    setArticlePlacement(comId: string, placement: Required<IPlacement>): void;
    getGfxRepresentation(comId: string, options?: GfxRepresentationOptions): Promise<GfxRepresentationResult>;
}
