import { MJListEntity } from '@memberjunction/core-entities';
import { Observable } from 'rxjs';
import * as i0 from "@angular/core";
/**
 * Represents a set (list) in the Venn diagram
 */
export interface VennSet {
    listId: string;
    listName: string;
    color: string;
    recordIds: Set<string>;
    size: number;
}
/**
 * Represents an intersection region in the Venn diagram
 */
export interface VennIntersection {
    /**
     * IDs of lists that participate in this intersection
     */
    setIds: string[];
    /**
     * Labels of lists that participate in this intersection
     */
    setLabels: string[];
    /**
     * Number of records in this intersection
     */
    size: number;
    /**
     * Actual record IDs in this intersection
     */
    recordIds: string[];
    /**
     * Display label for this region
     */
    label: string;
    /**
     * Whether this region is currently selected
     */
    isSelected: boolean;
}
/**
 * Complete Venn data for visualization
 */
export interface VennData {
    sets: VennSet[];
    intersections: VennIntersection[];
    entityId?: string;
    entityName?: string;
}
/**
 * Set operation types
 */
export type SetOperation = 'union' | 'intersection' | 'difference' | 'symmetric_difference' | 'complement';
/**
 * Result of a set operation
 */
export interface SetOperationResult {
    operation: SetOperation;
    inputSetIds: string[];
    resultRecordIds: string[];
    resultCount: number;
}
/**
 * Service for performing set operations on lists and preparing data for Venn visualization.
 */
export declare class ListSetOperationsService {
    private loadingSubject;
    loading$: Observable<boolean>;
    private listDetailsCache;
    constructor();
    /**
     * Load list data and calculate all intersections for Venn visualization
     */
    calculateVennData(lists: MJListEntity[]): Promise<VennData>;
    /**
     * Calculate all possible intersections between the given sets
     */
    private calculateAllIntersections;
    /**
     * Calculate records that are in ALL of the specified sets but NONE of the other sets
     */
    private calculateExclusiveIntersection;
    /**
     * Build a display label for an intersection
     */
    private buildIntersectionLabel;
    /**
     * Perform a set operation on multiple lists
     */
    performOperation(operation: SetOperation, listIds: string[], allListIds?: string[]): Promise<SetOperationResult>;
    /**
     * Ensure list details are loaded for the given list IDs
     */
    private ensureListsLoaded;
    /**
     * Set intersection of two sets
     */
    private intersect;
    /**
     * Set difference (a - b)
     */
    private difference;
    /**
     * Union of multiple sets
     */
    private unionAll;
    /**
     * Intersection of multiple sets
     */
    private intersectAll;
    /**
     * Symmetric difference of multiple sets (items in exactly one set)
     */
    private symmetricDifferenceAll;
    /**
     * Get the color for a list by its index
     */
    getColorForIndex(index: number): string;
    /**
     * Clear the cache
     */
    clearCache(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<ListSetOperationsService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<ListSetOperationsService>;
}
//# sourceMappingURL=list-set-operations.service.d.ts.map