/**
 * @fileoverview Classify · Suggestions Inbox tab.
 *
 * Self-contained sub-page that surfaces `MJ: Tag Suggestions` — the
 * human-in-the-loop review queue produced by the classifier when a tag lands in
 * the ambiguous band (BelowThreshold, ConstrainedMode, ParentFrozen, …) and by
 * the server-side TagHealthJob (merge / low-usage / wide-node candidates).
 *
 * 3-pane layout: (1) a filter rail by Reason (with counts) + Status,
 * (2) the suggestion list, (3) a reading pane with the proposed name/parent,
 * best-match score on a threshold-band gradient, the source-item link, and the
 * Approve / Merge / Reject action bar.
 *
 * Data is TRANSACTIONAL and can grow — it is loaded via RunView (NOT cached).
 * Status filtering re-queries the DB; Reason filtering is applied in-memory on
 * the loaded Pending set.
 *
 * The host owns the lightweight pending-count badge on the nav rail; this tab
 * emits `(Resolved)` after every action so the host can refresh that badge.
 */
import { EventEmitter } from '@angular/core';
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
import { MJTagSuggestionEntity } from '@memberjunction/core-entities';
import { formatShortDate } from '../shared/classify.format';
import * as i0 from "@angular/core";
/** Status filter options the Inbox supports (re-queries the DB on change). */
type InboxStatusFilter = 'Pending' | 'Approved' | 'Merged' | 'Rejected';
/** A counted Reason entry rendered in the filter rail. */
interface ReasonCount {
    Reason: string;
    Label: string;
    Count: number;
}
/** Dropdown option for the merge-target combobox. */
interface TagOption {
    ID: string;
    Label: string;
}
export declare class ClassifyInboxTabComponent extends BaseAngularComponent {
    private cdr;
    /** Threshold markers shown on the band gradient (match the server defaults). */
    readonly SuggestThreshold = 0.7;
    readonly MatchThreshold = 0.87;
    private allSuggestions;
    FilteredSuggestions: MJTagSuggestionEntity[];
    ReasonCounts: ReasonCount[];
    Selected: MJTagSuggestionEntity | null;
    IsLoading: boolean;
    private hasLoaded;
    StatusFilter: InboxStatusFilter;
    readonly StatusOptions: InboxStatusFilter[];
    /** Active reason filter; '' = all (human-review reasons), 'all' = include health reasons. */
    ReasonFilter: string;
    /** When true, include the 3 Health-owned reasons that the Health tab normally owns. */
    IncludeHealthReasons: boolean;
    TagOptions: TagOption[];
    /** Selected merge-target tag ID (defaults to BestMatchTagID on selection). */
    MergeTargetID: string | null;
    ReviewerNotes: string;
    IsActing: boolean;
    /** Number of Pending suggestions currently in the loaded set (for the host badge). */
    get PendingCount(): number;
    /** Empty-state message for the suggestion list (reflects the active filters). */
    get NoSuggestionsMessage(): string;
    /** Total loaded suggestions (across all reasons) for the "All" filter count. */
    get TotalLoadedCount(): number;
    /** Template-facing formatter. */
    readonly formatShortDate: typeof formatShortDate;
    /** Emitted after any Approve/Merge/Reject so the host refreshes its pending badge. */
    Resolved: EventEmitter<void>;
    /** Lazy-load on first activation (host calls this when the tab becomes active). */
    EnsureLoaded(): Promise<void>;
    /** Public refresh — re-pull suggestions for the current status filter. */
    Refresh(): Promise<void>;
    private buildStatusFilterClause;
    private loadSuggestions;
    private loadTagOptions;
    private buildReasonCounts;
    private applyReasonFilter;
    SetReasonFilter(reason: string): void;
    SetStatusFilter(status: InboxStatusFilter): Promise<void>;
    ToggleHealthReasons(): Promise<void>;
    SelectSuggestion(suggestion: MJTagSuggestionEntity | null): void;
    OnMergeTargetChange(value: unknown): void;
    ReasonLabel(reason: string): string;
    ReasonPill(reason: string): string;
    /** Score as a 0..100 percent for band/marker positioning. */
    ScorePct(score: number | null): number;
    FormatScore(score: number | null): string;
    /** Resolve the merge-target tag's display label for confirmation copy. */
    get MergeTargetLabel(): string;
    private stampReviewFields;
    /** Approve as a brand-new tag: create the MJTagEntity, then resolve the suggestion. */
    ApproveAsNewTag(): Promise<void>;
    /** Merge into an existing tag (default target = BestMatchTagID, override via dropdown). */
    MergeIntoExisting(): Promise<void>;
    /** Reject the suggestion. */
    Reject(): Promise<void>;
    /** Remove a resolved row, advance selection, rebuild counts, notify the host. */
    private finishAction;
    /** Rebuild the filtered list and advance selection to the next sensible row. */
    private applyReasonFilterAfterRemoval;
    private notifyFailure;
    private notifyError;
    static ɵfac: i0.ɵɵFactoryDeclaration<ClassifyInboxTabComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<ClassifyInboxTabComponent, "classify-inbox-tab", never, {}, { "Resolved": "Resolved"; }, never, never, false, never>;
}
export {};
//# sourceMappingURL=inbox-tab.component.d.ts.map