import { OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
import { ResourceData, MJCredentialTypeEntity, MJCredentialEntity } from '@memberjunction/core-entities';
import { BaseResourceComponent } from '@memberjunction/ng-shared';
import { CredentialTypeEditPanelComponent } from '@memberjunction/ng-credentials';
import { FilterFieldConfig } from '@memberjunction/ng-ui-components';
import * as i0 from "@angular/core";
interface FieldSchemaProperty {
    name: string;
    type: string;
    title: string;
    description: string;
    isSecret: boolean;
    required: boolean;
}
interface TypeWithStats extends MJCredentialTypeEntity {
    credentialCount: number;
    activeCount: number;
    expiringCount: number;
}
export declare class CredentialsTypesResourceComponent extends BaseResourceComponent implements OnInit, OnDestroy {
    private cdr;
    isLoading: boolean;
    types: TypeWithStats[];
    filteredTypes: TypeWithStats[];
    credentials: MJCredentialEntity[];
    selectedType: TypeWithStats | null;
    schemaProperties: FieldSchemaProperty[];
    searchText: string;
    selectedCategoryFilter: string;
    categories: string[];
    private _metadata;
    private _permissionCache;
    typeEditPanel: CredentialTypeEditPanelComponent;
    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>;
    get UserCanCreate(): boolean;
    get UserCanUpdate(): boolean;
    get UserCanDelete(): boolean;
    get UserCanCreateCredential(): boolean;
    private checkEntityPermission;
    private loadData;
    private handleNavigationConfig;
    private enrichTypeWithStats;
    createNewType(): void;
    editType(type: TypeWithStats, event?: Event): void;
    deleteType(type: TypeWithStats, event?: Event): Promise<void>;
    createCredentialForType(type: TypeWithStats, event?: Event): void;
    onTypeSaved(type: MJCredentialTypeEntity): void;
    onTypeDeleted(typeId: string): void;
    onSearchChange(value: string): void;
    onCategoryFilterChange(category: string): void;
    clearFilters(): void;
    private applyFilters;
    selectType(type: TypeWithStats): void;
    closeDetail(): void;
    private parseFieldSchema;
    getCategoryIcon(category: string): string;
    getCategoryColor(category: string): string;
    getTypesByCategory(): Map<string, TypeWithStats[]>;
    /** Case-insensitive UUID check whether a credential type is the currently selected type. */
    IsTypeSelected(type: TypeWithStats): boolean;
    getTotalCredentialCount(): number;
    refresh(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<CredentialsTypesResourceComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<CredentialsTypesResourceComponent, "mj-credentials-types-resource", never, {}, {}, never, never, false, never>;
}
export {};
//# sourceMappingURL=credentials-types-resource.component.d.ts.map