import { Code, CodeTypeModel, InitModelOf, Locale, ObjectOrModel, ObjectWithType, TreeVisitor, TreeVisitResult } from '../index';
export declare class CodeType<TCodeId = string, TCode extends Code<TCodeId> = Code<TCodeId>, TCodeTypeId = string> implements ObjectWithType {
    model: CodeTypeModel<TCodeId, TCode, TCodeTypeId>;
    id: TCodeTypeId;
    objectType: string;
    modelClass: string;
    iconId: string;
    hierarchical: boolean;
    maxLevel: number;
    codeMap: Map<TCodeId, TCode>;
    protected _textKey: string;
    protected _textKeyPlural: string;
    constructor();
    init(model: InitModelOf<this>): void;
    /**
     * Override this method and add additional properties which should not be validated to be present after CodeType init.
     * @returns A Set with all public properties (fields) of this CodeType which do _not_ point to a nested Code instance.
     */
    protected _getPublicNonCodeProperties(): Set<string>;
    protected _validateCodeFields(): void;
    protected _ensureCodeAvailable(fieldName: string): void;
    protected _add(code: TCode): void;
    protected _registerTexts(suffix: string, textMap: Record<string, string>): string;
    /**
     * @param vararg The language tag or the {@link Locale} to load the text for.
     */
    text(vararg: string | Locale): string;
    /**
     * @param vararg The language tag or the {@link Locale} to load the plural text for.
     */
    textPlural(vararg: string | Locale): string;
    protected _text(key: string, vararg: string | Locale): string;
    /**
     * Gets the codes of this CodeType.
     * @param rootOnly true if only the root Codes should be returned. The default value is false.
     * @returns the root Codes of this CodeType if rootOnly is true and all Codes recursively otherwise.
     */
    codes(): TCode[];
    /** @deprecated use {@link CodeTypeCodesOptions} instead */
    codes(rootOnly?: boolean): TCode[];
    codes(options: CodeTypeCodesOptions): TCode[];
    /**
     * Gets the Code with given id. All codes recursively are searched.
     * @param codeId The Code id to search
     * @returns The Code with given id or null.
     */
    get(codeId: TCodeId): TCode;
    /**
     * Visits all codes and their children recursively.
     *
     * By default, only active codes are visited. To visit inactive codes as well, set the `activeOnly` argument to false.
     *
     * In order to abort visiting, the visitor can return true or {@link TreeVisitResult.TERMINATE}.
     * To only abort the visiting of a subtree, the visitor can return {@link TreeVisitResult.SKIP_SUBTREE}.
     */
    visitChildren(visitor: TreeVisitor<TCode>, activeOnly?: boolean): boolean | TreeVisitResult;
    static ensure<TCode extends Code<TCodeId>, TCodeId, TCodeTypeId>(codeType: ObjectOrModel<CodeType<TCodeId, TCode, TCodeTypeId>>): CodeType<TCodeId, TCode, TCodeTypeId>;
}
export type CodeTypeCodesOptions = {
    rootOnly?: boolean;
    activeOnly?: boolean;
};
//# sourceMappingURL=CodeType.d.ts.map