/**
 * @fileoverview Classify · Tag Library tab.
 *
 * Self-contained sub-page: owns its header-interior (with the tag search box),
 * the tag rows table, the word cloud, the tags-by-source breakdown, and the
 * per-tag drill-down. Receives the shared raw tag + item rows from the host
 * orchestrator via `[ContentTags]`/`[ContentItems]` and rebuilds its view
 * models from them. Opening a content item from the drill-down is a cross-tab
 * concern owned by the host's slide-in, so it bubbles up via @Output.
 */
import { EventEmitter } from '@angular/core';
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
import { WordCloudItem } from '@memberjunction/ng-word-cloud';
import { TagRow, TagBySource } from '../shared/classify.types';
import { formatWeight, tagFontSize } from '../shared/classify.format';
import * as i0 from "@angular/core";
/** One row in the per-tag drill-down (content items carrying a given tag). */
interface TagDrillDownItem {
    ID: string;
    Name: string;
    SourceName: string;
    Weight: number;
    UpdatedAt: string;
    FeedIndex: number;
}
export declare class ClassifyTagsTabComponent extends BaseAngularComponent {
    private cdr;
    /** Shared raw `MJ: Content Item Tags` rows, supplied by the host orchestrator. */
    private _contentTags;
    set ContentTags(value: Record<string, unknown>[]);
    get ContentTags(): Record<string, unknown>[];
    /** Shared raw `MJ: Content Items` rows — used for source mapping and drill-down. */
    private _contentItems;
    set ContentItems(value: Record<string, unknown>[]);
    get ContentItems(): Record<string, unknown>[];
    /** Shown while a manual Refresh() rebuilds the tag view models. */
    IsLoading: boolean;
    TagRows: TagRow[];
    FilteredTagRows: TagRow[];
    TagCloudWordItems: WordCloudItem[];
    TagsBySource: TagBySource[];
    TagSearchQuery: string;
    SelectedDrillDownTag: string | null;
    TagDrillDownItems: TagDrillDownItem[];
    /** Subtitle reflects the live tag count, mirroring the former host subtitle. */
    get Subtitle(): string;
    readonly TagFontSize: typeof tagFontSize;
    readonly FormatWeight: typeof formatWeight;
    /** Bubble a request to open a content item's detail slide-in (host-owned). */
    OpenItemDetailRequested: EventEmitter<string>;
    onOpenItemDetail(contentItemID: string): void;
    /** Rebuild all tag-tab view models from the current inputs. */
    private rebuild;
    /**
     * Rebuild the tag view models from the current host-supplied inputs. The tag
     * data is host-owned (flows in via [ContentTags]/[ContentItems]); Refresh
     * recomputes the rows/cloud/breakdown and surfaces a brief loading state.
     */
    Refresh(): Promise<void>;
    /** Apply a search query programmatically (used by the agent tool + deep link). Returns the match count. */
    ApplySearch(query: string): number;
    private buildTagRows;
    private buildTagCloud;
    private buildTagsBySource;
    FilterTags(): void;
    /** Drill down into content items matching a specific tag. */
    DrillDownTag(tagName: string): void;
    CloseDrillDownTag(): void;
    private countAllTags;
    /** Compute average weight per tag across all occurrences. */
    private computeAvgWeights;
    private getTopSourcePerTag;
    private getFirstSeenPerTag;
    static ɵfac: i0.ɵɵFactoryDeclaration<ClassifyTagsTabComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<ClassifyTagsTabComponent, "classify-tags-tab", never, { "ContentTags": { "alias": "ContentTags"; "required": false; }; "ContentItems": { "alias": "ContentItems"; "required": false; }; }, { "OpenItemDetailRequested": "OpenItemDetailRequested"; }, never, never, false, never>;
}
export {};
//# sourceMappingURL=tags-tab.component.d.ts.map