import { ChangeDetectorRef, OnDestroy } from '@angular/core';
import { BaseResourceComponent } from '@memberjunction/ng-shared';
import { ResourceData, MJListCategoryEntity, MJListEntity } from '@memberjunction/core-entities';
import { Subject } from 'rxjs';
import { MJNotificationService } from '@memberjunction/ng-notifications';
import * as i0 from "@angular/core";
interface CategoryViewModel {
    category: MJListCategoryEntity;
    listCount: number;
    childCount: number;
    depth: number;
    isExpanded: boolean;
}
export declare class ListsCategoriesResource extends BaseResourceComponent implements OnDestroy {
    private cdr;
    private notificationService;
    protected destroy$: Subject<void>;
    isLoading: boolean;
    categories: MJListCategoryEntity[];
    categoryViewModels: CategoryViewModel[];
    selectedCategory: MJListCategoryEntity | null;
    selectedCategoryLists: MJListEntity[];
    showDialog: boolean;
    editingCategory: MJListCategoryEntity | null;
    dialogName: string;
    dialogDescription: string;
    dialogParentId: string | null;
    availableParents: Array<{
        ID: string | null;
        displayName: string;
    }>;
    isSaving: boolean;
    showDeleteConfirm: boolean;
    deleteConfirmMessage: string;
    private categoryToDelete;
    private listsByCategoryId;
    private categoryMap;
    constructor(cdr: ChangeDetectorRef, notificationService: MJNotificationService);
    ngOnInit(): Promise<void>;
    ngOnDestroy(): void;
    /**
     * Report the Categories surface's salient state to the AI agent.
     * Re-called whenever the selection changes or data reloads.
     */
    private publishAgentContext;
    /**
     * Resolve an agent-supplied reference (a category ID or NAME, exact or
     * partial) to one of the loaded categories via the pure {@link resolveNamedRecord}
     * helper. Returns the matching {@link MJListCategoryEntity}, or null.
     */
    private resolveCategory;
    /**
     * Register the Categories surface's agent-actionable tools. SAFE tools
     * select / expand a category; the single bounded-mutation tool only
     * opens the dialog-validated create flow.
     */
    private registerAgentTools;
    loadData(): Promise<void>;
    private buildCategoryViewModels;
    private buildAvailableParents;
    private isDescendantOf;
    getTopLevelCategories(): CategoryViewModel[];
    getChildCategories(parent: MJListCategoryEntity): CategoryViewModel[];
    hasChildren(category: MJListCategoryEntity): boolean;
    toggleExpand(event: Event, vm: CategoryViewModel): void;
    expandNode(event: Event, vm: CategoryViewModel): void;
    collapseNode(event: Event, vm: CategoryViewModel): void;
    IsCategorySelected(category: MJListCategoryEntity): boolean;
    selectCategory(category: MJListCategoryEntity): void;
    getParentCategoryName(category: MJListCategoryEntity): string | null;
    getSelectedCategoryListCount(): number;
    getSelectedCategoryChildCount(): number;
    createCategory(): void;
    editCategory(): void;
    deleteCategory(): void;
    cancelDelete(): void;
    confirmDelete(): Promise<void>;
    closeDialog(): void;
    saveCategory(): Promise<void>;
    GetResourceDisplayName(data: ResourceData): Promise<string>;
    GetResourceIconClass(data: ResourceData): Promise<string>;
    static ɵfac: i0.ɵɵFactoryDeclaration<ListsCategoriesResource, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<ListsCategoriesResource, "mj-lists-categories-resource", never, {}, {}, never, never, false, never>;
}
export {};
//# sourceMappingURL=lists-categories-resource.component.d.ts.map