import { IGXR } from "@intelligentgraphics/igd.core";
import { Session, CatalogRegistrator, ConnectionManager, SourceRegistry, LocalizationManager } from "../Types";
export declare type TOnGetExternalDataCallback = (source: string, url: string) => Promise<any>;
export declare type ServiceCredentials = {
    cis?: {
        userId: number;
        sessionToken: string;
    };
};
export interface IGXRCatalogListEntry {
    ManufacturerId: string;
    ManufacturerName: string;
    CatalogId: string;
    CatalogName: string;
    SourceId: string;
    Keywords?: string[];
    Image?: string;
    Hidden: boolean;
}
export interface IGXRCatalogWizard {
    Name?: string;
    Image?: string;
    Options?: Record<string, any>;
    LoadPath?: string;
}
export declare type TIGXRCatalogList = IGXRCatalogListEntry[];
export declare type CatalogIdentifier = string | {
    catalogId: string;
    manufacturerId: string;
} | {
    CatalogId: string;
    ManufacturerId: string;
};
/** Loader for IGXR data. */
export declare class IGXRLoader implements CatalogRegistrator {
    /** Merged IGXR data */
    protected _igxr: IGXR.IGXR_Object;
    protected intializePromises: Record<string, Promise<string>>;
    /** Constructor. */
    constructor(igxrData: IGXR.IGXR_Object[]);
    addIGXR(igxrData: IGXR.IGXR_Object): void;
    loadCatalog(sourceId: string, registry: SourceRegistry, connectionManager: ConnectionManager, localizationManager: LocalizationManager): Promise<string>;
    loadCatalogs(sourceIds: string[], registry: SourceRegistry, connectionManager: ConnectionManager, localizationManager: LocalizationManager): Promise<string[]>;
    addAllCatalogsToSession(session: Session): Promise<string[]>;
    /**
     * Registers services for the specified catalogs inside the session
     *
     * @param {Session} session
     * @param {CatalogIdentifier[]} catalogs
     * @returns
     */
    addCatalogsToSession(catalogs: CatalogIdentifier[], session: Session): Promise<string[]>;
    addCatalogToSession(catalog: CatalogIdentifier, session: Session): Promise<string>;
    /**
     * Register selected catalogs in the Dispatcher.
     * @param catalogs A list of catalogs Ids.
     */
    protected registerCatalogs(catalogs: CatalogIdentifier[], registry: SourceRegistry, connectionManager: ConnectionManager, localizationManager: LocalizationManager): Promise<string[]>;
    protected registerCatalog(manufacturerId: string, catalogId: string, registry: SourceRegistry, connectionManager: ConnectionManager, localizationManager: LocalizationManager): Promise<string>;
    /**
     * returns the merged IGXR data
     */
    readonly IGXR: IGXR.IGXR_Object;
    getServerType(serverId: string): string | undefined;
    getCatalog(identifier: CatalogIdentifier): IGXR.ICatalog | undefined;
    protected findOne(haystack: string[], arr: string[]): boolean;
    getAllManufacturers(language?: string, filterTags?: string[]): string[];
    getAllCatalogTags(language?: string): string[];
    /**
     * Returns the entries of the IGXR as a straightened list, optionally filtered.
     * @param language Language to use
     * @param filterManufacturers manufacturer names (in /language/)
     * @param filterTags category names (in /language/)
     */
    getCatalogList(language?: string, filterManufacturers?: string[], filterTags?: string[], sorted?: boolean): TIGXRCatalogList;
    /**
     * Retrieves informations for the specified catalog identifier
     *
     * @param {CatalogIdentifier} catalogIdentifier
     * @param {string} [language="any"]
     * @returns {IGXRCatalogListEntry}
     */
    getCatalogInfo(catalogIdentifier: CatalogIdentifier, language?: string): IGXRCatalogListEntry;
    getWizard(catalogIdentifier: CatalogIdentifier, language?: string): IGXRCatalogWizard | undefined;
    protected findCatalog(manufacturerId: string, catalogId: string): {
        manufacturer: IGXR.IManufacturer;
        catalog: IGXR.ICatalog;
    };
    protected loadExternalData<T>(source: string, url: string): Promise<T>;
    protected extractCatalogAndManufacturerId(catalogIdentifier: CatalogIdentifier): {
        catalogId: string;
        manufacturerId: string;
    };
}
