import { OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
import { ResourceData, MJCredentialCategoryEntity, MJCredentialTypeEntity } from '@memberjunction/core-entities';
import { BaseResourceComponent, NavigationService } from '@memberjunction/ng-shared';
import { CredentialCategoryEditPanelComponent } from '@memberjunction/ng-credentials';
import * as i0 from "@angular/core";
interface CategoryNode {
    category: MJCredentialCategoryEntity;
    children: CategoryNode[];
    expanded: boolean;
    level: number;
    typeCount: number;
}
export declare class CredentialsCategoriesResourceComponent extends BaseResourceComponent implements OnInit, OnDestroy {
    private cdr;
    private navigationService;
    isLoading: boolean;
    categories: MJCredentialCategoryEntity[];
    categoryTree: CategoryNode[];
    types: MJCredentialTypeEntity[];
    selectedNode: CategoryNode | null;
    searchText: string;
    private _metadata;
    private _permissionCache;
    categoryEditPanel: CredentialCategoryEditPanelComponent;
    constructor(cdr: ChangeDetectorRef, navigationService: NavigationService);
    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 buildTree;
    createNewCategory(): void;
    createChildCategory(parentNode: CategoryNode, event?: Event): void;
    editCategory(node: CategoryNode, event?: Event): void;
    deleteCategory(node: CategoryNode, event?: Event): Promise<void>;
    onCategorySaved(category: MJCredentialCategoryEntity): void;
    onCategoryDeleted(categoryId: string): void;
    selectNode(node: CategoryNode): void;
    toggleExpand(node: CategoryNode, event?: Event): void;
    onSearchChange(value: string): void;
    clearSearch(): void;
    expandAll(): void;
    collapseAll(): void;
    getFlattenedNodes(): CategoryNode[];
    private nodeMatchesSearch;
    getTotalTypeCount(): number;
    getTypesForCategory(categoryName: string): MJCredentialTypeEntity[];
    createCredentialWithCategory(categoryId: string, event?: Event): void;
    viewTypesForCategory(categoryName: string, event?: Event): void;
    /** Case-insensitive UUID check whether a tree node is the currently selected node. */
    IsNodeSelected(node: CategoryNode): boolean;
    getCategoryColor(index: number): string;
    refresh(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<CredentialsCategoriesResourceComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<CredentialsCategoriesResourceComponent, "mj-credentials-categories-resource", never, {}, {}, never, never, false, never>;
}
export {};
//# sourceMappingURL=credentials-categories-resource.component.d.ts.map