/**
 * @fileoverview Classify · Tag Health tab.
 *
 * Self-contained sub-page that surfaces the REAL taxonomy-quality signals the
 * server-side TagHealthJob produces as `MJ: Tag Suggestions` rows with
 * `Reason ∈ {MergeCandidate, LowUsage, WideNode}`. The Suggestions Inbox tab
 * deliberately EXCLUDES these 3 reasons; the Health tab OWNS them.
 *
 * NOTE: the underlying signals (which tags are merge candidates, which are
 * low-usage, which are wide nodes) are computed SERVER-SIDE by the TagHealthJob
 * — this tab does not recompute them. It triages the resulting suggestion rows:
 * grouping them into the 3 signal buckets and applying human decisions
 * (Merge / Deprecate / Review-in-Taxonomy / Dismiss) as client-side entity
 * mutations on the suggestion (and, for Deprecate, on the subject Tag).
 *
 * Data is TRANSACTIONAL and grows over time — loaded via RunView (NOT cached),
 * grouped into the 3 buckets in memory. Loads lazily on first activation.
 */
import { Component, ChangeDetectorRef, EventEmitter, Output, inject } from '@angular/core';
import { RunView } from '@memberjunction/core';
import { UUIDsEqual } from '@memberjunction/global';
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
import { MJNotificationService } from '@memberjunction/ng-notifications';
import { TagEngineBase } from '@memberjunction/tag-engine-base';
import * as i0 from "@angular/core";
import * as i1 from "@memberjunction/ng-shared-generic";
import * as i2 from "@memberjunction/ng-ui-components";
const _forTrack0 = ($index, $item) => $item.Meta.Reason;
const _forTrack1 = ($index, $item) => $item.ID;
function ClassifyHealthTabComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 7);
    i0.ɵɵelementStart(1, "span", 8);
    i0.ɵɵtext(2, "Refreshing\u2026");
    i0.ɵɵelementEnd();
} }
function ClassifyHealthTabComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 9);
    i0.ɵɵelementStart(1, "span", 8);
    i0.ɵɵtext(2, "Refresh");
    i0.ɵɵelementEnd();
} }
function ClassifyHealthTabComponent_Conditional_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 5);
    i0.ɵɵelement(1, "mj-loading", 10);
    i0.ɵɵelementEnd();
} }
function ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "mj-empty-state", 17);
} if (rf & 2) {
    const card_r1 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵproperty("Title", "No " + card_r1.Meta.Title.toLowerCase() + " right now.");
} }
function ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_12_For_2_Conditional_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 28);
    i0.ɵɵelement(1, "i", 29);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(2, "span", 30);
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const s_r2 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(s_r2.BestMatchTag);
} }
function ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_12_For_2_Case_8_Template(rf, ctx) { if (rf & 1) {
    const _r3 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 31);
    i0.ɵɵlistener("click", function ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_12_For_2_Case_8_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r3); const s_r2 = i0.ɵɵnextContext().$implicit; const ctx_r3 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r3.Merge(s_r2)); });
    i0.ɵɵelement(1, "i", 32);
    i0.ɵɵtext(2, " Merge ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "button", 2);
    i0.ɵɵlistener("click", function ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_12_For_2_Case_8_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r3); const s_r2 = i0.ɵɵnextContext().$implicit; const ctx_r3 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r3.Dismiss(s_r2)); });
    i0.ɵɵtext(4, " Dismiss ");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const s_r2 = i0.ɵɵnextContext().$implicit;
    const ctx_r3 = i0.ɵɵnextContext(4);
    i0.ɵɵproperty("disabled", ctx_r3.IsRowBusy(s_r2) || !s_r2.BestMatchTagID);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("disabled", ctx_r3.IsRowBusy(s_r2));
} }
function ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_12_For_2_Case_9_Template(rf, ctx) { if (rf & 1) {
    const _r5 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 33);
    i0.ɵɵlistener("click", function ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_12_For_2_Case_9_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const s_r2 = i0.ɵɵnextContext().$implicit; const ctx_r3 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r3.Deprecate(s_r2)); });
    i0.ɵɵelement(1, "i", 34);
    i0.ɵɵtext(2, " Deprecate ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "button", 2);
    i0.ɵɵlistener("click", function ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_12_For_2_Case_9_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r5); const s_r2 = i0.ɵɵnextContext().$implicit; const ctx_r3 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r3.Dismiss(s_r2)); });
    i0.ɵɵtext(4, " Dismiss ");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const s_r2 = i0.ɵɵnextContext().$implicit;
    const ctx_r3 = i0.ɵɵnextContext(4);
    i0.ɵɵproperty("disabled", ctx_r3.IsRowBusy(s_r2));
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("disabled", ctx_r3.IsRowBusy(s_r2));
} }
function ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_12_For_2_Case_10_Template(rf, ctx) { if (rf & 1) {
    const _r6 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 31);
    i0.ɵɵlistener("click", function ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_12_For_2_Case_10_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r6); const s_r2 = i0.ɵɵnextContext().$implicit; const ctx_r3 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r3.ReviewInTaxonomy(s_r2)); });
    i0.ɵɵelement(1, "i", 35);
    i0.ɵɵtext(2, " Review ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "button", 2);
    i0.ɵɵlistener("click", function ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_12_For_2_Case_10_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r6); const s_r2 = i0.ɵɵnextContext().$implicit; const ctx_r3 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r3.Dismiss(s_r2)); });
    i0.ɵɵtext(4, " Dismiss ");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const s_r2 = i0.ɵɵnextContext().$implicit;
    const ctx_r3 = i0.ɵɵnextContext(4);
    i0.ɵɵproperty("disabled", ctx_r3.IsRowBusy(s_r2));
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("disabled", ctx_r3.IsRowBusy(s_r2));
} }
function ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_12_For_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 23)(1, "div", 24)(2, "span", 25);
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
    i0.ɵɵconditionalCreate(4, ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_12_For_2_Conditional_4_Template, 4, 1);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "div", 26)(6, "span", 27);
    i0.ɵɵtext(7);
    i0.ɵɵelementEnd();
    i0.ɵɵconditionalCreate(8, ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_12_For_2_Case_8_Template, 5, 2)(9, ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_12_For_2_Case_9_Template, 5, 2)(10, ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_12_For_2_Case_10_Template, 5, 2);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    let tmp_26_0;
    const s_r2 = ctx.$implicit;
    const card_r1 = i0.ɵɵnextContext(2).$implicit;
    const ctx_r3 = i0.ɵɵnextContext(2);
    i0.ɵɵclassProp("ch-item-busy", ctx_r3.IsRowBusy(s_r2));
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(s_r2.ProposedName);
    i0.ɵɵadvance();
    i0.ɵɵconditional(card_r1.Meta.Reason === "MergeCandidate" && s_r2.BestMatchTag ? 4 : -1);
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(ctx_r3.FormatScore(s_r2.BestMatchScore));
    i0.ɵɵadvance();
    i0.ɵɵconditional((tmp_26_0 = card_r1.Meta.Reason) === "MergeCandidate" ? 8 : tmp_26_0 === "LowUsage" ? 9 : tmp_26_0 === "WideNode" ? 10 : -1);
} }
function ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_12_Conditional_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 21);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const card_r1 = i0.ɵɵnextContext(2).$implicit;
    const ctx_r3 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1("+", card_r1.Items.length - ctx_r3.PreviewLimit, " more");
} }
function ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_12_Conditional_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "span", 21);
} }
function ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_12_Conditional_6_Conditional_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 7);
    i0.ɵɵtext(1, " Merging\u2026 ");
} }
function ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_12_Conditional_6_Conditional_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 36);
    i0.ɵɵtext(1);
} if (rf & 2) {
    const card_r1 = i0.ɵɵnextContext(3).$implicit;
    const ctx_r3 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1(" Merge all high-confidence (", ctx_r3.HighConfidenceCount(card_r1), ") ");
} }
function ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_12_Conditional_6_Template(rf, ctx) { if (rf & 1) {
    const _r7 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 31);
    i0.ɵɵlistener("click", function ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_12_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r7); const card_r1 = i0.ɵɵnextContext(2).$implicit; const ctx_r3 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r3.MergeAllHighConfidence(card_r1)); });
    i0.ɵɵconditionalCreate(1, ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_12_Conditional_6_Conditional_1_Template, 2, 0)(2, ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_12_Conditional_6_Conditional_2_Template, 2, 1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext(4);
    i0.ɵɵproperty("disabled", ctx_r3.IsBulkActing);
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r3.IsBulkActing ? 1 : 2);
} }
function ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_12_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 18);
    i0.ɵɵrepeaterCreate(1, ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_12_For_2_Template, 11, 6, "div", 19, _forTrack1);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "div", 20);
    i0.ɵɵconditionalCreate(4, ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_12_Conditional_4_Template, 2, 1, "span", 21)(5, ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_12_Conditional_5_Template, 1, 0, "span", 21);
    i0.ɵɵconditionalCreate(6, ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_12_Conditional_6_Template, 3, 2, "button", 22);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const card_r1 = i0.ɵɵnextContext().$implicit;
    const ctx_r3 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance();
    i0.ɵɵrepeater(card_r1.Items.slice(0, ctx_r3.PreviewLimit));
    i0.ɵɵadvance(3);
    i0.ɵɵconditional(card_r1.Items.length > ctx_r3.PreviewLimit ? 4 : 5);
    i0.ɵɵadvance(2);
    i0.ɵɵconditional(card_r1.Meta.Reason === "MergeCandidate" && ctx_r3.HighConfidenceCount(card_r1) > 0 ? 6 : -1);
} }
function ClassifyHealthTabComponent_Conditional_8_For_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 12)(1, "div", 13)(2, "div", 14);
    i0.ɵɵtext(3);
    i0.ɵɵelementStart(4, "small");
    i0.ɵɵtext(5);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(6, "h5", 15);
    i0.ɵɵelement(7, "i");
    i0.ɵɵtext(8);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(9, "p", 16);
    i0.ɵɵtext(10);
    i0.ɵɵelementEnd()();
    i0.ɵɵconditionalCreate(11, ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_11_Template, 1, 1, "mj-empty-state", 17)(12, ClassifyHealthTabComponent_Conditional_8_For_2_Conditional_12_Template, 7, 2);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const card_r1 = ctx.$implicit;
    i0.ɵɵclassMap("ch-" + card_r1.Meta.Variant);
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1(" ", card_r1.Items.length, " ");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(card_r1.Meta.CountNoun);
    i0.ɵɵadvance(2);
    i0.ɵɵclassMap(card_r1.Meta.Icon);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1(" ", card_r1.Meta.Title, " ");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(card_r1.Meta.Explanation);
    i0.ɵɵadvance();
    i0.ɵɵconditional(card_r1.Items.length === 0 ? 11 : 12);
} }
function ClassifyHealthTabComponent_Conditional_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 6);
    i0.ɵɵrepeaterCreate(1, ClassifyHealthTabComponent_Conditional_8_For_2_Template, 13, 9, "div", 11, _forTrack0);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵrepeater(ctx_r3.Cards);
} }
/** Confidence floor for the "merge all high-confidence" bulk action. */
const HIGH_CONFIDENCE_THRESHOLD = 0.9;
/** Card descriptors in display order (merge → low-usage → wide-node). */
const SIGNAL_CARDS = [
    {
        Reason: 'MergeCandidate',
        Title: 'Merge candidates',
        Icon: 'fa-solid fa-code-merge',
        Variant: 'info',
        Explanation: 'Near-duplicate tags with high embedding similarity — likely the same concept under two names.',
        CountNoun: 'pairs',
    },
    {
        Reason: 'LowUsage',
        Title: 'Low usage',
        Icon: 'fa-solid fa-arrow-trend-down',
        Variant: 'warning',
        Explanation: 'Tags applied to very few items recently — candidates to deprecate and keep the taxonomy lean.',
        CountNoun: 'tags',
    },
    {
        Reason: 'WideNode',
        Title: 'Wide nodes',
        Icon: 'fa-solid fa-arrows-left-right-to-line',
        Variant: 'error',
        Explanation: 'Tags with too many direct children — likely need splitting into sub-categories.',
        CountNoun: 'nodes',
    },
];
/** How many example items to surface per card before "show all". */
const PREVIEW_LIMIT = 5;
export class ClassifyHealthTabComponent extends BaseAngularComponent {
    cdr = inject(ChangeDetectorRef);
    PreviewLimit = PREVIEW_LIMIT;
    HighConfidenceThreshold = HIGH_CONFIDENCE_THRESHOLD;
    // ── Loaded data (NOT cached — transactional) ──
    allSuggestions = [];
    Cards = [];
    IsLoading = false;
    hasLoaded = false;
    /** ID of the suggestion currently being acted on (disables its row controls). */
    ActingID = null;
    /** True while a bulk action is in flight. */
    IsBulkActing = false;
    /** Emitted after any action so the host can refresh its pending/health badge. */
    Resolved = new EventEmitter();
    /** Emitted with a tag ID so the host can switch to the Taxonomy tab for review. */
    OpenInTaxonomyRequested = new EventEmitter();
    // ════════════════════════════════════════════
    // ACTIVATION + LOAD
    // ════════════════════════════════════════════
    /** Lazy-load on first activation (host calls this when the tab becomes active). */
    async EnsureLoaded() {
        if (this.hasLoaded)
            return;
        this.hasLoaded = true;
        await Promise.all([this.loadSuggestions(), this.ensureTagEngine()]);
    }
    /** Public refresh — re-pull the health suggestions and rebuild buckets. */
    async Refresh() {
        await this.loadSuggestions();
    }
    async ensureTagEngine() {
        await TagEngineBase.Instance.Config(false, this.ProviderToUse.CurrentUser, this.ProviderToUse);
    }
    async loadSuggestions() {
        this.IsLoading = true;
        this.cdr.detectChanges();
        const rv = RunView.FromMetadataProvider(this.ProviderToUse);
        const result = await rv.RunView({
            EntityName: 'MJ: Tag Suggestions',
            ExtraFilter: `Status='Pending' AND Reason IN ('MergeCandidate','LowUsage','WideNode')`,
            OrderBy: 'BestMatchScore DESC',
            ResultType: 'entity_object',
        }, this.ProviderToUse.CurrentUser);
        this.allSuggestions = result.Success ? result.Results : [];
        this.buildCards();
        this.IsLoading = false;
        this.cdr.detectChanges();
    }
    /** Group the loaded suggestions into the 3 signal buckets, preserving card order. */
    buildCards() {
        this.Cards = SIGNAL_CARDS.map(meta => ({
            Meta: meta,
            Items: this.allSuggestions.filter(s => s.Reason === meta.Reason),
        }));
    }
    // ════════════════════════════════════════════
    // DISPLAY HELPERS
    // ════════════════════════════════════════════
    FormatScore(score) {
        return score == null ? '—' : score.toFixed(2);
    }
    /** Count of high-confidence merge candidates eligible for the bulk merge. */
    HighConfidenceCount(card) {
        if (card.Meta.Reason !== 'MergeCandidate')
            return 0;
        return card.Items.filter(s => (s.BestMatchScore ?? 0) >= HIGH_CONFIDENCE_THRESHOLD).length;
    }
    /** Whether a given suggestion's row controls should be disabled. */
    IsRowBusy(suggestion) {
        return this.IsBulkActing || (this.ActingID != null && UUIDsEqual(this.ActingID, suggestion.ID));
    }
    // ════════════════════════════════════════════
    // ACTIONS — entity-level mutations on the client
    // ════════════════════════════════════════════
    //
    // NOTE: the health signals themselves are computed server-side by the
    // TagHealthJob. These handlers triage the resulting suggestion rows by
    // stamping reviewer fields + resolving status (and, for Deprecate, flipping
    // the subject Tag's Status). Full downstream re-pointing of content-item
    // tags onto the resolved tag is handled by the server-side promotion job.
    stampReviewFields(suggestion) {
        suggestion.ReviewedByUserID = this.ProviderToUse.CurrentUser.ID;
        suggestion.ReviewedAt = new Date();
    }
    /** Merge candidate → Merge: resolve the suggestion onto its best-match tag. */
    async Merge(suggestion) {
        if (this.IsRowBusy(suggestion))
            return;
        if (!suggestion.BestMatchTagID) {
            MJNotificationService.Instance.CreateSimpleNotification('No best-match tag to merge into', 'warning', 3000);
            return;
        }
        this.ActingID = suggestion.ID;
        this.cdr.detectChanges();
        try {
            const saved = await this.resolveMerge(suggestion);
            if (saved) {
                MJNotificationService.Instance.CreateSimpleNotification(`Merged "${suggestion.ProposedName}" into "${suggestion.BestMatchTag ?? 'best match'}"`, 'success', 3000);
                this.finishAction(suggestion);
            }
        }
        catch (error) {
            this.notifyError(error);
        }
        finally {
            this.ActingID = null;
            this.cdr.detectChanges();
        }
    }
    /** Bulk: merge every high-confidence (score ≥ 0.9) merge candidate at once. */
    async MergeAllHighConfidence(card) {
        if (card.Meta.Reason !== 'MergeCandidate' || this.IsBulkActing)
            return;
        const targets = card.Items.filter(s => (s.BestMatchScore ?? 0) >= HIGH_CONFIDENCE_THRESHOLD && s.BestMatchTagID);
        if (targets.length === 0)
            return;
        this.IsBulkActing = true;
        this.cdr.detectChanges();
        let succeeded = 0;
        try {
            for (const suggestion of targets) {
                const saved = await this.resolveMerge(suggestion);
                if (saved) {
                    this.allSuggestions = this.allSuggestions.filter(s => !UUIDsEqual(s.ID, suggestion.ID));
                    succeeded++;
                }
            }
            this.buildCards();
            MJNotificationService.Instance.CreateSimpleNotification(`Merged ${succeeded} high-confidence candidate${succeeded === 1 ? '' : 's'}`, 'success', 3000);
            if (succeeded > 0)
                this.Resolved.emit();
        }
        catch (error) {
            this.notifyError(error);
        }
        finally {
            this.IsBulkActing = false;
            this.cdr.detectChanges();
        }
    }
    /** Stamp + resolve a single merge suggestion. Returns Save() success. */
    async resolveMerge(suggestion) {
        this.stampReviewFields(suggestion);
        suggestion.Status = 'Merged';
        suggestion.ResolvedTagID = suggestion.BestMatchTagID;
        const saved = await suggestion.Save();
        if (!saved) {
            this.notifyFailure('Failed to merge suggestion', suggestion.LatestResult?.CompleteMessage);
        }
        return saved;
    }
    /** Low usage → Deprecate: flip the subject Tag to Deprecated, then resolve. */
    async Deprecate(suggestion) {
        if (this.IsRowBusy(suggestion))
            return;
        this.ActingID = suggestion.ID;
        this.cdr.detectChanges();
        try {
            const tag = await this.resolveSubjectTag(suggestion);
            if (!tag) {
                this.notifyFailure('Could not find the tag to deprecate', 'no matching MJ: Tags record');
                return;
            }
            tag.Status = 'Deprecated';
            const tagSaved = await tag.Save();
            if (!tagSaved) {
                this.notifyFailure('Failed to deprecate tag', tag.LatestResult?.CompleteMessage);
                return;
            }
            this.stampReviewFields(suggestion);
            suggestion.Status = 'Approved';
            suggestion.ResolvedTagID = tag.ID;
            const sugSaved = await suggestion.Save();
            if (!sugSaved) {
                this.notifyFailure('Tag deprecated but failed to resolve suggestion', suggestion.LatestResult?.CompleteMessage);
                return;
            }
            MJNotificationService.Instance.CreateSimpleNotification(`Deprecated "${tag.DisplayName || tag.Name}"`, 'success', 3000);
            this.finishAction(suggestion);
        }
        catch (error) {
            this.notifyError(error);
        }
        finally {
            this.ActingID = null;
            this.cdr.detectChanges();
        }
    }
    /**
     * Resolve the subject Tag for a low-usage suggestion: prefer the best-match
     * tag (that IS the low-usage tag here), else fall back to the already-resolved
     * tag, else look up by proposed name via the cached TagEngineBase tags.
     */
    async resolveSubjectTag(suggestion) {
        const tagID = suggestion.BestMatchTagID ?? suggestion.ResolvedTagID ?? this.lookupTagIDByName(suggestion.ProposedName);
        if (!tagID)
            return null;
        const p = this.ProviderToUse;
        const tag = await p.GetEntityObject('MJ: Tags', p.CurrentUser);
        const loaded = await tag.Load(tagID);
        return loaded ? tag : null;
    }
    /** Case-insensitive name → tag ID lookup against the cached tag set. */
    lookupTagIDByName(name) {
        const lower = name.trim().toLowerCase();
        const match = TagEngineBase.Instance.Tags.find(t => (t.DisplayName || t.Name).trim().toLowerCase() === lower ||
            t.Name.trim().toLowerCase() === lower);
        return match?.ID ?? null;
    }
    /**
     * Wide node → Review in Taxonomy: bubble the tag ID up so the host can switch
     * to the Taxonomy tab. The suggestion stays Pending — review happens there.
     */
    ReviewInTaxonomy(suggestion) {
        const tagID = suggestion.BestMatchTagID ?? suggestion.ResolvedTagID ?? this.lookupTagIDByName(suggestion.ProposedName);
        if (tagID) {
            this.OpenInTaxonomyRequested.emit(tagID);
        }
        else {
            // No resolvable tag — still let the host open the taxonomy surface.
            this.OpenInTaxonomyRequested.emit('');
        }
    }
    /** Dismiss any signal: mark the suggestion Rejected. */
    async Dismiss(suggestion) {
        if (this.IsRowBusy(suggestion))
            return;
        this.ActingID = suggestion.ID;
        this.cdr.detectChanges();
        try {
            this.stampReviewFields(suggestion);
            suggestion.Status = 'Rejected';
            const saved = await suggestion.Save();
            if (!saved) {
                this.notifyFailure('Failed to dismiss suggestion', suggestion.LatestResult?.CompleteMessage);
                return;
            }
            MJNotificationService.Instance.CreateSimpleNotification(`Dismissed "${suggestion.ProposedName}"`, 'success', 2500);
            this.finishAction(suggestion);
        }
        catch (error) {
            this.notifyError(error);
        }
        finally {
            this.ActingID = null;
            this.cdr.detectChanges();
        }
    }
    /** Remove a resolved suggestion, rebuild buckets, notify the host. */
    finishAction(resolved) {
        this.allSuggestions = this.allSuggestions.filter(s => !UUIDsEqual(s.ID, resolved.ID));
        this.buildCards();
        this.Resolved.emit();
        this.cdr.detectChanges();
    }
    notifyFailure(prefix, detail) {
        MJNotificationService.Instance.CreateSimpleNotification(`${prefix}: ${detail ?? 'unknown error'}`, 'error', 5000);
    }
    notifyError(error) {
        const msg = error instanceof Error ? error.message : String(error);
        MJNotificationService.Instance.CreateSimpleNotification(`Error: ${msg}`, 'error', 5000);
    }
    static ɵfac = /*@__PURE__*/ (() => { let ɵClassifyHealthTabComponent_BaseFactory; return function ClassifyHealthTabComponent_Factory(__ngFactoryType__) { return (ɵClassifyHealthTabComponent_BaseFactory || (ɵClassifyHealthTabComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ClassifyHealthTabComponent)))(__ngFactoryType__ || ClassifyHealthTabComponent); }; })();
    static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ClassifyHealthTabComponent, selectors: [["classify-health-tab"]], outputs: { Resolved: "Resolved", OpenInTaxonomyRequested: "OpenInTaxonomyRequested" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 9, vars: 5, consts: [["Title", "Tag Health", "Subtitle", "Automated taxonomy-quality signals from the latest classification runs"], ["actions", ""], ["mjButton", "", "variant", "secondary", "size", "sm", 3, "click", "disabled"], [3, "Padding", "Flex"], [1, "at-main-area"], [1, "at-page-body"], [1, "ch-grid"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "mj-action-label"], [1, "fa-solid", "fa-arrows-rotate"], ["text", "Loading tag-health signals\u2026"], [1, "ch-card", 3, "class"], [1, "ch-card"], [1, "ch-top"], [1, "ch-big"], [1, "ch-title"], [1, "ch-explain"], ["Variant", "success", "Size", "compact", "Icon", "fa-solid fa-circle-check", 1, "ch-empty", 3, "Title"], [1, "ch-list"], [1, "ch-item", 3, "ch-item-busy"], [1, "ch-foot"], [1, "ch-more"], ["mjButton", "", "variant", "primary", "size", "sm", 3, "disabled"], [1, "ch-item"], [1, "ch-item-main"], [1, "ch-item-name"], [1, "ch-item-side"], [1, "ch-score"], [1, "ch-item-arrow"], [1, "fa-solid", "fa-arrow-right-long"], [1, "ch-item-target"], ["mjButton", "", "variant", "primary", "size", "sm", 3, "click", "disabled"], [1, "fa-solid", "fa-code-merge"], ["mjButton", "", "variant", "warning", "size", "sm", 3, "click", "disabled"], [1, "fa-solid", "fa-arrow-trend-down"], [1, "fa-solid", "fa-sitemap"], [1, "fa-solid", "fa-layer-group"]], template: function ClassifyHealthTabComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "mj-page-header-interior", 0)(1, "div", 1)(2, "button", 2);
            i0.ɵɵlistener("click", function ClassifyHealthTabComponent_Template_button_click_2_listener() { return ctx.Refresh(); });
            i0.ɵɵconditionalCreate(3, ClassifyHealthTabComponent_Conditional_3_Template, 3, 0)(4, ClassifyHealthTabComponent_Conditional_4_Template, 3, 0);
            i0.ɵɵelementEnd()()();
            i0.ɵɵelementStart(5, "mj-page-body-interior", 3)(6, "div", 4);
            i0.ɵɵconditionalCreate(7, ClassifyHealthTabComponent_Conditional_7_Template, 2, 0, "div", 5)(8, ClassifyHealthTabComponent_Conditional_8_Template, 3, 0, "div", 6);
            i0.ɵɵelementEnd()();
        } if (rf & 2) {
            i0.ɵɵadvance(2);
            i0.ɵɵproperty("disabled", ctx.IsLoading);
            i0.ɵɵadvance();
            i0.ɵɵconditional(ctx.IsLoading ? 3 : 4);
            i0.ɵɵadvance(2);
            i0.ɵɵproperty("Padding", false)("Flex", true);
            i0.ɵɵadvance(2);
            i0.ɵɵconditional(ctx.IsLoading ? 7 : 8);
        } }, dependencies: [i1.LoadingComponent, i2.MJButtonDirective, i2.MJPageHeaderInteriorComponent, i2.MJPageBodyInteriorComponent, i2.MJEmptyStateComponent], styles: ["\n\n\n\n\n\n\n\n\n\n\n\n\n\n.ch-grid[_ngcontent-%COMP%] {\n    display: grid;\n    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n    gap: 16px;\n    padding: 16px;\n    align-items: start;\n}\n\n\n\n.ch-card[_ngcontent-%COMP%] {\n    display: flex;\n    flex-direction: column;\n    background: var(--mj-bg-surface);\n    border: 1px solid var(--mj-border-default);\n    border-radius: 12px;\n    overflow: hidden;\n}\n\n\n\n.ch-card[_ngcontent-%COMP%]   .ch-top[_ngcontent-%COMP%] {\n    border-top: 3px solid var(--mj-border-default);\n}\n.ch-info[_ngcontent-%COMP%]   .ch-top[_ngcontent-%COMP%] {\n    border-top-color: var(--mj-status-info);\n}\n.ch-warning[_ngcontent-%COMP%]   .ch-top[_ngcontent-%COMP%] {\n    border-top-color: var(--mj-status-warning);\n}\n.ch-error[_ngcontent-%COMP%]   .ch-top[_ngcontent-%COMP%] {\n    border-top-color: var(--mj-status-error);\n}\n\n\n\n.ch-top[_ngcontent-%COMP%] {\n    padding: 16px 18px 14px;\n    background: var(--mj-bg-surface-card);\n    border-bottom: 1px solid var(--mj-border-subtle);\n}\n.ch-big[_ngcontent-%COMP%] {\n    font-size: 30px;\n    font-weight: 800;\n    line-height: 1;\n    color: var(--mj-text-primary);\n}\n.ch-big[_ngcontent-%COMP%]   small[_ngcontent-%COMP%] {\n    font-size: 13px;\n    font-weight: 600;\n    color: var(--mj-text-muted);\n    margin-left: 4px;\n}\n.ch-title[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    gap: 8px;\n    margin: 12px 0 4px;\n    font-size: 14px;\n    font-weight: 700;\n    color: var(--mj-text-primary);\n}\n.ch-info[_ngcontent-%COMP%]   .ch-title[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n    color: var(--mj-status-info);\n}\n.ch-warning[_ngcontent-%COMP%]   .ch-title[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n    color: var(--mj-status-warning);\n}\n.ch-error[_ngcontent-%COMP%]   .ch-title[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n    color: var(--mj-status-error);\n}\n.ch-explain[_ngcontent-%COMP%] {\n    margin: 0;\n    font-size: 12px;\n    line-height: 1.45;\n    color: var(--mj-text-secondary);\n}\n\n\n\n.ch-list[_ngcontent-%COMP%] {\n    display: flex;\n    flex-direction: column;\n}\n.ch-item[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    gap: 10px;\n    padding: 10px 16px;\n    border-bottom: 1px solid var(--mj-border-subtle);\n}\n.ch-item[_ngcontent-%COMP%]:last-child {\n    border-bottom: 0;\n}\n.ch-item-busy[_ngcontent-%COMP%] {\n    opacity: 0.55;\n}\n.ch-item-main[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    gap: 7px;\n    min-width: 0;\n    flex: 1;\n    flex-wrap: wrap;\n    font-size: 12.5px;\n}\n.ch-item-name[_ngcontent-%COMP%] {\n    font-weight: 700;\n    color: var(--mj-text-primary);\n}\n.ch-item-arrow[_ngcontent-%COMP%] {\n    color: var(--mj-text-muted);\n    font-size: 11px;\n}\n.ch-item-target[_ngcontent-%COMP%] {\n    font-weight: 600;\n    color: var(--mj-text-secondary);\n}\n.ch-item-side[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    gap: 7px;\n    white-space: nowrap;\n}\n.ch-score[_ngcontent-%COMP%] {\n    font-size: 11px;\n    font-weight: 700;\n    color: var(--mj-text-muted);\n    font-variant-numeric: tabular-nums;\n}\n\n\n\n.ch-empty[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    gap: 9px;\n    padding: 18px 16px;\n    font-size: 12.5px;\n    color: var(--mj-text-muted);\n}\n.ch-empty[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n    color: var(--mj-status-success);\n}\n\n\n\n.ch-foot[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    gap: 10px;\n    padding: 12px 16px;\n    border-top: 1px solid var(--mj-border-default);\n    background: var(--mj-bg-surface-card);\n}\n.ch-more[_ngcontent-%COMP%] {\n    font-size: 11.5px;\n    font-weight: 600;\n    color: var(--mj-text-muted);\n}"] });
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ClassifyHealthTabComponent, [{
        type: Component,
        args: [{ standalone: false, selector: 'classify-health-tab', template: "<mj-page-header-interior\n    Title=\"Tag Health\"\n    Subtitle=\"Automated taxonomy-quality signals from the latest classification runs\">\n  <div actions>\n    <button mjButton variant=\"secondary\" size=\"sm\" (click)=\"Refresh()\" [disabled]=\"IsLoading\">\n      @if (IsLoading) {\n        <i class=\"fa-solid fa-spinner fa-spin\"></i> <span class=\"mj-action-label\">Refreshing\u2026</span>\n      } @else {\n        <i class=\"fa-solid fa-arrows-rotate\"></i> <span class=\"mj-action-label\">Refresh</span>\n      }\n    </button>\n  </div>\n</mj-page-header-interior>\n\n<mj-page-body-interior [Padding]=\"false\" [Flex]=\"true\">\n  <div class=\"at-main-area\">\n    @if (IsLoading) {\n      <div class=\"at-page-body\">\n        <mj-loading text=\"Loading tag-health signals\u2026\"></mj-loading>\n      </div>\n    } @else {\n      <div class=\"ch-grid\">\n        @for (card of Cards; track card.Meta.Reason) {\n          <div class=\"ch-card\" [class]=\"'ch-' + card.Meta.Variant\">\n\n            <!-- Card head: big count + signal title + explanation -->\n            <div class=\"ch-top\">\n              <div class=\"ch-big\">\n                {{ card.Items.length }} <small>{{ card.Meta.CountNoun }}</small>\n              </div>\n              <h5 class=\"ch-title\">\n                <i [class]=\"card.Meta.Icon\"></i> {{ card.Meta.Title }}\n              </h5>\n              <p class=\"ch-explain\">{{ card.Meta.Explanation }}</p>\n            </div>\n\n            @if (card.Items.length === 0) {\n              <mj-empty-state class=\"ch-empty\" Variant=\"success\" Size=\"compact\" Icon=\"fa-solid fa-circle-check\"\n                [Title]=\"'No ' + card.Meta.Title.toLowerCase() + ' right now.'\" />\n            } @else {\n              <!-- Top examples (capped at PreviewLimit) -->\n              <div class=\"ch-list\">\n                @for (s of card.Items.slice(0, PreviewLimit); track s.ID) {\n                  <div class=\"ch-item\" [class.ch-item-busy]=\"IsRowBusy(s)\">\n                    <div class=\"ch-item-main\">\n                      <span class=\"ch-item-name\">{{ s.ProposedName }}</span>\n                      @if (card.Meta.Reason === 'MergeCandidate' && s.BestMatchTag) {\n                        <span class=\"ch-item-arrow\"><i class=\"fa-solid fa-arrow-right-long\"></i></span>\n                        <span class=\"ch-item-target\">{{ s.BestMatchTag }}</span>\n                      }\n                    </div>\n                    <div class=\"ch-item-side\">\n                      <span class=\"ch-score\">{{ FormatScore(s.BestMatchScore) }}</span>\n\n                      @switch (card.Meta.Reason) {\n                        @case ('MergeCandidate') {\n                          <button mjButton variant=\"primary\" size=\"sm\"\n                                  (click)=\"Merge(s)\" [disabled]=\"IsRowBusy(s) || !s.BestMatchTagID\">\n                            <i class=\"fa-solid fa-code-merge\"></i> Merge\n                          </button>\n                          <button mjButton variant=\"secondary\" size=\"sm\"\n                                  (click)=\"Dismiss(s)\" [disabled]=\"IsRowBusy(s)\">\n                            Dismiss\n                          </button>\n                        }\n                        @case ('LowUsage') {\n                          <button mjButton variant=\"warning\" size=\"sm\"\n                                  (click)=\"Deprecate(s)\" [disabled]=\"IsRowBusy(s)\">\n                            <i class=\"fa-solid fa-arrow-trend-down\"></i> Deprecate\n                          </button>\n                          <button mjButton variant=\"secondary\" size=\"sm\"\n                                  (click)=\"Dismiss(s)\" [disabled]=\"IsRowBusy(s)\">\n                            Dismiss\n                          </button>\n                        }\n                        @case ('WideNode') {\n                          <button mjButton variant=\"primary\" size=\"sm\"\n                                  (click)=\"ReviewInTaxonomy(s)\" [disabled]=\"IsRowBusy(s)\">\n                            <i class=\"fa-solid fa-sitemap\"></i> Review\n                          </button>\n                          <button mjButton variant=\"secondary\" size=\"sm\"\n                                  (click)=\"Dismiss(s)\" [disabled]=\"IsRowBusy(s)\">\n                            Dismiss\n                          </button>\n                        }\n                      }\n                    </div>\n                  </div>\n                }\n              </div>\n\n              <!-- Card footer: overflow hint + bulk action -->\n              <div class=\"ch-foot\">\n                @if (card.Items.length > PreviewLimit) {\n                  <span class=\"ch-more\">+{{ card.Items.length - PreviewLimit }} more</span>\n                } @else {\n                  <span class=\"ch-more\"></span>\n                }\n\n                @if (card.Meta.Reason === 'MergeCandidate' && HighConfidenceCount(card) > 0) {\n                  <button mjButton variant=\"primary\" size=\"sm\"\n                          (click)=\"MergeAllHighConfidence(card)\" [disabled]=\"IsBulkActing\">\n                    @if (IsBulkActing) {\n                      <i class=\"fa-solid fa-spinner fa-spin\"></i> Merging\u2026\n                    } @else {\n                      <i class=\"fa-solid fa-layer-group\"></i>\n                      Merge all high-confidence ({{ HighConfidenceCount(card) }})\n                    }\n                  </button>\n                }\n              </div>\n            }\n          </div>\n        }\n      </div>\n    }\n  </div>\n</mj-page-body-interior>\n", styles: ["/*\n * Tag Health tab styles.\n *\n * The host (AutotaggingPipelineResourceComponent) uses ViewEncapsulation.None,\n * so its `.at-*` utilities (.at-main-area, .at-page-body) style the shell. The\n * health-specific `.ch-*` classes below are scoped to this component.\n *\n * Design tokens only \u2014 no hardcoded hex. The 3 signal cards key off semantic\n * status tokens: info = merge, warning = low-usage, error = wide-node.\n */\n\n/* \u2500\u2500 3-card responsive grid \u2500\u2500 */\n.ch-grid {\n    display: grid;\n    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n    gap: 16px;\n    padding: 16px;\n    align-items: start;\n}\n\n/* \u2500\u2500 Card shell \u2500\u2500 */\n.ch-card {\n    display: flex;\n    flex-direction: column;\n    background: var(--mj-bg-surface);\n    border: 1px solid var(--mj-border-default);\n    border-radius: 12px;\n    overflow: hidden;\n}\n\n/* Top accent stripe driven by the signal variant */\n.ch-card .ch-top {\n    border-top: 3px solid var(--mj-border-default);\n}\n.ch-info .ch-top {\n    border-top-color: var(--mj-status-info);\n}\n.ch-warning .ch-top {\n    border-top-color: var(--mj-status-warning);\n}\n.ch-error .ch-top {\n    border-top-color: var(--mj-status-error);\n}\n\n/* \u2500\u2500 Card head \u2500\u2500 */\n.ch-top {\n    padding: 16px 18px 14px;\n    background: var(--mj-bg-surface-card);\n    border-bottom: 1px solid var(--mj-border-subtle);\n}\n.ch-big {\n    font-size: 30px;\n    font-weight: 800;\n    line-height: 1;\n    color: var(--mj-text-primary);\n}\n.ch-big small {\n    font-size: 13px;\n    font-weight: 600;\n    color: var(--mj-text-muted);\n    margin-left: 4px;\n}\n.ch-title {\n    display: flex;\n    align-items: center;\n    gap: 8px;\n    margin: 12px 0 4px;\n    font-size: 14px;\n    font-weight: 700;\n    color: var(--mj-text-primary);\n}\n.ch-info .ch-title i {\n    color: var(--mj-status-info);\n}\n.ch-warning .ch-title i {\n    color: var(--mj-status-warning);\n}\n.ch-error .ch-title i {\n    color: var(--mj-status-error);\n}\n.ch-explain {\n    margin: 0;\n    font-size: 12px;\n    line-height: 1.45;\n    color: var(--mj-text-secondary);\n}\n\n/* \u2500\u2500 Example list \u2500\u2500 */\n.ch-list {\n    display: flex;\n    flex-direction: column;\n}\n.ch-item {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    gap: 10px;\n    padding: 10px 16px;\n    border-bottom: 1px solid var(--mj-border-subtle);\n}\n.ch-item:last-child {\n    border-bottom: 0;\n}\n.ch-item-busy {\n    opacity: 0.55;\n}\n.ch-item-main {\n    display: flex;\n    align-items: center;\n    gap: 7px;\n    min-width: 0;\n    flex: 1;\n    flex-wrap: wrap;\n    font-size: 12.5px;\n}\n.ch-item-name {\n    font-weight: 700;\n    color: var(--mj-text-primary);\n}\n.ch-item-arrow {\n    color: var(--mj-text-muted);\n    font-size: 11px;\n}\n.ch-item-target {\n    font-weight: 600;\n    color: var(--mj-text-secondary);\n}\n.ch-item-side {\n    display: flex;\n    align-items: center;\n    gap: 7px;\n    white-space: nowrap;\n}\n.ch-score {\n    font-size: 11px;\n    font-weight: 700;\n    color: var(--mj-text-muted);\n    font-variant-numeric: tabular-nums;\n}\n\n/* \u2500\u2500 Empty state \u2500\u2500 */\n.ch-empty {\n    display: flex;\n    align-items: center;\n    gap: 9px;\n    padding: 18px 16px;\n    font-size: 12.5px;\n    color: var(--mj-text-muted);\n}\n.ch-empty i {\n    color: var(--mj-status-success);\n}\n\n/* \u2500\u2500 Footer \u2500\u2500 */\n.ch-foot {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    gap: 10px;\n    padding: 12px 16px;\n    border-top: 1px solid var(--mj-border-default);\n    background: var(--mj-bg-surface-card);\n}\n.ch-more {\n    font-size: 11.5px;\n    font-weight: 600;\n    color: var(--mj-text-muted);\n}\n"] }]
    }], null, { Resolved: [{
            type: Output
        }], OpenInTaxonomyRequested: [{
            type: Output
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ClassifyHealthTabComponent, { className: "ClassifyHealthTabComponent", filePath: "src/AI/components/autotagging/tabs/health-tab.component.ts", lineNumber: 89 }); })();
//# sourceMappingURL=health-tab.component.js.map