/**
 * @fileoverview Classify · Guided source setup wizard.
 *
 * A multi-step `mj-dialog` that walks an operator through standing up a new
 * content source: Source Type → Entity → Entity Document → Content Type →
 * Taxonomy Strategy → Domain Context → Review & Create. Steps whose prerequisite
 * already exists (e.g. a content type is already configured, or the chosen
 * entity already has an Entity Document) are auto-skipped.
 *
 * The wizard reuses the inline Entity Document create and the seed-taxonomy
 * review components, and the domain-context fields. It owns no business logic
 * beyond assembling the records — persistence is via the entity API
 * (`GetEntityObject` + `Save()` with result checking) threaded through
 * `ProviderToUse`.
 */
import { Component, ChangeDetectorRef, EventEmitter, Output, inject } from '@angular/core';
import { UUIDsEqual } from '@memberjunction/global';
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
import { MJNotificationService } from '@memberjunction/ng-notifications';
import { KnowledgeHubMetadataEngine, } from '@memberjunction/core-entities';
import * as i0 from "@angular/core";
import * as i1 from "@angular/forms";
import * as i2 from "@memberjunction/ng-ui-components";
import * as i3 from "../components/classify-seed-taxonomy.component";
const _forTrack0 = ($index, $item) => $item.ID;
const _forTrack1 = ($index, $item) => $item.Name;
function ClassifySetupWizardComponent_For_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 13)(1, "span", 14);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ɵ$index_7_r1 = ctx.$index;
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵclassProp("active", ɵ$index_7_r1 === ctx_r1.StepIndex)("done", ɵ$index_7_r1 < ctx_r1.StepIndex);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(ɵ$index_7_r1 + 1);
} }
function ClassifySetupWizardComponent_Conditional_10_For_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "option", 20);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const opt_r4 = ctx.$implicit;
    i0.ɵɵproperty("value", opt_r4.ID);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(opt_r4.Name);
} }
function ClassifySetupWizardComponent_Conditional_10_Conditional_12_Template(rf, ctx) { if (rf & 1) {
    const _r5 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 15)(1, "label", 16);
    i0.ɵɵtext(2, "URL (if applicable)");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "input", 21);
    i0.ɵɵtwoWayListener("ngModelChange", function ClassifySetupWizardComponent_Conditional_10_Conditional_12_Template_input_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.SourceURL, $event) || (ctx_r1.SourceURL = $event); return i0.ɵɵresetView($event); });
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(3);
    i0.ɵɵtwoWayProperty("ngModel", ctx_r1.SourceURL);
} }
function ClassifySetupWizardComponent_Conditional_10_Template(rf, ctx) { if (rf & 1) {
    const _r3 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 15)(1, "label", 16);
    i0.ɵɵtext(2, "Source name");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "input", 17);
    i0.ɵɵtwoWayListener("ngModelChange", function ClassifySetupWizardComponent_Conditional_10_Template_input_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.SourceName, $event) || (ctx_r1.SourceName = $event); return i0.ɵɵresetView($event); });
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(4, "div", 15)(5, "label", 16);
    i0.ɵɵtext(6, "Source type");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(7, "select", 18);
    i0.ɵɵtwoWayListener("ngModelChange", function ClassifySetupWizardComponent_Conditional_10_Template_select_ngModelChange_7_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.SourceTypeID, $event) || (ctx_r1.SourceTypeID = $event); return i0.ɵɵresetView($event); });
    i0.ɵɵelementStart(8, "option", 19);
    i0.ɵɵtext(9, "Select source type\u2026");
    i0.ɵɵelementEnd();
    i0.ɵɵrepeaterCreate(10, ClassifySetupWizardComponent_Conditional_10_For_11_Template, 2, 2, "option", 20, _forTrack0);
    i0.ɵɵelementEnd()();
    i0.ɵɵconditionalCreate(12, ClassifySetupWizardComponent_Conditional_10_Conditional_12_Template, 4, 1, "div", 15);
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(3);
    i0.ɵɵtwoWayProperty("ngModel", ctx_r1.SourceName);
    i0.ɵɵadvance(4);
    i0.ɵɵtwoWayProperty("ngModel", ctx_r1.SourceTypeID);
    i0.ɵɵadvance(3);
    i0.ɵɵrepeater(ctx_r1.SourceTypeOptions);
    i0.ɵɵadvance(2);
    i0.ɵɵconditional(!ctx_r1.IsEntitySource && ctx_r1.SourceTypeID ? 12 : -1);
} }
function ClassifySetupWizardComponent_Conditional_11_For_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "option", 20);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const opt_r7 = ctx.$implicit;
    i0.ɵɵproperty("value", opt_r7.ID);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(opt_r7.Name);
} }
function ClassifySetupWizardComponent_Conditional_11_Conditional_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 22);
    i0.ɵɵelement(1, "i", 23);
    i0.ɵɵelementStart(2, "strong");
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
    i0.ɵɵtext(4, " already has an Entity Document \u2014 the next step is skipped. ");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(ctx_r1.SelectedEntityName);
} }
function ClassifySetupWizardComponent_Conditional_11_Template(rf, ctx) { if (rf & 1) {
    const _r6 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 15)(1, "label", 16);
    i0.ɵɵtext(2, "Entity");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "select", 18);
    i0.ɵɵtwoWayListener("ngModelChange", function ClassifySetupWizardComponent_Conditional_11_Template_select_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.EntityID, $event) || (ctx_r1.EntityID = $event); return i0.ɵɵresetView($event); });
    i0.ɵɵelementStart(4, "option", 19);
    i0.ɵɵtext(5, "Select entity\u2026");
    i0.ɵɵelementEnd();
    i0.ɵɵrepeaterCreate(6, ClassifySetupWizardComponent_Conditional_11_For_7_Template, 2, 2, "option", 20, _forTrack0);
    i0.ɵɵelementEnd()();
    i0.ɵɵconditionalCreate(8, ClassifySetupWizardComponent_Conditional_11_Conditional_8_Template, 5, 1, "div", 22);
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(3);
    i0.ɵɵtwoWayProperty("ngModel", ctx_r1.EntityID);
    i0.ɵɵadvance(3);
    i0.ɵɵrepeater(ctx_r1.EntityOptions);
    i0.ɵɵadvance(2);
    i0.ɵɵconditional(ctx_r1.EntityID && !ctx_r1.SelectedEntityHasNoDocument ? 8 : -1);
} }
function ClassifySetupWizardComponent_Conditional_12_For_14_Template(rf, ctx) { if (rf & 1) {
    const _r9 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "label", 28)(1, "input", 30);
    i0.ɵɵtwoWayListener("ngModelChange", function ClassifySetupWizardComponent_Conditional_12_For_14_Template_input_ngModelChange_1_listener($event) { const f_r10 = i0.ɵɵrestoreView(_r9).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.NewEntityDocSelectedFields[f_r10.Name], $event) || (ctx_r1.NewEntityDocSelectedFields[f_r10.Name] = $event); return i0.ɵɵresetView($event); });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(2, "span");
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const f_r10 = ctx.$implicit;
    const ctx_r1 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance();
    i0.ɵɵtwoWayProperty("ngModel", ctx_r1.NewEntityDocSelectedFields[f_r10.Name]);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(f_r10.DisplayName);
} }
function ClassifySetupWizardComponent_Conditional_12_Conditional_16_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 31);
    i0.ɵɵtext(1, " Creating\u2026 ");
} }
function ClassifySetupWizardComponent_Conditional_12_Conditional_17_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 32);
    i0.ɵɵtext(1, " Create Entity Document ");
} }
function ClassifySetupWizardComponent_Conditional_12_Template(rf, ctx) { if (rf & 1) {
    const _r8 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 24);
    i0.ɵɵelement(1, "i", 25);
    i0.ɵɵelementStart(2, "strong");
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
    i0.ɵɵtext(4, " has no Entity Document. Create one to continue. ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "div", 15)(6, "label", 16);
    i0.ɵɵtext(7, "Document name");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(8, "input", 26);
    i0.ɵɵtwoWayListener("ngModelChange", function ClassifySetupWizardComponent_Conditional_12_Template_input_ngModelChange_8_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.NewEntityDocName, $event) || (ctx_r1.NewEntityDocName = $event); return i0.ɵɵresetView($event); });
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(9, "div", 15)(10, "label", 16);
    i0.ɵɵtext(11);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(12, "div", 27);
    i0.ɵɵrepeaterCreate(13, ClassifySetupWizardComponent_Conditional_12_For_14_Template, 4, 2, "label", 28, _forTrack1);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(15, "button", 29);
    i0.ɵɵlistener("click", function ClassifySetupWizardComponent_Conditional_12_Template_button_click_15_listener() { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.CreateEntityDocument()); });
    i0.ɵɵconditionalCreate(16, ClassifySetupWizardComponent_Conditional_12_Conditional_16_Template, 2, 0)(17, ClassifySetupWizardComponent_Conditional_12_Conditional_17_Template, 2, 0);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(ctx_r1.SelectedEntityName);
    i0.ɵɵadvance(5);
    i0.ɵɵtwoWayProperty("ngModel", ctx_r1.NewEntityDocName);
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1("Fields to include (", ctx_r1.SelectedEntityDocFieldCount, " selected)");
    i0.ɵɵadvance(2);
    i0.ɵɵrepeater(ctx_r1.SelectedEntityFields);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("disabled", ctx_r1.EntityDocSaving);
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r1.EntityDocSaving ? 16 : 17);
} }
function ClassifySetupWizardComponent_Conditional_13_Conditional_0_For_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "option", 20);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const opt_r12 = ctx.$implicit;
    i0.ɵɵproperty("value", opt_r12.ID);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(opt_r12.Name);
} }
function ClassifySetupWizardComponent_Conditional_13_Conditional_0_Template(rf, ctx) { if (rf & 1) {
    const _r11 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 15)(1, "label", 16);
    i0.ɵɵtext(2, "Content type");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "select", 18);
    i0.ɵɵtwoWayListener("ngModelChange", function ClassifySetupWizardComponent_Conditional_13_Conditional_0_Template_select_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.ContentTypeID, $event) || (ctx_r1.ContentTypeID = $event); return i0.ɵɵresetView($event); });
    i0.ɵɵelementStart(4, "option", 19);
    i0.ɵɵtext(5, "Select content type\u2026");
    i0.ɵɵelementEnd();
    i0.ɵɵrepeaterCreate(6, ClassifySetupWizardComponent_Conditional_13_Conditional_0_For_7_Template, 2, 2, "option", 20, _forTrack0);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(3);
    i0.ɵɵtwoWayProperty("ngModel", ctx_r1.ContentTypeID);
    i0.ɵɵadvance(3);
    i0.ɵɵrepeater(ctx_r1.ContentTypeOptions);
} }
function ClassifySetupWizardComponent_Conditional_13_Conditional_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 24);
    i0.ɵɵelement(1, "i", 33);
    i0.ɵɵtext(2, " No content types exist yet. Create one from the Content Types tab, then return to this wizard. ");
    i0.ɵɵelementEnd();
} }
function ClassifySetupWizardComponent_Conditional_13_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵconditionalCreate(0, ClassifySetupWizardComponent_Conditional_13_Conditional_0_Template, 8, 1, "div", 15)(1, ClassifySetupWizardComponent_Conditional_13_Conditional_1_Template, 3, 0, "div", 24);
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵconditional(ctx_r1.HasAnyContentType ? 0 : 1);
} }
function ClassifySetupWizardComponent_Conditional_14_Template(rf, ctx) { if (rf & 1) {
    const _r13 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "p", 34);
    i0.ɵɵtext(1, " Optionally generate a starter tag taxonomy by sampling this source's content. You can skip this and refine the taxonomy later. ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(2, "classify-seed-taxonomy", 35);
    i0.ɵɵlistener("Accepted", function ClassifySetupWizardComponent_Conditional_14_Template_classify_seed_taxonomy_Accepted_2_listener($event) { i0.ɵɵrestoreView(_r13); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnTaxonomyAccepted($event)); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("SourceID", ctx_r1.PendingSourceID)("Provider", ctx_r1.Provider);
} }
function ClassifySetupWizardComponent_Conditional_15_Template(rf, ctx) { if (rf & 1) {
    const _r14 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 15)(1, "label", 16);
    i0.ɵɵtext(2, "Source guidance");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "textarea", 36);
    i0.ɵɵtwoWayListener("ngModelChange", function ClassifySetupWizardComponent_Conditional_15_Template_textarea_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r14); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.ClassificationContext, $event) || (ctx_r1.ClassificationContext = $event); return i0.ɵɵresetView($event); });
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(4, "div", 37)(5, "div")(6, "div", 38);
    i0.ɵɵtext(7, "Substitutive mode");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(8, "div", 39);
    i0.ɵɵtext(9, "When on, this source's guidance replaces org/content-type context; off = added.");
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(10, "mj-switch", 40);
    i0.ɵɵtwoWayListener("ngModelChange", function ClassifySetupWizardComponent_Conditional_15_Template_mj_switch_ngModelChange_10_listener($event) { i0.ɵɵrestoreView(_r14); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.IsSubstitutiveMode, $event) || (ctx_r1.IsSubstitutiveMode = $event); return i0.ɵɵresetView($event); });
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(3);
    i0.ɵɵtwoWayProperty("ngModel", ctx_r1.ClassificationContext);
    i0.ɵɵadvance(7);
    i0.ɵɵtwoWayProperty("ngModel", ctx_r1.IsSubstitutiveMode);
} }
function ClassifySetupWizardComponent_Conditional_16_Conditional_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 41)(1, "span");
    i0.ɵɵtext(2, "Entity");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "strong");
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(5, "div", 41)(6, "span");
    i0.ɵɵtext(7, "Entity document");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(8, "strong");
    i0.ɵɵtext(9);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate(ctx_r1.SelectedEntityName || "\u2014");
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(ctx_r1.EntityDocName);
} }
function ClassifySetupWizardComponent_Conditional_16_Conditional_12_Conditional_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 41)(1, "span");
    i0.ɵɵtext(2, "URL");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "strong");
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(3);
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate(ctx_r1.SourceURL);
} }
function ClassifySetupWizardComponent_Conditional_16_Conditional_12_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 41)(1, "span");
    i0.ɵɵtext(2, "Content type");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "strong");
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd()();
    i0.ɵɵconditionalCreate(5, ClassifySetupWizardComponent_Conditional_16_Conditional_12_Conditional_5_Template, 5, 1, "div", 41);
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate(ctx_r1.ContentTypeName);
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r1.SourceURL ? 5 : -1);
} }
function ClassifySetupWizardComponent_Conditional_16_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 7)(1, "div", 41)(2, "span");
    i0.ɵɵtext(3, "Name");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "strong");
    i0.ɵɵtext(5);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(6, "div", 41)(7, "span");
    i0.ɵɵtext(8, "Source type");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(9, "strong");
    i0.ɵɵtext(10);
    i0.ɵɵelementEnd()();
    i0.ɵɵconditionalCreate(11, ClassifySetupWizardComponent_Conditional_16_Conditional_11_Template, 10, 2)(12, ClassifySetupWizardComponent_Conditional_16_Conditional_12_Template, 6, 2);
    i0.ɵɵelementStart(13, "div", 41)(14, "span");
    i0.ɵɵtext(15, "Domain context");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(16, "strong");
    i0.ɵɵtext(17);
    i0.ɵɵelementEnd()()();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(ctx_r1.SourceName || "\u2014");
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(ctx_r1.SourceTypeName);
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r1.IsEntitySource ? 11 : 12);
    i0.ɵɵadvance(6);
    i0.ɵɵtextInterpolate(ctx_r1.ClassificationContext.trim() ? ctx_r1.ClassificationContextMode + " \u00B7 set" : "none");
} }
function ClassifySetupWizardComponent_Conditional_19_Conditional_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 31);
    i0.ɵɵtext(1, " Creating\u2026 ");
} }
function ClassifySetupWizardComponent_Conditional_19_Conditional_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 32);
    i0.ɵɵtext(1, " Create source ");
} }
function ClassifySetupWizardComponent_Conditional_19_Template(rf, ctx) { if (rf & 1) {
    const _r15 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 29);
    i0.ɵɵlistener("click", function ClassifySetupWizardComponent_Conditional_19_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r15); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Finish()); });
    i0.ɵɵconditionalCreate(1, ClassifySetupWizardComponent_Conditional_19_Conditional_1_Template, 2, 0)(2, ClassifySetupWizardComponent_Conditional_19_Conditional_2_Template, 2, 0);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵproperty("disabled", ctx_r1.Saving);
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r1.Saving ? 1 : 2);
} }
function ClassifySetupWizardComponent_Conditional_20_Conditional_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 31);
    i0.ɵɵtext(1, " Working\u2026 ");
} }
function ClassifySetupWizardComponent_Conditional_20_Conditional_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtext(0, " Next ");
    i0.ɵɵelement(1, "i", 42);
} }
function ClassifySetupWizardComponent_Conditional_20_Template(rf, ctx) { if (rf & 1) {
    const _r16 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 29);
    i0.ɵɵlistener("click", function ClassifySetupWizardComponent_Conditional_20_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r16); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Next()); });
    i0.ɵɵconditionalCreate(1, ClassifySetupWizardComponent_Conditional_20_Conditional_1_Template, 2, 0)(2, ClassifySetupWizardComponent_Conditional_20_Conditional_2_Template, 2, 0);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵproperty("disabled", !ctx_r1.CanGoNext || ctx_r1.Saving);
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r1.Saving ? 1 : 2);
} }
function ClassifySetupWizardComponent_Conditional_21_Template(rf, ctx) { if (rf & 1) {
    const _r17 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 43);
    i0.ɵɵlistener("click", function ClassifySetupWizardComponent_Conditional_21_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r17); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Back()); });
    i0.ɵɵtext(1, "Back");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵproperty("disabled", ctx_r1.Saving);
} }
export class ClassifySetupWizardComponent extends BaseAngularComponent {
    cdr = inject(ChangeDetectorRef);
    /** Emitted after the wizard creates a source, so the host reloads. */
    Created = new EventEmitter();
    /** Emitted when the wizard is dismissed without creating anything. */
    Cancelled = new EventEmitter();
    Visible = false;
    CurrentStep = 'source-type';
    Saving = false;
    // ── Collected selections ──
    SourceName = '';
    SourceTypeID = '';
    EntityID = '';
    EntityDocID = '';
    ContentTypeID = '';
    SourceURL = '';
    // Domain context (source scope)
    ClassificationContext = '';
    ClassificationContextMode = 'additive';
    // ── Dropdown options ──
    SourceTypeOptions = [];
    ContentTypeOptions = [];
    EntityOptions = [];
    /** A pending source ID is created up-front when we reach the taxonomy step so
     *  the embedded seed-taxonomy generator has a real source to sample. */
    PendingSourceID = null;
    get IsSubstitutiveMode() {
        return this.ClassificationContextMode === 'substitutive';
    }
    set IsSubstitutiveMode(v) {
        this.ClassificationContextMode = v ? 'substitutive' : 'additive';
    }
    // ════════════════════════════════════════════
    // OPEN / CLOSE
    // ════════════════════════════════════════════
    async Open() {
        await this.loadOptions();
        this.resetState();
        this.Visible = true;
        this.cdr.detectChanges();
    }
    Close() {
        this.Visible = false;
        this.Cancelled.emit();
        this.cdr.detectChanges();
    }
    resetState() {
        this.CurrentStep = 'source-type';
        this.SourceName = '';
        this.SourceTypeID = '';
        this.EntityID = '';
        this.EntityDocID = '';
        // Preserve the auto-selected content type when only one exists (set in
        // loadOptions), so the wizard can skip the content-type step.
        this.ContentTypeID = this.ContentTypeOptions.length === 1 ? this.ContentTypeOptions[0].ID : '';
        this.SourceURL = '';
        this.ClassificationContext = '';
        this.ClassificationContextMode = 'additive';
        this.PendingSourceID = null;
    }
    async loadOptions() {
        try {
            const p = this.ProviderToUse;
            const engine = KnowledgeHubMetadataEngine.Instance;
            await engine.Config(false, p.CurrentUser, p);
            this.SourceTypeOptions = engine.ContentSourceTypes.map(t => ({ ID: t.ID, Name: t.Name }));
            this.ContentTypeOptions = engine.ContentTypes.map(t => ({ ID: t.ID, Name: t.Name }));
            // When exactly one content type exists, auto-select it so the wizard can
            // skip the content-type step entirely (see ActiveSteps).
            if (this.ContentTypeOptions.length === 1) {
                this.ContentTypeID = this.ContentTypeOptions[0].ID;
            }
            // Entities that have active documents — the safe default for entity sources.
            const entityMap = new Map();
            for (const doc of engine.GetActiveEntityDocuments()) {
                const info = doc.Entity ? p.Entities.find(e => e.Name === doc.Entity) : undefined;
                if (info && !entityMap.has(info.ID))
                    entityMap.set(info.ID, info.Name);
            }
            // Also include all entities so a brand-new entity (no doc yet) can be picked.
            for (const e of p.Entities) {
                if (!entityMap.has(e.ID))
                    entityMap.set(e.ID, e.Name);
            }
            this.EntityOptions = Array.from(entityMap.entries())
                .map(([ID, Name]) => ({ ID, Name }))
                .sort((a, b) => a.Name.localeCompare(b.Name));
        }
        catch (error) {
            console.error('[Classify Wizard] Error loading options:', error);
        }
    }
    // ════════════════════════════════════════════
    // STEP LOGIC
    // ════════════════════════════════════════════
    /** Whether the selected source type is the Entity type (name-based check). */
    get IsEntitySource() {
        if (!this.SourceTypeID)
            return false;
        const t = this.SourceTypeOptions.find(o => UUIDsEqual(o.ID, this.SourceTypeID));
        return t?.Name?.toLowerCase() === 'entity';
    }
    /** EntityInfo for the selected entity, or null. */
    get selectedEntityInfo() {
        if (!this.EntityID)
            return null;
        return this.ProviderToUse.Entities.find(e => UUIDsEqual(e.ID, this.EntityID)) ?? null;
    }
    get SelectedEntityName() {
        return this.selectedEntityInfo?.Name ?? '';
    }
    /** True when the selected entity has no active Entity Document. */
    get SelectedEntityHasNoDocument() {
        const info = this.selectedEntityInfo;
        if (!info)
            return false;
        try {
            return KnowledgeHubMetadataEngine.Instance.GetActiveEntityDocuments()
                .filter(d => d.Entity === info.Name).length === 0;
        }
        catch {
            return false;
        }
    }
    /** Whether any content type exists (drives the content-type step skip). */
    get HasAnyContentType() {
        return this.ContentTypeOptions.length > 0;
    }
    /**
     * The ordered list of steps relevant to the current selections. Steps whose
     * prerequisite already exists are filtered out, so the progress UI + next/back
     * navigation only ever traverse meaningful steps.
     */
    get ActiveSteps() {
        const steps = ['source-type'];
        if (this.IsEntitySource) {
            steps.push('entity');
            // Entity Document step only when the chosen entity lacks one.
            if (this.EntityID && this.SelectedEntityHasNoDocument)
                steps.push('entity-doc');
        }
        // Content type only matters for non-entity sources. When exactly one content
        // type exists it is auto-selected (see loadOptions) and the step is skipped —
        // there's nothing to choose. The step is shown for 0 (n/a path) or 2+ options.
        if (!this.IsEntitySource && this.ContentTypeOptions.length !== 1)
            steps.push('content-type');
        steps.push('taxonomy');
        steps.push('domain-context');
        steps.push('review');
        return steps;
    }
    get StepIndex() {
        return Math.max(0, this.ActiveSteps.indexOf(this.CurrentStep));
    }
    get TotalSteps() {
        return this.ActiveSteps.length;
    }
    get StepLabel() {
        switch (this.CurrentStep) {
            case 'source-type': return 'Source type';
            case 'entity': return 'Entity';
            case 'entity-doc': return 'Entity document';
            case 'content-type': return 'Content type';
            case 'taxonomy': return 'Taxonomy strategy';
            case 'domain-context': return 'Domain context';
            case 'review': return 'Review & create';
        }
    }
    get CanGoNext() {
        switch (this.CurrentStep) {
            case 'source-type': return !!this.SourceName.trim() && !!this.SourceTypeID;
            case 'entity': return !!this.EntityID;
            case 'entity-doc': return !this.SelectedEntityHasNoDocument; // advance once a doc exists
            case 'content-type': return !!this.ContentTypeID;
            default: return true;
        }
    }
    get IsLastStep() {
        return this.CurrentStep === 'review';
    }
    async Next() {
        if (!this.CanGoNext)
            return;
        const steps = this.ActiveSteps;
        const idx = steps.indexOf(this.CurrentStep);
        const nextStep = steps[idx + 1];
        if (!nextStep)
            return;
        // When advancing into the taxonomy step, create the source up front so the
        // seed generator has a real source to sample. If it fails, stay put.
        if (nextStep === 'taxonomy' && !this.PendingSourceID) {
            const ok = await this.ensurePendingSource();
            if (!ok)
                return;
        }
        if (nextStep === 'entity-doc') {
            this.PrimeEntityDocDefaults();
        }
        this.CurrentStep = nextStep;
        this.cdr.detectChanges();
    }
    Back() {
        const steps = this.ActiveSteps;
        const idx = steps.indexOf(this.CurrentStep);
        if (idx > 0) {
            this.CurrentStep = steps[idx - 1];
            this.cdr.detectChanges();
        }
    }
    // ── Inline Entity Document creation (entity-doc step) ──
    EntityDocSaving = false;
    NewEntityDocName = '';
    NewEntityDocSelectedFields = {};
    /** Fields of the selected entity, for the field-picker in the inline create. */
    get SelectedEntityFields() {
        const info = this.selectedEntityInfo;
        if (!info)
            return [];
        return info.Fields
            .filter(f => !f.IsVirtual)
            .map(f => ({ Name: f.Name, DisplayName: f.DisplayName || f.Name }));
    }
    get SelectedEntityDocFieldCount() {
        return Object.values(this.NewEntityDocSelectedFields).filter(Boolean).length;
    }
    /** Prime the inline-create defaults when entering the entity-doc step. */
    PrimeEntityDocDefaults() {
        const info = this.selectedEntityInfo;
        if (!info || this.NewEntityDocName)
            return;
        this.NewEntityDocName = `${info.Name} Document`;
        this.NewEntityDocSelectedFields = {};
        const preferred = ['Name', 'Title', 'Description', 'Notes', 'Body', 'Content'];
        for (const f of this.SelectedEntityFields) {
            if (preferred.includes(f.Name))
                this.NewEntityDocSelectedFields[f.Name] = true;
        }
    }
    /** Create the Entity Document for the selected entity, then refresh + select it. */
    async CreateEntityDocument() {
        if (this.EntityDocSaving)
            return;
        const info = this.selectedEntityInfo;
        if (!info)
            return;
        if (!this.NewEntityDocName.trim()) {
            MJNotificationService.Instance.CreateSimpleNotification('Enter a document name.', 'warning', 3000);
            return;
        }
        this.EntityDocSaving = true;
        this.cdr.detectChanges();
        try {
            const p = this.ProviderToUse;
            const doc = await p.GetEntityObject('MJ: Entity Documents', p.CurrentUser);
            doc.NewRecord();
            doc.Name = this.NewEntityDocName.trim();
            doc.EntityID = info.ID;
            doc.Status = 'Active';
            const selectedFields = this.SelectedEntityFields
                .filter(f => this.NewEntityDocSelectedFields[f.Name])
                .map(f => f.Name);
            doc.Configuration = JSON.stringify({ Fields: selectedFields });
            const saved = await doc.Save();
            if (saved) {
                await KnowledgeHubMetadataEngine.Instance.Config(true, p.CurrentUser, p);
                this.EntityDocID = doc.ID;
                MJNotificationService.Instance.CreateSimpleNotification('Entity Document created', 'success', 2500);
            }
            else {
                const detail = doc.LatestResult?.CompleteMessage ?? 'Unknown error';
                MJNotificationService.Instance.CreateSimpleNotification(`Failed to create Entity Document: ${detail}`, 'error', 5000);
            }
        }
        catch (error) {
            const msg = error instanceof Error ? error.message : String(error);
            MJNotificationService.Instance.CreateSimpleNotification(`Error: ${msg}`, 'error', 5000);
        }
        finally {
            this.EntityDocSaving = false;
            this.cdr.detectChanges();
        }
    }
    /** Called by the embedded seed-taxonomy after it persists tags. */
    OnTaxonomyAccepted(_event) {
        this.cdr.detectChanges();
    }
    // ════════════════════════════════════════════
    // PERSISTENCE
    // ════════════════════════════════════════════
    /**
     * Create (once) the content source record so the taxonomy step can sample it.
     * Subsequent edits (domain context) are applied to this same record on Finish.
     */
    async ensurePendingSource() {
        this.Saving = true;
        this.cdr.detectChanges();
        try {
            const id = await this.saveSource();
            if (id) {
                this.PendingSourceID = id;
                return true;
            }
            return false;
        }
        finally {
            this.Saving = false;
            this.cdr.detectChanges();
        }
    }
    /**
     * Create or update the content source from the collected selections. Returns
     * the saved ID, or null on failure. Defaults required NOT NULL columns for
     * entity sources the same way the quick-edit form does.
     */
    async saveSource() {
        try {
            const p = this.ProviderToUse;
            const entity = await p.GetEntityObject('MJ: Content Sources', p.CurrentUser);
            if (this.PendingSourceID) {
                const loaded = await entity.Load(this.PendingSourceID);
                if (!loaded) {
                    entity.NewRecord();
                }
            }
            else {
                entity.NewRecord();
            }
            entity.Name = this.SourceName.trim();
            entity.ContentSourceTypeID = this.SourceTypeID;
            const engine = KnowledgeHubMetadataEngine.Instance;
            if (this.IsEntitySource) {
                entity.EntityID = this.EntityID || null;
                entity.EntityDocumentID = this.resolveEntityDocID();
                entity.URL = '';
                // NOT NULL columns: default to first available.
                if (!entity.ContentTypeID) {
                    if (engine.ContentTypes.length === 0) {
                        MJNotificationService.Instance.CreateSimpleNotification('No content types exist. Create one before adding an entity source.', 'warning', 5000);
                        return null;
                    }
                    entity.ContentTypeID = engine.ContentTypes[0].ID;
                }
                if (!entity.ContentFileTypeID && engine.ContentFileTypes.length > 0) {
                    entity.ContentFileTypeID = engine.ContentFileTypes[0].ID;
                }
            }
            else {
                entity.EntityID = null;
                entity.EntityDocumentID = null;
                entity.ContentTypeID = this.ContentTypeID;
                if (!entity.ContentFileTypeID && engine.ContentFileTypes.length > 0) {
                    entity.ContentFileTypeID = engine.ContentFileTypes[0].ID;
                }
                entity.URL = this.SourceURL || '';
            }
            // Merge the domain-context fields into the typed Configuration JSON.
            const config = entity.ConfigurationObject ?? {};
            if (this.ClassificationContext.trim()) {
                config.ClassificationContext = this.ClassificationContext;
                config.ClassificationContextMode = this.ClassificationContextMode;
            }
            else {
                delete config.ClassificationContext;
                delete config.ClassificationContextMode;
            }
            entity.ConfigurationObject = config;
            const saved = await entity.Save();
            if (saved)
                return entity.ID;
            const detail = entity.LatestResult?.CompleteMessage ?? 'Unknown error';
            MJNotificationService.Instance.CreateSimpleNotification(`Failed to save source: ${detail}`, 'error', 5000);
            return null;
        }
        catch (error) {
            const msg = error instanceof Error ? error.message : String(error);
            MJNotificationService.Instance.CreateSimpleNotification(`Error: ${msg}`, 'error', 5000);
            return null;
        }
    }
    /** Resolve the entity document ID to store (explicit choice or the entity's only doc). */
    resolveEntityDocID() {
        if (this.EntityDocID)
            return this.EntityDocID;
        const info = this.selectedEntityInfo;
        if (!info)
            return null;
        const docs = KnowledgeHubMetadataEngine.Instance.GetActiveEntityDocuments()
            .filter(d => d.Entity === info.Name);
        return docs.length > 0 ? docs[0].ID : null;
    }
    /** Finish the wizard: persist the (final) source and emit Created. */
    async Finish() {
        if (this.Saving)
            return;
        this.Saving = true;
        this.cdr.detectChanges();
        try {
            const id = await this.saveSource();
            if (id) {
                MJNotificationService.Instance.CreateSimpleNotification('Source created', 'success', 2500);
                this.Visible = false;
                this.Created.emit({ SourceID: id });
            }
        }
        finally {
            this.Saving = false;
            this.cdr.detectChanges();
        }
    }
    // ── Entity-doc options for the review/entity-doc step ──
    get EntityDocOptions() {
        const info = this.selectedEntityInfo;
        if (!info)
            return [];
        try {
            return KnowledgeHubMetadataEngine.Instance.GetActiveEntityDocuments()
                .filter(d => d.Entity === info.Name)
                .map(d => ({ ID: d.ID, Name: d.Name }));
        }
        catch {
            return [];
        }
    }
    // ── Review labels ──
    get SourceTypeName() {
        return this.SourceTypeOptions.find(o => UUIDsEqual(o.ID, this.SourceTypeID))?.Name ?? '—';
    }
    get ContentTypeName() {
        return this.ContentTypeOptions.find(o => UUIDsEqual(o.ID, this.ContentTypeID))?.Name ?? '—';
    }
    get EntityDocName() {
        const id = this.resolveEntityDocID();
        if (!id)
            return '—';
        return this.EntityDocOptions.find(o => UUIDsEqual(o.ID, id))?.Name ?? '—';
    }
    static ɵfac = /*@__PURE__*/ (() => { let ɵClassifySetupWizardComponent_BaseFactory; return function ClassifySetupWizardComponent_Factory(__ngFactoryType__) { return (ɵClassifySetupWizardComponent_BaseFactory || (ɵClassifySetupWizardComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ClassifySetupWizardComponent)))(__ngFactoryType__ || ClassifySetupWizardComponent); }; })();
    static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ClassifySetupWizardComponent, selectors: [["classify-setup-wizard"]], outputs: { Created: "Created", Cancelled: "Cancelled" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 25, vars: 14, consts: [["Title", "Add Source (Guided)", 3, "Close", "Visible", "Width"], [1, "wiz"], [1, "wiz-progress"], [1, "wiz-step-dot", 3, "active", "done"], [1, "wiz-step-title"], [1, "wiz-step-counter"], [1, "wiz-body"], [1, "wiz-review"], [1, "wiz-actions"], ["mjButton", "", "variant", "primary", "size", "sm", 3, "disabled"], ["mjButton", "", "variant", "secondary", "size", "sm", 3, "disabled"], [1, "wiz-actions-spacer"], ["mjButton", "", "variant", "flat", "size", "sm", 3, "click"], [1, "wiz-step-dot"], [1, "wiz-step-num"], [1, "at-form-group"], [1, "at-form-label"], ["type", "text", "placeholder", "Source name", 1, "mj-input", 3, "ngModelChange", "ngModel"], [1, "mj-input", 3, "ngModelChange", "ngModel"], ["value", ""], [3, "value"], ["type", "url", "placeholder", "https://\u2026", 1, "mj-input", 3, "ngModelChange", "ngModel"], [1, "wiz-callout", "ok"], [1, "fa-solid", "fa-circle-check"], [1, "wiz-callout"], [1, "fa-solid", "fa-circle-info"], ["type", "text", "placeholder", "Document name", 1, "mj-input", 3, "ngModelChange", "ngModel"], [1, "wiz-field-list"], [1, "wiz-field-row"], ["mjButton", "", "variant", "primary", "size", "sm", 3, "click", "disabled"], ["type", "checkbox", 3, "ngModelChange", "ngModel"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "fa-solid", "fa-check"], [1, "fa-solid", "fa-triangle-exclamation"], [1, "wiz-help"], [3, "Accepted", "SourceID", "Provider"], ["rows", "4", "placeholder", "Free-text guidance for the classifier about this source's domain\u2026", 1, "mj-textarea", 3, "ngModelChange", "ngModel"], [1, "wiz-toggle-row"], [1, "wiz-toggle-t"], [1, "wiz-toggle-d"], [3, "ngModelChange", "ngModel"], [1, "wiz-review-row"], [1, "fa-solid", "fa-arrow-right"], ["mjButton", "", "variant", "secondary", "size", "sm", 3, "click", "disabled"]], template: function ClassifySetupWizardComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "mj-dialog", 0);
            i0.ɵɵlistener("Close", function ClassifySetupWizardComponent_Template_mj_dialog_Close_0_listener() { return ctx.Close(); });
            i0.ɵɵelementStart(1, "div", 1)(2, "div", 2);
            i0.ɵɵrepeaterCreate(3, ClassifySetupWizardComponent_For_4_Template, 3, 5, "div", 3, i0.ɵɵrepeaterTrackByIdentity);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(5, "div", 4)(6, "span", 5);
            i0.ɵɵtext(7);
            i0.ɵɵelementEnd();
            i0.ɵɵtext(8);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(9, "div", 6);
            i0.ɵɵconditionalCreate(10, ClassifySetupWizardComponent_Conditional_10_Template, 13, 3);
            i0.ɵɵconditionalCreate(11, ClassifySetupWizardComponent_Conditional_11_Template, 9, 2);
            i0.ɵɵconditionalCreate(12, ClassifySetupWizardComponent_Conditional_12_Template, 18, 5);
            i0.ɵɵconditionalCreate(13, ClassifySetupWizardComponent_Conditional_13_Template, 2, 1);
            i0.ɵɵconditionalCreate(14, ClassifySetupWizardComponent_Conditional_14_Template, 3, 2);
            i0.ɵɵconditionalCreate(15, ClassifySetupWizardComponent_Conditional_15_Template, 11, 2);
            i0.ɵɵconditionalCreate(16, ClassifySetupWizardComponent_Conditional_16_Template, 18, 4, "div", 7);
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(17, "mj-dialog-actions")(18, "div", 8);
            i0.ɵɵconditionalCreate(19, ClassifySetupWizardComponent_Conditional_19_Template, 3, 2, "button", 9)(20, ClassifySetupWizardComponent_Conditional_20_Template, 3, 2, "button", 9);
            i0.ɵɵconditionalCreate(21, ClassifySetupWizardComponent_Conditional_21_Template, 2, 1, "button", 10);
            i0.ɵɵelement(22, "span", 11);
            i0.ɵɵelementStart(23, "button", 12);
            i0.ɵɵlistener("click", function ClassifySetupWizardComponent_Template_button_click_23_listener() { return ctx.Close(); });
            i0.ɵɵtext(24, "Cancel");
            i0.ɵɵelementEnd()()()();
        } if (rf & 2) {
            i0.ɵɵproperty("Visible", ctx.Visible)("Width", 660);
            i0.ɵɵadvance(3);
            i0.ɵɵrepeater(ctx.ActiveSteps);
            i0.ɵɵadvance(4);
            i0.ɵɵtextInterpolate2("Step ", ctx.StepIndex + 1, " of ", ctx.TotalSteps);
            i0.ɵɵadvance();
            i0.ɵɵtextInterpolate1("", ctx.StepLabel, " ");
            i0.ɵɵadvance(2);
            i0.ɵɵconditional(ctx.CurrentStep === "source-type" ? 10 : -1);
            i0.ɵɵadvance();
            i0.ɵɵconditional(ctx.CurrentStep === "entity" ? 11 : -1);
            i0.ɵɵadvance();
            i0.ɵɵconditional(ctx.CurrentStep === "entity-doc" ? 12 : -1);
            i0.ɵɵadvance();
            i0.ɵɵconditional(ctx.CurrentStep === "content-type" ? 13 : -1);
            i0.ɵɵadvance();
            i0.ɵɵconditional(ctx.CurrentStep === "taxonomy" ? 14 : -1);
            i0.ɵɵadvance();
            i0.ɵɵconditional(ctx.CurrentStep === "domain-context" ? 15 : -1);
            i0.ɵɵadvance();
            i0.ɵɵconditional(ctx.CurrentStep === "review" ? 16 : -1);
            i0.ɵɵadvance(3);
            i0.ɵɵconditional(ctx.IsLastStep ? 19 : 20);
            i0.ɵɵadvance(2);
            i0.ɵɵconditional(ctx.StepIndex > 0 ? 21 : -1);
        } }, dependencies: [i1.NgSelectOption, i1.ɵNgSelectMultipleOption, i1.DefaultValueAccessor, i1.CheckboxControlValueAccessor, i1.SelectControlValueAccessor, i1.NgControlStatus, i1.NgModel, i2.MJButtonDirective, i2.MJSwitchComponent, i2.MJDialogComponent, i2.MJDialogActionsComponent, i3.ClassifySeedTaxonomyComponent], styles: [".wiz[_ngcontent-%COMP%] {\n    display: flex;\n    flex-direction: column;\n    gap: 20px;\n    width: 100%;\n    \n\n\n    min-width: min(620px, 100%);\n}\n\n\n\n.wiz-progress[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    gap: 0;\n    width: 100%;\n}\n\n\n\n\n.wiz-step-dot[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    flex: 1 1 auto;               \n\n}\n.wiz-step-dot[_ngcontent-%COMP%]:last-child {\n    flex: 0 0 auto;               \n\n}\n\n\n.wiz-step-num[_ngcontent-%COMP%] {\n    width: 30px;\n    height: 30px;\n    flex: 0 0 30px;\n    border-radius: 50%;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    background: var(--mj-bg-surface-sunken);\n    color: var(--mj-text-muted);\n    border: 1px solid var(--mj-border-default);\n    font-size: 0.8rem;\n    font-weight: 600;\n    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;\n}\n\n\n.wiz-step-dot[_ngcontent-%COMP%]:not(:last-child)::after {\n    content: '';\n    flex: 1 1 auto;\n    height: 2px;\n    margin: 0 6px;\n    min-width: 16px;\n    background: var(--mj-border-default);\n}\n.wiz-step-dot.active[_ngcontent-%COMP%]   .wiz-step-num[_ngcontent-%COMP%] {\n    background: var(--mj-brand-primary);\n    color: var(--mj-text-inverse);\n    border-color: var(--mj-brand-primary);\n}\n.wiz-step-dot.done[_ngcontent-%COMP%]   .wiz-step-num[_ngcontent-%COMP%] {\n    background: color-mix(in srgb, var(--mj-brand-primary) 18%, var(--mj-bg-surface));\n    color: var(--mj-brand-primary);\n    border-color: var(--mj-brand-primary);\n}\n.wiz-step-dot.done[_ngcontent-%COMP%]:not(:last-child)::after, \n.wiz-step-dot.active[_ngcontent-%COMP%]:not(:last-child)::after {\n    background: color-mix(in srgb, var(--mj-brand-primary) 40%, var(--mj-border-default));\n}\n\n.wiz-step-title[_ngcontent-%COMP%] {\n    font-size: 0.95rem;\n    font-weight: 600;\n    color: var(--mj-text-primary);\n}\n.wiz-step-title[_ngcontent-%COMP%]   .wiz-step-counter[_ngcontent-%COMP%] {\n    color: var(--mj-text-muted);\n    font-weight: 500;\n    margin-right: 8px;\n}\n\n\n\n.wiz-body[_ngcontent-%COMP%] {\n    display: flex;\n    flex-direction: column;\n    gap: 16px;\n    min-height: 220px;\n    width: 100%;\n}\n.wiz-help[_ngcontent-%COMP%] {\n    margin: 0;\n    font-size: 0.85rem;\n    color: var(--mj-text-muted);\n    line-height: 1.5;\n}\n.wiz-callout[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: flex-start;\n    gap: 10px;\n    padding: 12px 14px;\n    background: color-mix(in srgb, var(--mj-status-info) 8%, var(--mj-bg-surface));\n    border: 1px solid var(--mj-status-info-border, var(--mj-border-default));\n    border-radius: 8px;\n    font-size: 0.85rem;\n    color: var(--mj-text-secondary);\n    line-height: 1.45;\n}\n.wiz-callout[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] { color: var(--mj-status-info); margin-top: 2px; }\n.wiz-callout.ok[_ngcontent-%COMP%] { background: color-mix(in srgb, var(--mj-status-success) 8%, var(--mj-bg-surface)); }\n.wiz-callout.ok[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] { color: var(--mj-status-success); }\n.wiz-field-list[_ngcontent-%COMP%] {\n    max-height: 220px;\n    overflow-y: auto;\n    border: 1px solid var(--mj-border-subtle);\n    border-radius: 8px;\n    padding: 8px 10px;\n}\n.wiz-field-row[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    gap: 8px;\n    padding: 4px 0;\n    font-size: 0.85rem;\n    color: var(--mj-text-primary);\n    cursor: pointer;\n}\n.wiz-toggle-row[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    gap: 16px;\n    padding: 12px 14px;\n    border: 1px solid var(--mj-border-subtle);\n    border-radius: 8px;\n    background: var(--mj-bg-surface-card);\n}\n.wiz-toggle-t[_ngcontent-%COMP%] {\n    font-size: 0.88rem;\n    font-weight: 600;\n    color: var(--mj-text-primary);\n}\n.wiz-toggle-d[_ngcontent-%COMP%] {\n    font-size: 0.78rem;\n    color: var(--mj-text-muted);\n    margin-top: 3px;\n    line-height: 1.4;\n}\n.wiz-review[_ngcontent-%COMP%] {\n    display: flex;\n    flex-direction: column;\n    gap: 0;\n    border: 1px solid var(--mj-border-default);\n    border-radius: 8px;\n    overflow: hidden;\n}\n.wiz-review-row[_ngcontent-%COMP%] {\n    display: flex;\n    justify-content: space-between;\n    gap: 16px;\n    padding: 11px 16px;\n    font-size: 0.86rem;\n    border-bottom: 1px solid var(--mj-border-subtle);\n}\n.wiz-review-row[_ngcontent-%COMP%]:last-child { border-bottom: none; }\n.wiz-review-row[_ngcontent-%COMP%]   span[_ngcontent-%COMP%] { color: var(--mj-text-muted); }\n.wiz-review-row[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%] { color: var(--mj-text-primary); }\n\n\n\n.wiz-actions[_ngcontent-%COMP%] {\n    display: flex;\n    gap: 8px;\n    align-items: center;\n    width: 100%;\n}\n.wiz-actions[_ngcontent-%COMP%]   .wiz-actions-spacer[_ngcontent-%COMP%] {\n    flex: 1 1 auto;\n}\n\n\n\n.at-form-group[_ngcontent-%COMP%] {\n    display: flex;\n    flex-direction: column;\n    gap: 6px;\n    width: 100%;\n}\n.at-form-label[_ngcontent-%COMP%] {\n    font-size: 0.82rem;\n    font-weight: 600;\n    color: var(--mj-text-secondary);\n}\n.at-form-group[_ngcontent-%COMP%]   .mj-input[_ngcontent-%COMP%], \n.at-form-group[_ngcontent-%COMP%]   .mj-textarea[_ngcontent-%COMP%] {\n    width: 100%;\n}"] });
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ClassifySetupWizardComponent, [{
        type: Component,
        args: [{ standalone: false, selector: 'classify-setup-wizard', template: "<mj-dialog [Visible]=\"Visible\" Title=\"Add Source (Guided)\" [Width]=\"660\" (Close)=\"Close()\">\n    <div class=\"wiz\">\n        <!-- Step progress -->\n        <div class=\"wiz-progress\">\n            @for (s of ActiveSteps; track s; let i = $index) {\n                <div class=\"wiz-step-dot\"\n                     [class.active]=\"i === StepIndex\"\n                     [class.done]=\"i < StepIndex\">\n                    <span class=\"wiz-step-num\">{{ i + 1 }}</span>\n                </div>\n            }\n        </div>\n        <div class=\"wiz-step-title\">\n            <span class=\"wiz-step-counter\">Step {{ StepIndex + 1 }} of {{ TotalSteps }}</span>{{ StepLabel }}\n        </div>\n\n        <div class=\"wiz-body\">\n            <!-- Source Type -->\n            @if (CurrentStep === 'source-type') {\n                <div class=\"at-form-group\">\n                    <label class=\"at-form-label\">Source name</label>\n                    <input type=\"text\" class=\"mj-input\" [(ngModel)]=\"SourceName\" placeholder=\"Source name\">\n                </div>\n                <div class=\"at-form-group\">\n                    <label class=\"at-form-label\">Source type</label>\n                    <select class=\"mj-input\" [(ngModel)]=\"SourceTypeID\">\n                        <option value=\"\">Select source type\u2026</option>\n                        @for (opt of SourceTypeOptions; track opt.ID) {\n                            <option [value]=\"opt.ID\">{{ opt.Name }}</option>\n                        }\n                    </select>\n                </div>\n                @if (!IsEntitySource && SourceTypeID) {\n                    <div class=\"at-form-group\">\n                        <label class=\"at-form-label\">URL (if applicable)</label>\n                        <input type=\"url\" class=\"mj-input\" [(ngModel)]=\"SourceURL\" placeholder=\"https://\u2026\">\n                    </div>\n                }\n            }\n\n            <!-- Entity -->\n            @if (CurrentStep === 'entity') {\n                <div class=\"at-form-group\">\n                    <label class=\"at-form-label\">Entity</label>\n                    <select class=\"mj-input\" [(ngModel)]=\"EntityID\">\n                        <option value=\"\">Select entity\u2026</option>\n                        @for (opt of EntityOptions; track opt.ID) {\n                            <option [value]=\"opt.ID\">{{ opt.Name }}</option>\n                        }\n                    </select>\n                </div>\n                @if (EntityID && !SelectedEntityHasNoDocument) {\n                    <div class=\"wiz-callout ok\">\n                        <i class=\"fa-solid fa-circle-check\"></i>\n                        <strong>{{ SelectedEntityName }}</strong> already has an Entity Document \u2014 the next step is skipped.\n                    </div>\n                }\n            }\n\n            <!-- Entity Document (inline create) -->\n            @if (CurrentStep === 'entity-doc') {\n                <div class=\"wiz-callout\">\n                    <i class=\"fa-solid fa-circle-info\"></i>\n                    <strong>{{ SelectedEntityName }}</strong> has no Entity Document. Create one to continue.\n                </div>\n                <div class=\"at-form-group\">\n                    <label class=\"at-form-label\">Document name</label>\n                    <input type=\"text\" class=\"mj-input\" [(ngModel)]=\"NewEntityDocName\" placeholder=\"Document name\">\n                </div>\n                <div class=\"at-form-group\">\n                    <label class=\"at-form-label\">Fields to include ({{ SelectedEntityDocFieldCount }} selected)</label>\n                    <div class=\"wiz-field-list\">\n                        @for (f of SelectedEntityFields; track f.Name) {\n                            <label class=\"wiz-field-row\">\n                                <input type=\"checkbox\" [(ngModel)]=\"NewEntityDocSelectedFields[f.Name]\">\n                                <span>{{ f.DisplayName }}</span>\n                            </label>\n                        }\n                    </div>\n                </div>\n                <button mjButton variant=\"primary\" size=\"sm\" (click)=\"CreateEntityDocument()\" [disabled]=\"EntityDocSaving\">\n                    @if (EntityDocSaving) { <i class=\"fa-solid fa-spinner fa-spin\"></i> Creating\u2026 }\n                    @else { <i class=\"fa-solid fa-check\"></i> Create Entity Document }\n                </button>\n            }\n\n            <!-- Content Type -->\n            @if (CurrentStep === 'content-type') {\n                @if (HasAnyContentType) {\n                    <div class=\"at-form-group\">\n                        <label class=\"at-form-label\">Content type</label>\n                        <select class=\"mj-input\" [(ngModel)]=\"ContentTypeID\">\n                            <option value=\"\">Select content type\u2026</option>\n                            @for (opt of ContentTypeOptions; track opt.ID) {\n                                <option [value]=\"opt.ID\">{{ opt.Name }}</option>\n                            }\n                        </select>\n                    </div>\n                } @else {\n                    <div class=\"wiz-callout\">\n                        <i class=\"fa-solid fa-triangle-exclamation\"></i>\n                        No content types exist yet. Create one from the Content Types tab, then return to this wizard.\n                    </div>\n                }\n            }\n\n            <!-- Taxonomy Strategy -->\n            @if (CurrentStep === 'taxonomy') {\n                <p class=\"wiz-help\">\n                    Optionally generate a starter tag taxonomy by sampling this source's content.\n                    You can skip this and refine the taxonomy later.\n                </p>\n                <classify-seed-taxonomy\n                    [SourceID]=\"PendingSourceID\"\n                    [Provider]=\"Provider\"\n                    (Accepted)=\"OnTaxonomyAccepted($event)\">\n                </classify-seed-taxonomy>\n            }\n\n            <!-- Domain Context -->\n            @if (CurrentStep === 'domain-context') {\n                <div class=\"at-form-group\">\n                    <label class=\"at-form-label\">Source guidance</label>\n                    <textarea class=\"mj-textarea\" rows=\"4\" [(ngModel)]=\"ClassificationContext\"\n                              placeholder=\"Free-text guidance for the classifier about this source's domain\u2026\"></textarea>\n                </div>\n                <div class=\"wiz-toggle-row\">\n                    <div>\n                        <div class=\"wiz-toggle-t\">Substitutive mode</div>\n                        <div class=\"wiz-toggle-d\">When on, this source's guidance replaces org/content-type context; off = added.</div>\n                    </div>\n                    <mj-switch [(ngModel)]=\"IsSubstitutiveMode\"></mj-switch>\n                </div>\n            }\n\n            <!-- Review -->\n            @if (CurrentStep === 'review') {\n                <div class=\"wiz-review\">\n                    <div class=\"wiz-review-row\"><span>Name</span><strong>{{ SourceName || '\u2014' }}</strong></div>\n                    <div class=\"wiz-review-row\"><span>Source type</span><strong>{{ SourceTypeName }}</strong></div>\n                    @if (IsEntitySource) {\n                        <div class=\"wiz-review-row\"><span>Entity</span><strong>{{ SelectedEntityName || '\u2014' }}</strong></div>\n                        <div class=\"wiz-review-row\"><span>Entity document</span><strong>{{ EntityDocName }}</strong></div>\n                    } @else {\n                        <div class=\"wiz-review-row\"><span>Content type</span><strong>{{ ContentTypeName }}</strong></div>\n                        @if (SourceURL) {\n                            <div class=\"wiz-review-row\"><span>URL</span><strong>{{ SourceURL }}</strong></div>\n                        }\n                    }\n                    <div class=\"wiz-review-row\"><span>Domain context</span><strong>{{ ClassificationContext.trim() ? (ClassificationContextMode + ' \u00B7 set') : 'none' }}</strong></div>\n                </div>\n            }\n        </div>\n    </div>\n\n    <mj-dialog-actions>\n        <div class=\"wiz-actions\">\n            @if (IsLastStep) {\n                <button mjButton variant=\"primary\" size=\"sm\" (click)=\"Finish()\" [disabled]=\"Saving\">\n                    @if (Saving) { <i class=\"fa-solid fa-spinner fa-spin\"></i> Creating\u2026 }\n                    @else { <i class=\"fa-solid fa-check\"></i> Create source }\n                </button>\n            } @else {\n                <button mjButton variant=\"primary\" size=\"sm\" (click)=\"Next()\" [disabled]=\"!CanGoNext || Saving\">\n                    @if (Saving) { <i class=\"fa-solid fa-spinner fa-spin\"></i> Working\u2026 }\n                    @else { Next <i class=\"fa-solid fa-arrow-right\"></i> }\n                </button>\n            }\n            @if (StepIndex > 0) {\n                <button mjButton variant=\"secondary\" size=\"sm\" (click)=\"Back()\" [disabled]=\"Saving\">Back</button>\n            }\n            <span class=\"wiz-actions-spacer\"></span>\n            <button mjButton variant=\"flat\" size=\"sm\" (click)=\"Close()\">Cancel</button>\n        </div>\n    </mj-dialog-actions>\n</mj-dialog>\n", styles: [".wiz {\n    display: flex;\n    flex-direction: column;\n    gap: 20px;\n    width: 100%;\n    /* Guarantees a comfortable form column even if the dialog is constrained;\n       the dialog container itself is sized via [Width]. */\n    min-width: min(620px, 100%);\n}\n\n/* \u2500\u2500 Step indicator row \u2500\u2500 */\n.wiz-progress {\n    display: flex;\n    align-items: center;\n    gap: 0;\n    width: 100%;\n}\n/* Each step is a row: the numbered circle + (for non-last steps) a growing connector line.\n   The circle must NOT be the flex container that also hosts the connector \u2014 otherwise the\n   connector renders inside the circle and squishes/clips the number. */\n.wiz-step-dot {\n    display: flex;\n    align-items: center;\n    flex: 1 1 auto;               /* steps share the row; the connector consumes the slack */\n}\n.wiz-step-dot:last-child {\n    flex: 0 0 auto;               /* last step is just the circle (no trailing connector) */\n}\n/* The numbered circle \u2014 fixed size so it never shrinks or clips the number. */\n.wiz-step-num {\n    width: 30px;\n    height: 30px;\n    flex: 0 0 30px;\n    border-radius: 50%;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    background: var(--mj-bg-surface-sunken);\n    color: var(--mj-text-muted);\n    border: 1px solid var(--mj-border-default);\n    font-size: 0.8rem;\n    font-weight: 600;\n    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;\n}\n/* Connector line AFTER each non-last circle so the indicator reads as a single track. */\n.wiz-step-dot:not(:last-child)::after {\n    content: '';\n    flex: 1 1 auto;\n    height: 2px;\n    margin: 0 6px;\n    min-width: 16px;\n    background: var(--mj-border-default);\n}\n.wiz-step-dot.active .wiz-step-num {\n    background: var(--mj-brand-primary);\n    color: var(--mj-text-inverse);\n    border-color: var(--mj-brand-primary);\n}\n.wiz-step-dot.done .wiz-step-num {\n    background: color-mix(in srgb, var(--mj-brand-primary) 18%, var(--mj-bg-surface));\n    color: var(--mj-brand-primary);\n    border-color: var(--mj-brand-primary);\n}\n.wiz-step-dot.done:not(:last-child)::after,\n.wiz-step-dot.active:not(:last-child)::after {\n    background: color-mix(in srgb, var(--mj-brand-primary) 40%, var(--mj-border-default));\n}\n\n.wiz-step-title {\n    font-size: 0.95rem;\n    font-weight: 600;\n    color: var(--mj-text-primary);\n}\n.wiz-step-title .wiz-step-counter {\n    color: var(--mj-text-muted);\n    font-weight: 500;\n    margin-right: 8px;\n}\n\n/* \u2500\u2500 Body \u2500\u2500 */\n.wiz-body {\n    display: flex;\n    flex-direction: column;\n    gap: 16px;\n    min-height: 220px;\n    width: 100%;\n}\n.wiz-help {\n    margin: 0;\n    font-size: 0.85rem;\n    color: var(--mj-text-muted);\n    line-height: 1.5;\n}\n.wiz-callout {\n    display: flex;\n    align-items: flex-start;\n    gap: 10px;\n    padding: 12px 14px;\n    background: color-mix(in srgb, var(--mj-status-info) 8%, var(--mj-bg-surface));\n    border: 1px solid var(--mj-status-info-border, var(--mj-border-default));\n    border-radius: 8px;\n    font-size: 0.85rem;\n    color: var(--mj-text-secondary);\n    line-height: 1.45;\n}\n.wiz-callout i { color: var(--mj-status-info); margin-top: 2px; }\n.wiz-callout.ok { background: color-mix(in srgb, var(--mj-status-success) 8%, var(--mj-bg-surface)); }\n.wiz-callout.ok i { color: var(--mj-status-success); }\n.wiz-field-list {\n    max-height: 220px;\n    overflow-y: auto;\n    border: 1px solid var(--mj-border-subtle);\n    border-radius: 8px;\n    padding: 8px 10px;\n}\n.wiz-field-row {\n    display: flex;\n    align-items: center;\n    gap: 8px;\n    padding: 4px 0;\n    font-size: 0.85rem;\n    color: var(--mj-text-primary);\n    cursor: pointer;\n}\n.wiz-toggle-row {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    gap: 16px;\n    padding: 12px 14px;\n    border: 1px solid var(--mj-border-subtle);\n    border-radius: 8px;\n    background: var(--mj-bg-surface-card);\n}\n.wiz-toggle-t {\n    font-size: 0.88rem;\n    font-weight: 600;\n    color: var(--mj-text-primary);\n}\n.wiz-toggle-d {\n    font-size: 0.78rem;\n    color: var(--mj-text-muted);\n    margin-top: 3px;\n    line-height: 1.4;\n}\n.wiz-review {\n    display: flex;\n    flex-direction: column;\n    gap: 0;\n    border: 1px solid var(--mj-border-default);\n    border-radius: 8px;\n    overflow: hidden;\n}\n.wiz-review-row {\n    display: flex;\n    justify-content: space-between;\n    gap: 16px;\n    padding: 11px 16px;\n    font-size: 0.86rem;\n    border-bottom: 1px solid var(--mj-border-subtle);\n}\n.wiz-review-row:last-child { border-bottom: none; }\n.wiz-review-row span { color: var(--mj-text-muted); }\n.wiz-review-row strong { color: var(--mj-text-primary); }\n\n/* \u2500\u2500 Footer actions: primary LEFT, Back, Cancel pushed RIGHT (MJ convention) \u2500\u2500 */\n.wiz-actions {\n    display: flex;\n    gap: 8px;\n    align-items: center;\n    width: 100%;\n}\n.wiz-actions .wiz-actions-spacer {\n    flex: 1 1 auto;\n}\n\n/* \u2500\u2500 Form fields \u2500\u2500 */\n.at-form-group {\n    display: flex;\n    flex-direction: column;\n    gap: 6px;\n    width: 100%;\n}\n.at-form-label {\n    font-size: 0.82rem;\n    font-weight: 600;\n    color: var(--mj-text-secondary);\n}\n.at-form-group .mj-input,\n.at-form-group .mj-textarea {\n    width: 100%;\n}\n"] }]
    }], null, { Created: [{
            type: Output
        }], Cancelled: [{
            type: Output
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ClassifySetupWizardComponent, { className: "ClassifySetupWizardComponent", filePath: "src/AI/components/autotagging/dialogs/classify-setup-wizard.component.ts", lineNumber: 48 }); })();
//# sourceMappingURL=classify-setup-wizard.component.js.map