import { Core } from '../../../wasm/dist';
import { BaseModel } from './balancy-model.class';
import { BalancySingleton } from './balancy-singleton.class';
type Constructor<T> = {
    new (...args: any[]): T;
    getFileName(): string;
};
export declare class CMS {
    readonly wasm: Core;
    private static instance;
    private allModels;
    private allSingletons;
    private allConditionalTemplateSubscriptions;
    private inheritance;
    private smartListType;
    private isReady;
    static onTypeRequested: (templateName: string) => BaseModel | null;
    constructor(wasm: Core);
    getSmartListType(): any;
    setReady(value: boolean): void;
    getWasm(): Core;
    init(): void;
    cleanUp(): void;
    static getModels<T extends BaseModel>(modelClass: Constructor<T>, includeChildren: boolean): T[];
    static getModelByUnnyId<T extends BaseModel>(inUnnyId: string): T | null;
    getModelByUnnyIdPrivate<T extends BaseModel>(unnyId: string): T | null;
    static register(fullNameWithNamespaces: string, constructor: new () => BaseModel): void;
    private instantiateByType;
    modelRefreshed(unnyId: string, newPointer: number): void;
    private refreshInheritance;
    refreshAll(): void;
    /**
     * Get singleton instance for a given template type.
     * Supports both regular singletons and ConditionalTemplate-based singletons.
     * For ConditionalTemplate singletons, returns the variant with highest priority whose condition passes.
     *
     * @param modelClass The class constructor of the singleton model
     * @returns BalancySingleton wrapper or null if not ready
     *
     * @example
     * ```typescript
     * // Get singleton wrapper
     * const singleton = CMS.getSingleton(SmartConfig);
     *
     * // Get current value
     * const config = singleton?.get();
     *
     * // Subscribe to changes
     * singleton?.onChange((model) => {
     *   console.log('Config changed:', model);
     * });
     * ```
     */
    static getSingleton<T extends BaseModel>(modelClass: Constructor<T>): BalancySingleton<T> | null;
    /**
     * Subscribe to ConditionalTemplate status changes for a specific template type.
     * The callback is invoked when any template of this type changes condition status (passed/failed).
     *
     * @param modelClass The class constructor of the template model
     * @param callback Function called when template status changes (model, passed)
     * @param includeChildren Whether to include child templates (default: true)
     * @returns Subscription key to use for unsubscribing, or null if not ready
     *
     * @example
     * ```typescript
     * // Subscribe to GameEvent status changes
     * const key = CMS.subscribeConditionalTemplate(
     *   GameEvent,
     *   (event, passed) => {
     *     if (passed) {
     *       console.log('Event activated:', event.name);
     *     } else {
     *       console.log('Event deactivated:', event.name);
     *     }
     *   }
     * );
     *
     * // Later, unsubscribe
     * if (key) {
     *   CMS.unsubscribeConditionalTemplate(key);
     * }
     * ```
     */
    static subscribeConditionalTemplate<T extends BaseModel>(modelClass: Constructor<T>, callback: (model: T, passed: boolean) => void, includeChildren?: boolean): string | null;
    /**
     * Unsubscribe from ConditionalTemplate status changes.
     *
     * @param subscriptionKey The subscription key returned by subscribeConditionalTemplate
     *
     * @example
     * ```typescript
     * const key = CMS.subscribeConditionalTemplate(GameEvent, callback);
     * // ... later ...
     * if (key) {
     *   CMS.unsubscribeConditionalTemplate(key);
     * }
     * ```
     */
    static unsubscribeConditionalTemplate(subscriptionKey: string): void;
    /**
     * Get all currently active ConditionalTemplates of a specific type.
     * Only returns templates whose conditions are currently passing.
     * Results are sorted by priority (highest first).
     *
     * @param modelClass The class constructor of the template model
     * @param includeChildren Whether to include child templates (default: true)
     * @returns Array of active template models
     *
     * @example
     * ```typescript
     * // Get all currently active events
     * const activeEvents = CMS.getActiveConditionalTemplates(GameEvent);
     * activeEvents.forEach(event => {
     *   console.log('Active event:', event.name, 'Priority:', event.priority);
     * });
     * ```
     */
    static getActiveConditionalTemplates<T extends BaseModel>(modelClass: Constructor<T>, includeChildren?: boolean): T[];
}
export {};
//# sourceMappingURL=cms.class.d.ts.map