import { OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
import { Subject } from 'rxjs';
import { BaseResourceComponent } from '@memberjunction/ng-shared';
import { ResourceData, MJVersionLabelEntityType } from '@memberjunction/core-entities';
import { EntityLinkClickEvent } from '@memberjunction/ng-versions';
import { FilterFieldConfig, ViewToggleOption } from '@memberjunction/ng-ui-components';
import * as i0 from "@angular/core";
interface ScopeStat {
    Scope: string;
    Count: number;
    Icon: string;
    Color: string;
}
interface StatusStat {
    Status: string;
    Count: number;
    Color: string;
}
type SortField = 'Name' | 'Scope' | 'Status' | 'Items' | 'Date';
export declare class VersionHistoryLabelsResourceComponent extends BaseResourceComponent implements OnInit, OnDestroy {
    private cdr;
    private static readonly PREFS_KEY;
    IsLoading: boolean;
    ViewMode: 'card' | 'list';
    SelectedLabel: MJVersionLabelEntityType | null;
    ShowDetailPanel: boolean;
    TotalLabels: number;
    ActiveLabels: number;
    ArchivedLabels: number;
    RestoredLabels: number;
    ScopeStats: ScopeStat[];
    StatusStats: StatusStat[];
    Labels: MJVersionLabelEntityType[];
    FilteredLabels: MJVersionLabelEntityType[];
    ItemCountMap: Map<string, number>;
    ScopeFilter: string;
    StatusFilter: string;
    SearchText: string;
    SortField: SortField;
    SortDirection: 'asc' | 'desc';
    private preferencesLoaded;
    ShowCreateWizard: boolean;
    private metadata;
    protected destroy$: Subject<void>;
    readonly viewOptions: ViewToggleOption[];
    get FilterFields(): FilterFieldConfig[];
    get FilterValues(): Record<string, unknown>;
    get ActiveFilterCount(): number;
    onFilterValuesChange(v: Record<string, unknown>): void;
    resetFilters(): void;
    constructor(cdr: ChangeDetectorRef);
    ngOnInit(): void;
    ngOnDestroy(): void;
    GetResourceDisplayName(data: ResourceData): Promise<string>;
    GetResourceIconClass(data: ResourceData): Promise<string>;
    LoadData(): Promise<void>;
    private buildItemCountMap;
    GetItemCount(labelId: string | undefined): number;
    ResolveEntityName(entityId: string | undefined): string;
    private computeStats;
    private computeScopeStats;
    private computeStatusStats;
    /** True when search and/or any filter narrow the labels list. */
    get IsListNarrowed(): boolean;
    /** Empty-state CTA: reset search + filters when narrowed, otherwise create. */
    onEmptyStateAction(): void;
    applyFilters(): void;
    private sortLabels;
    OnSortChange(field: SortField): void;
    GetSortIcon(field: SortField): string;
    OnScopeFilterChange(scope: string): void;
    OnStatusFilterChange(status: string): void;
    OnSearchChange(text: string): void;
    Refresh(): void;
    ToggleViewMode(): void;
    SetViewMode(mode: 'card' | 'list'): void;
    OnLabelClick(label: MJVersionLabelEntityType): void;
    OnDetailPanelClose(): void;
    OnLabelUpdated(): void;
    OnEntityLinkClick(event: EntityLinkClickEvent): void;
    private loadUserPreferences;
    private persistPreferences;
    OpenCreateDialog(): void;
    OnLabelCreated(_event: {
        LabelCount: number;
        ItemCount: number;
    }): void;
    OnCreateWizardCancel(): void;
    GetScopeIcon(scope: string | undefined): string;
    GetStatusClass(status: string | undefined): string;
    FormatDate(date: Date | string | undefined): string;
    FormatNumber(num: number): string;
    FormatDuration(ms: number | undefined): string;
    IsGroupParent(label: MJVersionLabelEntityType): boolean;
    GetChildLabels(parentId: string | undefined): MJVersionLabelEntityType[];
    static ɵfac: i0.ɵɵFactoryDeclaration<VersionHistoryLabelsResourceComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<VersionHistoryLabelsResourceComponent, "mj-version-history-labels-resource", never, {}, {}, never, never, false, never>;
}
export {};
//# sourceMappingURL=labels-resource.component.d.ts.map