import { IGXE } from "@intelligentgraphics/igd.core";
import { Article, ArticleCategories, ArticleTypes, ArticleInfo } from "./Article";
import { IPlacement } from "./GfxRepresentation";
export declare type QueryableArticle = Article;
/**
 * Executes readonly functions on the article state
 *
 * @export
 * @interface ArticleQuery
 */
export interface ArticleQuery {
    /**
     * Retrieves the comIds of all available articles
     *
     * @returns {string[]}
     */
    getAllComIds(): string[];
    /**
     * Retrieves all defined root ids of all available, graphical articles
     *
     * @returns {string[]}
     */
    getAllGfxIds(): string[];
    /**
     * Retrieves all available article instances
     *
     * @returns {QueryableArticle[]}
     */
    getAllArticles(): QueryableArticle[];
    /**
     * Retrieves a list of articles, that match the filter function
     *
     * @param {(article: QueryableArticle) => boolean} filter
     * @returns {QueryableArticle[]}
     */
    getFilteredArticles(filter: (article: QueryableArticle) => boolean): QueryableArticle[];
    /**
     * Retrieves all articles with a truthy value for the specified category
     *
     * @param {keyof ArticleCategories} category
     * @returns {QueryableArticle[]}
     */
    getArticlesWithCategory(category: keyof ArticleCategories): QueryableArticle[];
    /**
     * Retrieves all articles of specified type
     *
     * @param {ArticleTypes} type
     * @returns {QueryableArticle[]}
     */
    getArticlesOfType(type: ArticleTypes): QueryableArticle[];
    /**
     * Retrieves all articls of type graphical. These articles might not exist in the scene
     *
     * @returns {QueryableArticle[]}
     */
    getGraphicalArticles(): QueryableArticle[];
    /**
     * Retrieves all articles of the specified sourceId
     *
     * @param {string} sourceId
     * @returns {QueryableArticle[]}
     */
    getArticlesOfSource(sourceId: string): QueryableArticle[];
    /**
     * Retrieves all articles for the specified comIds
     *
     * @param {string[]} comIds
     * @returns {QueryableArticle[]}
     */
    getArticlesByComIds(comIds: string[]): QueryableArticle[];
    /**
     * Retrieves the head item for the source or undefined if it doesn't exist
     *
     * @param {string} sourceId
     * @returns {(QueryableArticle | undefined)}
     */
    getHeadItem(sourceId: string): QueryableArticle | undefined;
    /**
     * Retrieves the comId of a gfxId
     *
     * @param {string} gfxId
     * @returns {(string | undefined)}
     */
    getComIdByGfxId(gfxId: string): string | undefined;
    getArticleByComId(comId: string): QueryableArticle | undefined;
    getArticleByGfxId(gfxId: string): QueryableArticle | undefined;
    /**
     * Retrieves the articleId property of an article instance. Will throw if the article does not exist
     *
     * @param {string} comId
     * @returns {string}
     */
    getArticleId(comId: string): string;
    /**
     * Retrieve the actual gfx id (rootId in most cases) for the article
     *
     * @param {string} comId
     * @returns {(string | undefined)}
     */
    getArticleGfxId(comId: string): string | undefined;
    /**
     * Retrieves the uppermost parent gfx id of the article
     *
     * @param {string} comId
     * @returns {(string | undefined)}
     */
    getArticleGfxSuperRootId(comId: string): string | undefined;
    /**
     * Retrieves the configuration property of an article instance. Will throw if the article does not exist
     *
     * @param {string} comId
     * @returns {IGXE.IArticleConfiguration}
     */
    getArticleConfiguration(comId: string): IGXE.IArticleConfiguration;
    /**
     * Retrieves the properties property of an article instance. Will throw if the article does not exist
     *
     * @param {string} comId
     * @returns {IGXE.IProperty[]}
     */
    getArticleProperties(comId: string): IGXE.IProperty[];
    /**
     * Retrieves as specific property of an article instance. Will throw if the article does not exist
     *
     * @param {string} comId
     * @param {string} propertyKey
     * @returns {(IGXE.IProperty | undefined)}
     */
    getArticleProperty(comId: string, propertyKey: string): IGXE.IProperty | undefined;
    /**
     * Retrieves the categories property of an article instance. Will throw if the article does not exist
     *
     * @param {string} comId
     * @returns {ArticleCategories}
     */
    getArticleCategories(comId: string): ArticleCategories;
    /**
     * Retrieves the articleData property of an article instance. Will throw if the article does not exist
     *
     * @param {string} comId
     * @returns {object}
     */
    getArticleData(comId: string): object;
    /**
     * Retrieves the sourceData property of an article instance. Will throw if the article does not exist
     *
     * @param {string} comId
     * @returns {object}
     */
    getArticleSourceData(comId: string): object;
    /**
     * Retrieves the source property of an article instance. Will throw if the article does not exist
     *
     * @param {string} comId
     * @returns {string}
     */
    getArticleSource(comId: string): string;
    /**
     * Retrieves the parent property of an article instance. Will throw if the article does not exist
     *
     * @param {string} comId
     * @returns {(string | undefined)}
     */
    getArticleParent(comId: string): string | undefined;
    /**
     * Retrieves the children property of an article instance. Will throw if the article does not exist
     *
     * @param {string} comId
     * @returns {string[]}
     */
    getArticleChildren(comId: string): string[];
    /**
     * Retrieves the placement property of an article instance. Will throw if the article does not exist
     *
     * @param {string} comId
     * @returns {(Required<IPlacement> | undefined)}
     */
    getArticlePlacement(comId: string): Required<IPlacement> | undefined;
    /**
     * Retrieves the articleInfo property of an article instance. Will throw if the article does not exist
     *
     * @param {string} comId
     * @returns {ArticleInfo}
     */
    getArticleInfo(comId: string): ArticleInfo;
    /**
     * Retrieves the first article that matches the supplied test function. Will return undefined when no article matches
     *
     * @param {(article: QueryableArticle) => boolean} [where]
     * @returns {(QueryableArticle | undefined)}
     */
    getFirstArticle(where?: (article: QueryableArticle) => boolean): QueryableArticle | undefined;
    /**
     * Traverses upwards from the specified article until the condition matches and returns the matching article or undefined if no article matches.
     *
     * @param {string} comId
     * @param {(article: QueryableArticle) => boolean} [where]
     * @returns {(QueryableArticle | undefined)}
     */
    getFirstArticleParent(comId: string, where?: (article: QueryableArticle) => boolean): QueryableArticle | undefined;
    /**
     * Retrieves all children/grand-children/... of an article
     *
     * @param {string} comId
     * @returns {string[]}
     */
    getDeepArticleChildren(comId: string): string[];
}
