import { OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
import { Subject } from 'rxjs';
import { ResourceData, MJCredentialEntity, MJCredentialTypeEntity } from '@memberjunction/core-entities';
import { BaseResourceComponent } from '@memberjunction/ng-shared';
import { CredentialEditPanelComponent } from '@memberjunction/ng-credentials';
import { FilterFieldConfig, ViewToggleOption, MJConfirmService } from '@memberjunction/ng-ui-components';
import * as i0 from "@angular/core";
type ViewMode = 'grid' | 'list';
type StatusFilter = '' | 'active' | 'inactive' | 'expired' | 'expiring';
export declare class CredentialsListResourceComponent extends BaseResourceComponent implements OnInit, OnDestroy {
    private cdr;
    private confirm;
    isLoading: boolean;
    credentials: MJCredentialEntity[];
    filteredCredentials: MJCredentialEntity[];
    types: MJCredentialTypeEntity[];
    viewMode: ViewMode;
    searchText: string;
    selectedTypeFilter: string;
    selectedStatusFilter: StatusFilter;
    showActiveOnly: boolean;
    selectedCredentials: Set<string>;
    private _isAllSelected;
    private _metadata;
    private _permissionCache;
    protected destroy$: Subject<void>;
    editPanel: CredentialEditPanelComponent;
    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, confirm: MJConfirmService);
    ngOnInit(): void;
    ngOnDestroy(): void;
    GetResourceDisplayName(data: ResourceData): Promise<string>;
    GetResourceIconClass(data: ResourceData): Promise<string>;
    get UserCanCreate(): boolean;
    get UserCanUpdate(): boolean;
    get UserCanDelete(): boolean;
    private checkEntityPermission;
    private loadData;
    private handleNavigationConfig;
    createNewCredential(): void;
    createNewCredentialWithType(typeId?: string, categoryId?: string): void;
    editCredential(credential: MJCredentialEntity, event?: Event): void;
    onCredentialSaved(credential: MJCredentialEntity): void;
    onCredentialDeleted(credentialId: string): void;
    deleteCredential(credential: MJCredentialEntity, event?: Event): Promise<void>;
    toggleCredentialActive(credential: MJCredentialEntity, event?: Event): Promise<void>;
    toggleSelection(credential: MJCredentialEntity, event?: Event): void;
    toggleSelectAll(): void;
    isAllSelected(): boolean;
    isSelected(credential: MJCredentialEntity): boolean;
    clearSelection(): void;
    private updateAllSelectedState;
    deleteSelected(): Promise<void>;
    onSearchChange(value: string): void;
    onTypeFilterChange(typeId: string): void;
    onStatusFilterChange(status: StatusFilter): void;
    onActiveFilterChange(showActive: boolean): void;
    clearFilters(): void;
    /** True when search and/or any filter narrow the list. */
    get IsListNarrowed(): boolean;
    /** Empty-state CTA: reset filters when narrowed, otherwise create. */
    onEmptyStateAction(): void;
    get hasActiveFilters(): boolean;
    private applyFilters;
    setViewMode(mode: ViewMode): void;
    getTypeById(typeId: string): MJCredentialTypeEntity | undefined;
    getTypesByCategory(): Map<string, MJCredentialTypeEntity[]>;
    getStatusClass(credential: MJCredentialEntity): string;
    getStatusLabel(credential: MJCredentialEntity): string;
    getStatusIcon(credential: MJCredentialEntity): string;
    formatDate(date: Date | null | undefined): string;
    formatDateTime(date: Date | null | undefined): string;
    getTimeAgo(date: Date | null | undefined): string;
    getTypeIcon(credential: MJCredentialEntity): string;
    refresh(): void;
    get activeCount(): number;
    getActiveCount(): number;
    get expiringCount(): number;
    getExpiringSoonCount(): number;
    get expiredCount(): number;
    getExpiredCount(): number;
    isExpired(credential: MJCredentialEntity): boolean;
    isExpiringSoon(credential: MJCredentialEntity): boolean;
    bulkToggleActive(active: boolean): Promise<void>;
    bulkDelete(): Promise<void>;
    static ɵfac: i0.ɵɵFactoryDeclaration<CredentialsListResourceComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<CredentialsListResourceComponent, "mj-credentials-list-resource", never, {}, {}, never, never, false, never>;
}
export {};
//# sourceMappingURL=credentials-list-resource.component.d.ts.map