import { ChangeDetectorRef, OnDestroy, ElementRef } from '@angular/core';
import { BaseResourceComponent } from '@memberjunction/ng-shared';
import { ResourceData } from '@memberjunction/core-entities';
import { MJListEntity, MJListCategoryEntity } from '@memberjunction/core-entities';
import { Subject } from 'rxjs';
import { TabService } from '@memberjunction/ng-base-application';
import { MJNotificationService } from '@memberjunction/ng-notifications';
import * as i0 from "@angular/core";
interface ListViewModel {
    list: MJListEntity;
    itemCount: number;
    entityName: string;
}
interface CategoryNode {
    category: MJListCategoryEntity | null;
    lists: ListViewModel[];
    children: CategoryNode[];
    isExpanded: boolean;
}
export declare class ListsMyListsResource extends BaseResourceComponent implements OnDestroy {
    private cdr;
    private tabService;
    private notificationService;
    private elementRef;
    protected destroy$: Subject<void>;
    isLoading: boolean;
    searchTerm: string;
    viewMode: 'grid' | 'list';
    allLists: ListViewModel[];
    filteredLists: ListViewModel[];
    categories: MJListCategoryEntity[];
    categoryTree: CategoryNode[];
    flatCategories: Array<{
        ID: string | null;
        displayName: string;
    }>;
    availableEntities: Array<{
        ID: string;
        Name: string;
    }>;
    filteredEntities: Array<{
        ID: string;
        Name: string;
    }>;
    showContextMenu: boolean;
    contextMenuX: number;
    contextMenuY: number;
    selectedContextList: MJListEntity | null;
    showCreateDialog: boolean;
    editingList: MJListEntity | null;
    newListName: string;
    newListDescription: string;
    selectedEntityId: string;
    selectedCategoryId: string | null;
    entitySearchTerm: string;
    showEntityDropdown: boolean;
    entityDropdownPosition: {
        top: number;
        left: number;
        width: number;
        openAbove: boolean;
    };
    showDeleteConfirm: boolean;
    deleteListName: string;
    listToDelete: MJListEntity | null;
    isSaving: boolean;
    isDeleting: boolean;
    private categoryMap;
    private entityColorMap;
    private entityIconMap;
    constructor(cdr: ChangeDetectorRef, tabService: TabService, notificationService: MJNotificationService, elementRef: ElementRef);
    onDocumentClick(event: MouseEvent): void;
    onEscapeKey(): void;
    ngOnInit(): Promise<void>;
    ngOnDestroy(): void;
    /** Report the My-Lists surface's salient state to the AI agent. */
    private publishAgentContext;
    /**
     * Resolve an agent-supplied reference (a list ID or NAME, exact or partial) to
     * one of the user's loaded lists via the pure {@link resolveNamedRecord} helper.
     */
    private resolveMyListItem;
    /** Register the My-Lists surface's agent-actionable tools. */
    private registerAgentTools;
    loadData(): Promise<void>;
    private buildFlatCategories;
    private buildCategoryTree;
    onSearchChange(_term: string): void;
    /** Set the grid/list view mode and refresh agent context. */
    setViewMode(mode: 'grid' | 'list'): void;
    clearSearch(): void;
    /** Message for the no-results empty state, echoing the active search term. */
    get NoResultsMessage(): string;
    private applyFilter;
    toggleCategory(node: CategoryNode): void;
    getListCountInCategory(node: CategoryNode): number;
    getCategoryName(categoryId: string): string;
    getEntityColor(entityName: string): string;
    getEntityIcon(entityName: string): string;
    private generateEntityColor;
    formatDate(date: Date): string;
    openList(list: MJListEntity): void;
    openListMenu(event: Event, list: MJListEntity): void;
    closeContextMenu(): void;
    createNewList(): void;
    editList(): void;
    selectEntity(entity: {
        ID: string;
        Name: string;
    }): void;
    filterEntities(term: string): void;
    openEntityDropdown(inputElement: HTMLInputElement): void;
    closeEntityDropdown(): void;
    duplicateList(): Promise<void>;
    confirmDeleteList(): void;
    cancelDelete(): void;
    deleteList(): Promise<void>;
    closeCreateDialog(): void;
    saveList(): Promise<void>;
    GetResourceDisplayName(_data: ResourceData): Promise<string>;
    GetResourceIconClass(_data: ResourceData): Promise<string>;
    static ɵfac: i0.ɵɵFactoryDeclaration<ListsMyListsResource, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<ListsMyListsResource, "mj-lists-my-lists-resource", never, {}, {}, never, never, false, never>;
}
export {};
//# sourceMappingURL=lists-my-lists-resource.component.d.ts.map