/**
 * @fileoverview Knowledge Hub Clusters Dashboard Tab
 *
 * Full-page cluster visualization with:
 * - Left sidebar: saved cluster visualizations (persisted via UserInfoEngine)
 * - Main area: SVG scatter plot (mj-cluster-scatter)
 * - Floating config panel (mj-cluster-config-panel)
 * - Top metrics bar
 *
 * Registered as BaseResourceComponent for the Knowledge Hub application.
 */
import { OnDestroy, AfterViewInit } from '@angular/core';
import { ResourceData } from '@memberjunction/core-entities';
import { BaseResourceComponent } from '@memberjunction/ng-shared';
import { ClusterConfig, ClusterConfigPanelEntityOption, ClusterConfigPanelEntityDocOption, ClusterVisualizationResult, ClusterMetrics, ClusterPoint, ClusterLabel, SavedClusterVisualization } from '@memberjunction/ng-clustering';
import { ClusterScatterComponent } from '@memberjunction/ng-clustering';
import * as i0 from "@angular/core";
export declare class ClusterVisualizationResourceComponent extends BaseResourceComponent implements AfterViewInit, OnDestroy {
    scatterPlot?: ClusterScatterComponent;
    private cdr;
    private clusteringService;
    private navigationService;
    private destroy$;
    /** LLM-generated cluster labels for the current result */
    ClusterLabels: ClusterLabel[];
    GetResourceDisplayName(_data: ResourceData): Promise<string>;
    GetResourceIconClass(_data: ResourceData): Promise<string>;
    /** Current visualization result */
    Result: ClusterVisualizationResult | null;
    /** Whether a clustering run is in progress */
    IsRunning: boolean;
    /** The active cluster config */
    ActiveConfig: ClusterConfig;
    /** Title for the top bar */
    VisualizationTitle: string;
    /** Entity options for the config panel dropdown */
    EntityOptions: ClusterConfigPanelEntityOption[];
    /** Entity document options for the selected entity (shown when 2+) */
    EntityDocOptions: ClusterConfigPanelEntityDocOption[];
    SavedVisualizations: SavedClusterVisualization[];
    ActiveSavedId: string | null;
    private userSettingEntity;
    ngAfterViewInit(): Promise<void>;
    ngOnDestroy(): void;
    get Metrics(): ClusterMetrics | null;
    get HasResult(): boolean;
    get SilhouetteScoreFormatted(): string;
    get IsSilhouetteGood(): boolean;
    get ComputationTimeFormatted(): string;
    /** Handle "Run Clustering" from the config panel */
    OnRunClustering(config: ClusterConfig): Promise<void>;
    /** Handle point click — log for now */
    OnPointClicked(_point: ClusterPoint): void;
    /** Handle point hover */
    OnPointHovered(_point: ClusterPoint | null): void;
    /** Navigate to the entity record when "Open Record" is clicked in the detail panel */
    OnOpenRecord(point: ClusterPoint): void;
    /** Save the current visualization */
    OnSaveVisualization(): Promise<void>;
    /** Select a saved visualization — restore from cache if available, otherwise re-run */
    OnSelectSaved(saved: SavedClusterVisualization): Promise<void>;
    /** Delete a saved visualization */
    OnDeleteSaved(saved: SavedClusterVisualization, event: MouseEvent): Promise<void>;
    /** Start a new analysis (clear current) */
    OnNewAnalysis(): void;
    IsActiveSaved(saved: SavedClusterVisualization): boolean;
    TrackSavedBy(_index: number, saved: SavedClusterVisualization): string;
    FormatDate(iso: string): string;
    /** Populate the entity options for the config panel dropdown */
    private loadEntityOptions;
    /** Update entity document options when the selected entity changes */
    private updateEntityDocOptions;
    /**
     * Fetch vectors from Entity Document Runs via RunView.
     * Entity Documents store vectorized entity data; we query for runs
     * that match the requested entity.
     */
    private fetchVectorsForEntity;
    /** Parse the JSON metadata string from the vector DB into a record */
    private parseVectorMetadata;
    /** Build a human-readable label from vector metadata (prefers Name field, falls back to RecordID) */
    private buildLabel;
    /**
     * After clustering completes, send sample records per cluster to an LLM for naming.
     * Updates ClusterLabels and refreshes the view.
     */
    private requestClusterLabelsFromLLM;
    /** Build a text block describing sample records per cluster for the LLM prompt */
    private buildClusterDataForPrompt;
    /** Apply cluster labels to the result's Clusters array (sets the Label property) */
    private applyLabelsToResult;
    /**
     * Strip full vector arrays from the result before saving (they're large and not needed for display).
     * Keeps points with 2D coordinates and metadata but removes the original high-dimensional vectors.
     */
    private stripVectorsFromResult;
    /** Load saved visualizations from UserInfoEngine settings */
    private loadSavedVisualizations;
    /** Persist saved visualizations to UserInfoEngine settings */
    private persistSavedVisualizations;
    static ɵfac: i0.ɵɵFactoryDeclaration<ClusterVisualizationResourceComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<ClusterVisualizationResourceComponent, "app-cluster-visualization-resource", never, {}, {}, never, never, false, never>;
}
/** Tree-shaking prevention */
export declare function LoadClusterVisualizationResource(): void;
//# sourceMappingURL=cluster-visualization-resource.component.d.ts.map