/// <reference types="jquery" />
import { CodeType, CodeTypeCacheEventMap, DoEntity, EventEmitter, ObjectModel, ObjectOrModel, UiNotificationEvent } from '../index';
/**
 * Cache for CodeTypes grouped by CodeType id.
 */
export declare class CodeTypeCache extends EventEmitter implements ObjectModel<CodeTypeCache> {
    self: CodeTypeCache;
    eventMap: CodeTypeCacheEventMap;
    id: string;
    /**
     * Map of CodeType id to CodeType instance. Do not access directly. Instead, use {@link get}.
     */
    registry: Map<any, CodeType<any, any, any>>;
    constructor();
    /**
     * Loads code types from the main system using the url configuration of that {@link System}.
     */
    bootstrapSystem(): JQuery.Promise<void>;
    /**
     * Initializes the code type map with the result of the given REST url.
     */
    bootstrap(url: string): JQuery.Promise<any>;
    protected _handleBootstrapResponse(url: string, data: any): void;
    protected _onCodeTypeUpdateNotify(event: UiNotificationEvent): void;
    protected _triggerCodeTypeChange(codeType: CodeType<any, any, any>): void;
    protected _triggerCodeTypeRemove(id: any): void;
    /**
     * Adds the given CodeType models to the registry. Existing entries with the same ids are overwritten.
     * @returns The registered CodeType instances.
     */
    add(codeTypes: ObjectOrModel<CodeType<any, any, any>> | ObjectOrModel<CodeType<any, any, any>>[]): CodeType<any, any, any>[];
    /**
     * Removes the given CodeTypes from the registry.
     *
     * @param codeTypes code types or code type ids to remove.
     */
    remove(codeTypes: string | CodeType<any, any, any> | (string | CodeType<any, any, any>)[]): void;
    /**
     * Gets the CodeType with given id or Class.
     * @param codeTypeIdOrClassRef The CodeType id or Class
     * @returns The CodeType instance or undefined if not found.
     */
    get<T extends CodeType<any>>(codeTypeIdOrClassRef: string | (new () => T)): T;
}
export interface CodeTypeUpdateMessageDo extends DoEntity {
    codeTypes: ObjectOrModel<CodeType<any, any, any>>[];
}
export declare const codes: CodeTypeCache;
//# sourceMappingURL=CodeTypeCache.d.ts.map