import { OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
import { Subject } from 'rxjs';
import { MJAIVendorEntity, MJAIModelTypeEntity, ResourceData } from '@memberjunction/core-entities';
import { SharedService, BaseResourceComponent } from '@memberjunction/ng-shared';
import { MJAIModelEntityExtended } from '@memberjunction/ai-core-plus';
import { FilterFieldConfig } from '@memberjunction/ng-ui-components';
import * as i0 from "@angular/core";
interface ModelDisplayData extends MJAIModelEntityExtended {
    VendorName?: string;
    VendorID?: string;
    ModelTypeName?: string;
    PowerRankDisplay?: string;
    SpeedRankDisplay?: string;
    CostRankDisplay?: string;
}
/**
 * AI Models Resource - displays AI model management
 * Extends BaseResourceComponent to work with the resource type system
 */
export declare class ModelManagementComponent extends BaseResourceComponent implements OnInit, OnDestroy {
    private sharedService;
    private cdr;
    private readonly USER_SETTINGS_KEY;
    private settingsPersistSubject;
    private settingsLoaded;
    viewMode: 'grid' | 'list';
    isLoading: boolean;
    showFilters: boolean;
    expandedModelId: string | null;
    models: MJAIModelEntityExtended[];
    filteredModels: MJAIModelEntityExtended[];
    vendors: MJAIVendorEntity[];
    modelTypes: MJAIModelTypeEntity[];
    searchTerm: string;
    private searchSubject;
    selectedVendor: string;
    selectedType: string;
    selectedStatus: string;
    powerRankRange: {
        min: number;
        max: number;
    };
    speedRankRange: {
        min: number;
        max: number;
    };
    costRankRange: {
        min: number;
        max: number;
    };
    selectedModel: ModelDisplayData | null;
    detailPanelVisible: boolean;
    sortBy: string;
    sortDirection: 'asc' | 'desc';
    sortOptions: {
        value: string;
        label: string;
    }[];
    maxPowerRank: number;
    maxSpeedRank: number;
    maxCostRank: number;
    loadingMessages: string[];
    currentLoadingMessage: string;
    private loadingMessageIndex;
    private loadingMessageInterval;
    protected destroy$: Subject<void>;
    constructor(sharedService: SharedService, cdr: ChangeDetectorRef);
    ngOnInit(): void;
    ngOnDestroy(): void;
    private subscribeToCacheInvalidation;
    private refreshDataFromEngine;
    private setupSearchListener;
    /**
     * Load saved user preferences from the UserInfoEngine
     */
    private loadUserPreferences;
    /**
     * Apply loaded preferences to component state
     */
    private applyUserPreferencesFromStorage;
    /**
     * Get current preferences as an object for saving
     */
    private getCurrentPreferences;
    /**
     * Persist user preferences to storage (debounced)
     */
    private saveUserPreferencesDebounced;
    /**
     * Actually persist user preferences to the UserInfoEngine
     */
    private persistUserPreferences;
    private startLoadingMessages;
    private loadInitialData;
    formatRank(rank: number | null, rankType?: 'power' | 'speed' | 'cost'): string;
    private applyInitialState;
    onSearchChange(value: string): void;
    toggleFilters(): void;
    toggleFilterPanel(): void;
    setViewMode(mode: 'grid' | 'list'): void;
    toggleModelExpansion(modelId: string): void;
    applyFilters(): void;
    private sortModels;
    onVendorChange(vendorId: string): void;
    onTypeChange(typeId: string): void;
    onStatusChange(status: string): void;
    onSortChange(sortBy: string): void;
    toggleModelStatus(model: ModelDisplayData, event: Event): Promise<void>;
    openModel(modelId: string): void;
    /**
     * Show the detail panel for a model
     */
    showModelDetails(model: MJAIModelEntityExtended, event?: Event): void;
    /**
     * Close the detail panel
     */
    closeDetailPanel(): void;
    /**
     * Open the full entity record from the detail panel
     */
    openModelFromPanel(): void;
    createNewModel(): Promise<void>;
    getModelIcon(model: ModelDisplayData): string;
    getRankClass(rank: number | null, rankType?: 'power' | 'speed' | 'cost'): string;
    get hasActiveFilters(): boolean;
    clearFilters(): void;
    /** Empty-state CTA: clear filters when the list is narrowed, otherwise create. */
    onEmptyStateAction(): void;
    /** Reset only the popover filters — leave searchTerm (toolbar) untouched. */
    resetPopoverFilters(): void;
    /** Number of active filter criteria inside the popover (excludes searchTerm + sortBy). */
    get ActiveFilterCount(): number;
    /** View-mode options for the shared <mj-view-toggle>. */
    readonly modelViewOptions: {
        key: string;
        icon: string;
        title: string;
    }[];
    /** Values record consumed by the centralized <mj-filter-panel>. */
    get modelFilterValues(): Record<string, unknown>;
    /** Field config consumed by the centralized <mj-filter-panel>. */
    get modelFilterFields(): FilterFieldConfig[];
    /** Receive the updated values record from <mj-filter-panel> and apply it. */
    onFilterValuesChange(values: Record<string, unknown>): void;
    formatTokenLimit(limit: number): string;
    validateAndApplyRankFilters(rankType: 'power' | 'speed' | 'cost'): void;
    GetResourceDisplayName(data: ResourceData): Promise<string>;
    GetResourceIconClass(data: ResourceData): Promise<string>;
    static ɵfac: i0.ɵɵFactoryDeclaration<ModelManagementComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<ModelManagementComponent, "app-model-management", never, {}, {}, never, never, false, never>;
}
export {};
//# sourceMappingURL=model-management.component.d.ts.map