import { ChangeDetectorRef, OnDestroy } from '@angular/core';
import { BaseResourceComponent } from '@memberjunction/ng-shared';
import { ResourceData, MJListEntity } from '@memberjunction/core-entities';
import { ListSetOperationsService, VennData, VennIntersection, SetOperation, SetOperationResult } from '../services/list-set-operations.service';
import { VennRegionClickEvent } from './venn-diagram/venn-diagram.component';
import { MJNotificationService } from '@memberjunction/ng-notifications';
import * as i0 from "@angular/core";
interface ListSelection {
    list: MJListEntity;
    entityName: string;
    color: string;
}
/**
 * Preview record with meaningful display fields
 */
interface PreviewRecord {
    id: string;
    displayName: string;
    secondaryInfo?: string;
    entityName: string;
}
/**
 * Entity option for filtering
 */
interface EntityOption {
    id: string;
    name: string;
    listCount: number;
}
export declare class ListsOperationsResource extends BaseResourceComponent implements OnDestroy {
    private cdr;
    private setOperationsService;
    private notificationService;
    private destroy$;
    maxLists: number;
    selectedLists: ListSelection[];
    availableLists: MJListEntity[];
    filteredAvailableLists: MJListEntity[];
    listSearchTerm: string;
    showListDropdown: boolean;
    entityOptions: EntityOption[];
    selectedEntityId: string;
    vennData: VennData | null;
    selectedRegion: VennIntersection | null;
    lastOperationResult: SetOperationResult | null;
    previewRecords: string[];
    previewRecordsDisplay: PreviewRecord[];
    loadingPreview: boolean;
    isCalculating: boolean;
    isSaving: boolean;
    showCreateDialog: boolean;
    newListName: string;
    newListDescription: string;
    recordsToAdd: string[];
    showAddToListDialog: boolean;
    addToListSearchTerm: string;
    filteredAddToListOptions: MJListEntity[];
    selectedTargetListId: string | null;
    private entityIdFromSelectedLists;
    private currentEntityInfo;
    private readonly USER_SETTING_KEY;
    private saveSettingsTimeout;
    private isLoadingSettings;
    constructor(cdr: ChangeDetectorRef, setOperationsService: ListSetOperationsService, notificationService: MJNotificationService);
    get hasMultipleEntities(): boolean;
    ngOnInit(): Promise<void>;
    ngOnDestroy(): void;
    loadAvailableLists(): Promise<void>;
    /**
     * Build entity options for the filter dropdown
     */
    private buildEntityOptions;
    /**
     * Handle entity filter change
     */
    onEntityFilterChange(): void;
    filterAvailableLists(): void;
    addList(list: MJListEntity): void;
    removeList(index: number): void;
    recalculateVenn(): Promise<void>;
    onRegionClick(event: VennRegionClickEvent): void;
    /**
     * Load preview records with meaningful display fields
     */
    private loadPreviewRecords;
    /**
     * Get the best display fields for an entity based on metadata
     */
    private getDisplayFields;
    /**
     * Get a display value from a record
     */
    private getDisplayValue;
    /**
     * Open a record in the entity viewer
     */
    openRecord(record: PreviewRecord): void;
    performOperation(operation: SetOperation): Promise<void>;
    getOperationLabel(operation: SetOperation): string;
    createListFromSelection(): void;
    createListFromResult(): void;
    cancelCreateDialog(): void;
    confirmCreateList(): Promise<void>;
    addToExistingList(): void;
    addResultToExistingList(): void;
    /**
     * Open the Add to Existing List dialog
     */
    private openAddToListDialog;
    /**
     * Filter available lists for add-to-list dialog
     */
    filterAddToListOptions(): void;
    /**
     * Select a target list for adding records
     */
    IsTargetListSelected(list: MJListEntity): boolean;
    selectTargetList(listId: string): void;
    /**
     * Cancel the add to list dialog
     */
    cancelAddToListDialog(): void;
    /**
     * Confirm adding records to selected list
     */
    confirmAddToList(): Promise<void>;
    exportToExcel(): void;
    GetResourceDisplayName(_data: ResourceData): Promise<string>;
    GetResourceIconClass(_data: ResourceData): Promise<string>;
    /**
     * Clear all selections and reset state
     */
    clearAllSelections(): void;
    /**
     * Save state to User Settings (debounced to avoid excessive writes)
     */
    private saveState;
    /**
     * Save state to User Settings entity on server
     */
    private saveStateToServer;
    /**
     * Load saved state from User Settings
     */
    private loadSavedState;
    static ɵfac: i0.ɵɵFactoryDeclaration<ListsOperationsResource, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<ListsOperationsResource, "mj-lists-operations-resource", never, {}, {}, never, never, false, never>;
}
export {};
//# sourceMappingURL=lists-operations-resource.component.d.ts.map