import { ChangeDetectorRef, OnDestroy, ElementRef } from '@angular/core';
import { BaseResourceComponent } from '@memberjunction/ng-shared';
import { ResourceData, MJListCategoryEntity } from '@memberjunction/core-entities';
import { MJListEntity } from '@memberjunction/core-entities';
import { TabService } from '@memberjunction/ng-base-application';
import { MJNotificationService } from '@memberjunction/ng-notifications';
import { ListSharingService, ListSharingSummary, ListShareDialogConfig, ListShareDialogResult } from '@memberjunction/ng-list-management';
import * as i0 from "@angular/core";
interface BrowseListItem {
    list: MJListEntity;
    itemCount: number;
    entityName: string;
    ownerName: string;
    isOwner: boolean;
    sharingInfo?: ListSharingSummary;
}
interface CategoryNode {
    category: MJListCategoryEntity | null;
    lists: BrowseListItem[];
    children: CategoryNode[];
    isExpanded: boolean;
}
type ViewMode = 'table' | 'card' | 'hierarchy';
export declare class ListsBrowseResource extends BaseResourceComponent implements OnDestroy {
    private cdr;
    private tabService;
    private notificationService;
    private elementRef;
    private listSharingService;
    private destroy$;
    isLoading: boolean;
    searchTerm: string;
    viewMode: ViewMode;
    selectedEntity: string;
    selectedOwner: string;
    selectedSort: string;
    allLists: BrowseListItem[];
    filteredLists: BrowseListItem[];
    categories: MJListCategoryEntity[];
    categoryTree: CategoryNode[];
    flatCategories: Array<{
        ID: string;
        displayName: string;
    }>;
    availableEntities: Array<{
        ID: string;
        Name: string;
    }>;
    filteredEntitiesList: Array<{
        ID: string;
        Name: string;
    }>;
    entityOptions: Array<{
        name: string;
        value: string;
    }>;
    ownerOptions: Array<{
        name: string;
        value: string;
    }>;
    sortOptions: Array<{
        name: string;
        value: string;
    }>;
    showContextMenu: boolean;
    contextMenuX: number;
    contextMenuY: number;
    selectedContextItem: BrowseListItem | 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;
    showShareDialog: boolean;
    shareDialogConfig: ListShareDialogConfig | null;
    private entityColorMap;
    private entityIconMap;
    private categoryMap;
    private currentUserId;
    constructor(cdr: ChangeDetectorRef, tabService: TabService, notificationService: MJNotificationService, elementRef: ElementRef, listSharingService: ListSharingService);
    onDocumentClick(event: MouseEvent): void;
    onEscapeKey(): void;
    ngOnInit(): Promise<void>;
    ngOnDestroy(): void;
    loadData(): Promise<void>;
    private buildFlatCategories;
    private buildCategoryTree;
    setViewMode(mode: ViewMode): void;
    onSearchChange(_term: string): void;
    onEntityFilterChange(_value: string): void;
    onOwnerFilterChange(_value: string): void;
    onSortChange(_value: string): void;
    clearSearch(): void;
    clearFilters(): void;
    private applyFilters;
    toggleCategory(node: CategoryNode): void;
    getListCountInCategory(node: CategoryNode): number;
    getEntityColor(entityName: string): string;
    getEntityIcon(entityName: string): string;
    private generateEntityColor;
    formatDate(date: Date): string;
    openList(item: BrowseListItem): void;
    openListMenu(event: Event, item: BrowseListItem): 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>;
    openShareDialog(): void;
    onShareComplete(_result: ListShareDialogResult): void;
    onShareCancel(): void;
    private loadSharingInfo;
    GetResourceDisplayName(_data: ResourceData): Promise<string>;
    GetResourceIconClass(_data: ResourceData): Promise<string>;
    static ɵfac: i0.ɵɵFactoryDeclaration<ListsBrowseResource, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<ListsBrowseResource, "mj-lists-browse-resource", never, {}, {}, never, never, false, never>;
}
export {};
//# sourceMappingURL=lists-browse-resource.component.d.ts.map