import "./chunk-N43HULMD.js";
import "./chunk-SKZXPA6D.js";
import "./chunk-GA4FZ3DX.js";
import "./chunk-5IIA45LM.js";
import "./chunk-MPJFGFS5.js";
import {
  EditorComponent,
  MonacoEditorModule
} from "./chunk-62OL73TD.js";
import {
  ToastrService
} from "./chunk-2YLAF7RI.js";
import {
  CommonSharedModule,
  DynamicFontSizeDirective,
  NgOptionComponent,
  NgScrollbar,
  NgSelectComponent,
  Store
} from "./chunk-7NQGM4EA.js";
import {
  DefaultValueAccessor,
  FormArrayName,
  FormBuilder,
  FormControlName,
  FormGroupDirective,
  FormGroupName,
  MinValidator,
  NgControlStatus,
  NgControlStatusGroup,
  NgModel,
  NgSelectOption,
  NumberValueAccessor,
  RadioControlValueAccessor,
  ReactiveFormsModule,
  SelectControlValueAccessor,
  TranslatePipe,
  TranslateService,
  Validators,
  ɵNgNoValidate,
  ɵNgSelectMultipleOption
} from "./chunk-NLYGDKUR.js";
import {
  animate,
  style,
  transition,
  trigger
} from "./chunk-ZEL7H2AL.js";
import {
  ActivatedRoute,
  GridApiService,
  LocalStorageService,
  Router,
  commonConfig
} from "./chunk-P7K2QEDI.js";
import {
  Location,
  NgClass,
  NgForOf,
  NgIf,
  NgSwitch,
  NgSwitchCase,
  NgSwitchDefault,
  Title,
  ɵsetClassDebugInfo,
  ɵɵStandaloneFeature,
  ɵɵadvance,
  ɵɵdefineComponent,
  ɵɵdirectiveInject,
  ɵɵelement,
  ɵɵelementContainerEnd,
  ɵɵelementContainerStart,
  ɵɵelementEnd,
  ɵɵelementStart,
  ɵɵgetCurrentView,
  ɵɵlistener,
  ɵɵloadQuery,
  ɵɵnextContext,
  ɵɵpipe,
  ɵɵpipeBind1,
  ɵɵproperty,
  ɵɵpropertyInterpolate,
  ɵɵpureFunction1,
  ɵɵpureFunction2,
  ɵɵqueryRefresh,
  ɵɵrepeater,
  ɵɵrepeaterCreate,
  ɵɵresetView,
  ɵɵrestoreView,
  ɵɵtemplate,
  ɵɵtext,
  ɵɵtextInterpolate,
  ɵɵtextInterpolate1,
  ɵɵtwoWayBindingSet,
  ɵɵtwoWayListener,
  ɵɵtwoWayProperty,
  ɵɵviewQuery
} from "./chunk-GKZIWABI.js";
import {
  __async,
  __spreadProps,
  __spreadValues
} from "./chunk-CVWHNZRK.js";

// src/app/@lcp-framework/pages/master-entity/master-entity.component.ts
var _c0 = ["monacoEditor"];
var _forTrack0 = ($index, $item) => $item.id;
var _c1 = (a0, a1) => [a0, a1];
var _c2 = (a0, a1) => ({ "md:grid-cols-4": a0, "md:grid-cols-3": a1 });
var _c3 = (a0) => ({ "is-invalid": a0 });
var _c4 = (a0) => [a0];
var _c5 = (a0) => ({ "md:grid-cols-2": a0 });
var _c6 = (a0) => ({ "!border-white-light !border-b-white text-primary dark:!border-[#191e3a] dark:!border-b-black": a0 });
function MasterEntityComponent_div_23_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 31);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext();
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getErrorMessage("name"), " ");
  }
}
function MasterEntityComponent_ng_container_32_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementContainerStart(0);
    \u0275\u0275elementStart(1, "option", 21);
    \u0275\u0275text(2);
    \u0275\u0275elementEnd();
    \u0275\u0275elementContainerEnd();
  }
  if (rf & 2) {
    const item_r2 = ctx.$implicit;
    \u0275\u0275advance();
    \u0275\u0275property("value", item_r2.value);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate(item_r2.label);
  }
}
function MasterEntityComponent_div_33_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 31);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext();
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getErrorMessage("entityType"), " ");
  }
}
function MasterEntityComponent_For_40_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "ng-option", 21);
    \u0275\u0275text(1);
    \u0275\u0275pipe(2, "translate");
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const item_r3 = ctx.$implicit;
    \u0275\u0275property("value", item_r3.value);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(2, 2, item_r3.label));
  }
}
function MasterEntityComponent_div_41_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 31);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext();
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getErrorMessage("permissions"), " ");
  }
}
function MasterEntityComponent_ng_container_42_For_12_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "ng-option", 21);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const group_r4 = ctx.$implicit;
    \u0275\u0275property("value", group_r4.id);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate(group_r4.name);
  }
}
function MasterEntityComponent_ng_container_42_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementContainerStart(0);
    \u0275\u0275elementStart(1, "div", 11)(2, "label", 32);
    \u0275\u0275text(3);
    \u0275\u0275pipe(4, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(5, "div", 33)(6, "ng-select", 34);
    \u0275\u0275pipe(7, "translate");
    \u0275\u0275elementStart(8, "ng-option", 17);
    \u0275\u0275text(9);
    \u0275\u0275pipe(10, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275repeaterCreate(11, MasterEntityComponent_ng_container_42_For_12_Template, 2, 2, "ng-option", 21, _forTrack0);
    \u0275\u0275elementEnd()()();
    \u0275\u0275elementContainerEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext();
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate1(" ", \u0275\u0275pipeBind1(4, 5, "form_label_export_templates"), "");
    \u0275\u0275advance(3);
    \u0275\u0275propertyInterpolate("placeholder", \u0275\u0275pipeBind1(7, 7, "select_export_templates"));
    \u0275\u0275property("clearable", false)("ngClass", \u0275\u0275pureFunction1(11, _c3, ctx_r0.isFieldInvalid("export_templates")));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate1(" ", \u0275\u0275pipeBind1(10, 9, "form_label_export_templates_dropdown"), " ");
    \u0275\u0275advance(2);
    \u0275\u0275repeater(ctx_r0.exportTemplates);
  }
}
function MasterEntityComponent_ng_container_43_ng_container_9_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementContainerStart(0);
    \u0275\u0275elementStart(1, "option", 21);
    \u0275\u0275text(2);
    \u0275\u0275elementEnd();
    \u0275\u0275elementContainerEnd();
  }
  if (rf & 2) {
    const item_r5 = ctx.$implicit;
    \u0275\u0275advance();
    \u0275\u0275property("value", item_r5);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate(item_r5);
  }
}
function MasterEntityComponent_ng_container_43_div_10_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 31);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getErrorMessage("primaryTable"), " ");
  }
}
function MasterEntityComponent_ng_container_43_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementContainerStart(0);
    \u0275\u0275elementStart(1, "div", 11)(2, "label", 35);
    \u0275\u0275text(3);
    \u0275\u0275pipe(4, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(5, "select", 36)(6, "option", 17);
    \u0275\u0275text(7);
    \u0275\u0275pipe(8, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275template(9, MasterEntityComponent_ng_container_43_ng_container_9_Template, 3, 2, "ng-container", 18);
    \u0275\u0275elementEnd();
    \u0275\u0275template(10, MasterEntityComponent_ng_container_43_div_10_Template, 2, 1, "div", 14);
    \u0275\u0275elementEnd();
    \u0275\u0275elementContainerEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext();
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(4, 5, "form_label_primary_table"));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngClass", \u0275\u0275pureFunction1(9, _c3, ctx_r0.isFieldInvalid("primaryTable")));
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(8, 7, "form_label_primary_table_dropdown"));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngForOf", ctx_r0.tables_list);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx_r0.isFieldInvalid("primaryTable"));
  }
}
function MasterEntityComponent_div_59_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 31);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext();
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getErrorMessage("statusId"), " ");
  }
}
function MasterEntityComponent_div_75_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 31);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext();
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getErrorMessage("isAdminModule"), " ");
  }
}
function MasterEntityComponent_ng_container_76_div_16_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 31);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getErrorMessage("draftMode"), " ");
  }
}
function MasterEntityComponent_ng_container_76_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementContainerStart(0);
    \u0275\u0275elementStart(1, "div", 11)(2, "label", 37);
    \u0275\u0275text(3);
    \u0275\u0275pipe(4, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(5, "div", 24)(6, "label", 25);
    \u0275\u0275element(7, "input", 38);
    \u0275\u0275elementStart(8, "span", 27);
    \u0275\u0275text(9);
    \u0275\u0275pipe(10, "translate");
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(11, "label", 25);
    \u0275\u0275element(12, "input", 38);
    \u0275\u0275elementStart(13, "span", 27);
    \u0275\u0275text(14);
    \u0275\u0275pipe(15, "translate");
    \u0275\u0275elementEnd()()();
    \u0275\u0275template(16, MasterEntityComponent_ng_container_76_div_16_Template, 2, 1, "div", 14);
    \u0275\u0275elementEnd();
    \u0275\u0275elementContainerEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext();
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(4, 6, "form_label_draft_mode"));
    \u0275\u0275advance(4);
    \u0275\u0275property("value", true);
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(10, 8, "yes"));
    \u0275\u0275advance(3);
    \u0275\u0275property("value", false);
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(15, 10, "no"));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngIf", ctx_r0.isFieldInvalid("draftMode"));
  }
}
function MasterEntityComponent_ng_container_77_ng_container_6_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementContainerStart(0);
    \u0275\u0275elementStart(1, "option", 21);
    \u0275\u0275text(2);
    \u0275\u0275pipe(3, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementContainerEnd();
  }
  if (rf & 2) {
    const item_r7 = ctx.$implicit;
    \u0275\u0275advance();
    \u0275\u0275property("value", item_r7.value);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(3, 2, item_r7.label));
  }
}
function MasterEntityComponent_ng_container_77_div_7_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 31);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getErrorMessage("reportType"), " ");
  }
}
function MasterEntityComponent_ng_container_77_div_8_ng_container_8_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementContainerStart(0);
    \u0275\u0275elementStart(1, "option", 21);
    \u0275\u0275text(2);
    \u0275\u0275pipe(3, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementContainerEnd();
  }
  if (rf & 2) {
    const item_r8 = ctx.$implicit;
    \u0275\u0275advance();
    \u0275\u0275property("value", item_r8.value);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(3, 2, item_r8.label));
  }
}
function MasterEntityComponent_ng_container_77_div_8_div_9_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 31);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(3);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getErrorMessage("wizardType"), " ");
  }
}
function MasterEntityComponent_ng_container_77_div_8_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 11)(1, "label", 53);
    \u0275\u0275text(2);
    \u0275\u0275pipe(3, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(4, "select", 54)(5, "option", 17);
    \u0275\u0275text(6);
    \u0275\u0275pipe(7, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275template(8, MasterEntityComponent_ng_container_77_div_8_ng_container_8_Template, 4, 4, "ng-container", 18);
    \u0275\u0275elementEnd();
    \u0275\u0275template(9, MasterEntityComponent_ng_container_77_div_8_div_9_Template, 2, 1, "div", 14);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(3, 5, "form_label_wizard_type"));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngClass", \u0275\u0275pureFunction1(9, _c3, ctx_r0.isFieldInvalid("wizardType")));
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(7, 7, "form_label_wizard_type_dropdown"));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngForOf", ctx_r0.wizard_type_list);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx_r0.isFieldInvalid("wizardType"));
  }
}
function MasterEntityComponent_ng_container_77_For_20_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "ng-option", 21);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const group_r9 = ctx.$implicit;
    \u0275\u0275property("value", group_r9.id);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate(group_r9.name);
  }
}
function MasterEntityComponent_ng_container_77_div_24_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 31);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getErrorMessage("wizardGroup"), " ");
  }
}
function MasterEntityComponent_ng_container_77_div_25_div_17_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 70);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(3);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getWizardGroupErrorMessage("name"), " ");
  }
}
function MasterEntityComponent_ng_container_77_div_25_Template(rf, ctx) {
  if (rf & 1) {
    const _r10 = \u0275\u0275getCurrentView();
    \u0275\u0275elementStart(0, "div", 55)(1, "form", 56);
    \u0275\u0275listener("ngSubmit", function MasterEntityComponent_ng_container_77_div_25_Template_form_ngSubmit_1_listener() {
      \u0275\u0275restoreView(_r10);
      const ctx_r0 = \u0275\u0275nextContext(2);
      return \u0275\u0275resetView(ctx_r0.addNewWizardGroup());
    });
    \u0275\u0275elementStart(2, "div", 57)(3, "span");
    \u0275\u0275text(4);
    \u0275\u0275pipe(5, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(6, "div", 58)(7, "button", 59);
    \u0275\u0275listener("click", function MasterEntityComponent_ng_container_77_div_25_Template_button_click_7_listener() {
      \u0275\u0275restoreView(_r10);
      const ctx_r0 = \u0275\u0275nextContext(2);
      return \u0275\u0275resetView(ctx_r0.cancelAddWizardGroup());
    });
    \u0275\u0275elementStart(8, "span", 60);
    \u0275\u0275text(9, "\xD7");
    \u0275\u0275elementEnd()()()();
    \u0275\u0275elementStart(10, "ng-scrollbar", 61)(11, "div", 62)(12, "div", 63)(13, "label", 64);
    \u0275\u0275text(14);
    \u0275\u0275pipe(15, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275element(16, "input", 65);
    \u0275\u0275template(17, MasterEntityComponent_ng_container_77_div_25_div_17_Template, 2, 1, "div", 66);
    \u0275\u0275elementEnd()()();
    \u0275\u0275elementStart(18, "div", 67)(19, "button", 68);
    \u0275\u0275listener("click", function MasterEntityComponent_ng_container_77_div_25_Template_button_click_19_listener() {
      \u0275\u0275restoreView(_r10);
      const ctx_r0 = \u0275\u0275nextContext(2);
      return \u0275\u0275resetView(ctx_r0.cancelAddWizardGroup());
    });
    \u0275\u0275text(20);
    \u0275\u0275pipe(21, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(22, "button", 69);
    \u0275\u0275text(23);
    \u0275\u0275pipe(24, "translate");
    \u0275\u0275elementEnd()()()();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance();
    \u0275\u0275property("formGroup", ctx_r0.wizardGroupForm);
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(5, 8, "add_new_wizard_group"));
    \u0275\u0275advance(10);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(15, 10, "wizard_group_name"));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngClass", \u0275\u0275pureFunction1(16, _c3, ctx_r0.isWizardGroupFieldInvalid("name")));
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx_r0.isWizardGroupFieldInvalid("name"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate1(" ", \u0275\u0275pipeBind1(21, 12, "cancel"), " ");
    \u0275\u0275advance(2);
    \u0275\u0275property("disabled", ctx_r0.wizardGroupForm.invalid);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", \u0275\u0275pipeBind1(24, 14, "submit"), " ");
  }
}
function MasterEntityComponent_ng_container_77_div_32_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 31);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getErrorMessage("dashboard_wizard_rows"), " ");
  }
}
function MasterEntityComponent_ng_container_77_div_39_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 31);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getErrorMessage("dashboard_wizard_columns"), " ");
  }
}
function MasterEntityComponent_ng_container_77_div_46_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 31);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getErrorMessage("dashboard_wizard_order_no"), " ");
  }
}
function MasterEntityComponent_ng_container_77_Template(rf, ctx) {
  if (rf & 1) {
    const _r6 = \u0275\u0275getCurrentView();
    \u0275\u0275elementContainerStart(0);
    \u0275\u0275elementStart(1, "div", 11)(2, "label", 39);
    \u0275\u0275text(3);
    \u0275\u0275pipe(4, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(5, "select", 40);
    \u0275\u0275template(6, MasterEntityComponent_ng_container_77_ng_container_6_Template, 4, 4, "ng-container", 18);
    \u0275\u0275elementEnd();
    \u0275\u0275template(7, MasterEntityComponent_ng_container_77_div_7_Template, 2, 1, "div", 14);
    \u0275\u0275elementEnd();
    \u0275\u0275template(8, MasterEntityComponent_ng_container_77_div_8_Template, 10, 11, "div", 41);
    \u0275\u0275elementStart(9, "div", 11)(10, "label", 42);
    \u0275\u0275text(11);
    \u0275\u0275pipe(12, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(13, "div", 33)(14, "ng-select", 43);
    \u0275\u0275pipe(15, "translate");
    \u0275\u0275elementStart(16, "ng-option", 17);
    \u0275\u0275text(17);
    \u0275\u0275pipe(18, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275repeaterCreate(19, MasterEntityComponent_ng_container_77_For_20_Template, 2, 2, "ng-option", 21, _forTrack0);
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(21, "button", 44);
    \u0275\u0275listener("click", function MasterEntityComponent_ng_container_77_Template_button_click_21_listener() {
      \u0275\u0275restoreView(_r6);
      const ctx_r0 = \u0275\u0275nextContext();
      return \u0275\u0275resetView(ctx_r0.showAddNewWizardGroup());
    });
    \u0275\u0275element(22, "i", 45);
    \u0275\u0275text(23, "\xA0 ");
    \u0275\u0275elementEnd();
    \u0275\u0275template(24, MasterEntityComponent_ng_container_77_div_24_Template, 2, 1, "div", 14)(25, MasterEntityComponent_ng_container_77_div_25_Template, 25, 18, "div", 46);
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(26, "div", 11)(27, "label", 47);
    \u0275\u0275text(28);
    \u0275\u0275pipe(29, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275element(30, "input", 48);
    \u0275\u0275pipe(31, "translate");
    \u0275\u0275template(32, MasterEntityComponent_ng_container_77_div_32_Template, 2, 1, "div", 14);
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(33, "div", 11)(34, "label", 49);
    \u0275\u0275text(35);
    \u0275\u0275pipe(36, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275element(37, "input", 50);
    \u0275\u0275pipe(38, "translate");
    \u0275\u0275template(39, MasterEntityComponent_ng_container_77_div_39_Template, 2, 1, "div", 14);
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(40, "div", 11)(41, "label", 51);
    \u0275\u0275text(42);
    \u0275\u0275pipe(43, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275element(44, "input", 52);
    \u0275\u0275pipe(45, "translate");
    \u0275\u0275template(46, MasterEntityComponent_ng_container_77_div_46_Template, 2, 1, "div", 14);
    \u0275\u0275elementEnd();
    \u0275\u0275elementContainerEnd();
  }
  if (rf & 2) {
    let tmp_5_0;
    const ctx_r0 = \u0275\u0275nextContext();
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(4, 24, "form_label_report_type"));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngClass", \u0275\u0275pureFunction1(44, _c3, ctx_r0.isFieldInvalid("reportType")));
    \u0275\u0275advance();
    \u0275\u0275property("ngForOf", ctx_r0.report_type_list);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx_r0.isFieldInvalid("reportType"));
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ((tmp_5_0 = ctx_r0.form.get("reportType")) == null ? null : tmp_5_0.value) === ctx_r0.commonConfig.REPORT_TYPES.LCP);
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate1(" ", \u0275\u0275pipeBind1(12, 26, "form_label_wizard_group"), "");
    \u0275\u0275advance(3);
    \u0275\u0275propertyInterpolate("placeholder", \u0275\u0275pipeBind1(15, 28, "select_wizard_group"));
    \u0275\u0275property("clearable", false)("ngClass", \u0275\u0275pureFunction1(46, _c3, ctx_r0.isFieldInvalid("wizardGroup")));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate1(" ", \u0275\u0275pipeBind1(18, 30, "form_label_wizard_group_dropdown"), " ");
    \u0275\u0275advance(2);
    \u0275\u0275repeater(ctx_r0.wizardGroups);
    \u0275\u0275advance(5);
    \u0275\u0275property("ngIf", ctx_r0.isFieldInvalid("wizardGroup"));
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx_r0.showWizardGroupMenu);
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(29, 32, "form_label_dashboard_wizard_rows"));
    \u0275\u0275advance(2);
    \u0275\u0275propertyInterpolate("placeholder", \u0275\u0275pipeBind1(31, 34, "form_label_dashboard_wizard_rows_placeholder"));
    \u0275\u0275property("ngClass", \u0275\u0275pureFunction1(48, _c3, ctx_r0.isFieldInvalid("dashboard_wizard_rows")));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngIf", ctx_r0.isFieldInvalid("dashboard_wizard_rows"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(36, 36, "form_label_dashboard_wizard_columns"));
    \u0275\u0275advance(2);
    \u0275\u0275propertyInterpolate("placeholder", \u0275\u0275pipeBind1(38, 38, "form_label_dashboard_wizard_columns_placeholder"));
    \u0275\u0275property("ngClass", \u0275\u0275pureFunction1(50, _c3, ctx_r0.isFieldInvalid("dashboard_wizard_columns")));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngIf", ctx_r0.isFieldInvalid("dashboard_wizard_columns"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(43, 40, "form_label_dashboard_wizard_order_no"));
    \u0275\u0275advance(2);
    \u0275\u0275propertyInterpolate("placeholder", \u0275\u0275pipeBind1(45, 42, "form_label_dashboard_wizard_order_no_placeholder"));
    \u0275\u0275property("ngClass", \u0275\u0275pureFunction1(52, _c3, ctx_r0.isFieldInvalid("dashboard_wizard_order_no")));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngIf", ctx_r0.isFieldInvalid("dashboard_wizard_order_no"));
  }
}
function MasterEntityComponent_ng_container_78_div_10_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 31);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getErrorMessage("queryInformation"), " ");
  }
}
function MasterEntityComponent_ng_container_78_div_11_div_6_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 31);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(3);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getErrorMessage("dashboard_wizard_options"), " ");
  }
}
function MasterEntityComponent_ng_container_78_div_11_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 72)(1, "label", 79);
    \u0275\u0275text(2);
    \u0275\u0275pipe(3, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(4, "div", 76);
    \u0275\u0275element(5, "ngx-monaco-editor", 80);
    \u0275\u0275elementEnd();
    \u0275\u0275template(6, MasterEntityComponent_ng_container_78_div_11_div_6_Template, 2, 1, "div", 14);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(3, 3, "form_label_dashboard_wizard_content_json"));
    \u0275\u0275advance(3);
    \u0275\u0275property("options", ctx_r0.editorOptions);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx_r0.isFieldInvalid("dashboard_wizard_options"));
  }
}
function MasterEntityComponent_ng_container_78_div_12_div_7_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 31);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(3);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getErrorMessage("staticPageContent"), " ");
  }
}
function MasterEntityComponent_ng_container_78_div_12_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 72)(1, "label", 81);
    \u0275\u0275text(2);
    \u0275\u0275pipe(3, "translate");
    \u0275\u0275pipe(4, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(5, "div", 76);
    \u0275\u0275element(6, "ngx-monaco-editor", 82);
    \u0275\u0275elementEnd();
    \u0275\u0275template(7, MasterEntityComponent_ng_container_78_div_12_div_7_Template, 2, 1, "div", 14);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    let tmp_2_0;
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate1(" ", ((tmp_2_0 = ctx_r0.form.get("entityType")) == null ? null : tmp_2_0.value) === ctx_r0.commonConfig.ENTITY_TYPES.DASHBOARD_WIZARD_BUILDER_MODULE ? \u0275\u0275pipeBind1(3, 3, "form_label_dashboard_wizard_content_html") : \u0275\u0275pipeBind1(4, 5, "form_label_static_page_Content"), " ");
    \u0275\u0275advance(4);
    \u0275\u0275property("options", ctx_r0.htmlEditorOptions);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx_r0.isFieldInvalid("staticPageContent"));
  }
}
function MasterEntityComponent_ng_container_78_Template(rf, ctx) {
  if (rf & 1) {
    const _r11 = \u0275\u0275getCurrentView();
    \u0275\u0275elementContainerStart(0);
    \u0275\u0275elementStart(1, "div", 71)(2, "div", 72)(3, "div", 73)(4, "label", 74);
    \u0275\u0275text(5);
    \u0275\u0275pipe(6, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(7, "i", 75);
    \u0275\u0275listener("click", function MasterEntityComponent_ng_container_78_Template_i_click_7_listener() {
      \u0275\u0275restoreView(_r11);
      const ctx_r0 = \u0275\u0275nextContext();
      return \u0275\u0275resetView(ctx_r0.openInfoPopUp("queryInfo"));
    });
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(8, "div", 76);
    \u0275\u0275element(9, "ngx-monaco-editor", 77);
    \u0275\u0275elementEnd();
    \u0275\u0275template(10, MasterEntityComponent_ng_container_78_div_10_Template, 2, 1, "div", 14);
    \u0275\u0275elementEnd();
    \u0275\u0275template(11, MasterEntityComponent_ng_container_78_div_11_Template, 7, 5, "div", 78)(12, MasterEntityComponent_ng_container_78_div_12_Template, 8, 7, "div", 78);
    \u0275\u0275elementEnd();
    \u0275\u0275elementContainerEnd();
  }
  if (rf & 2) {
    let tmp_4_0;
    let tmp_5_0;
    const ctx_r0 = \u0275\u0275nextContext();
    \u0275\u0275advance(5);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(6, 5, "form_label_query_information"));
    \u0275\u0275advance(4);
    \u0275\u0275property("options", ctx_r0.editorOptions);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx_r0.isFieldInvalid("queryInformation"));
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", \u0275\u0275pureFunction1(7, _c4, ctx_r0.commonConfig.WIZARD_TYPES.CHART).includes((tmp_4_0 = ctx_r0.form.get("wizardType")) == null ? null : tmp_4_0.value));
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", \u0275\u0275pureFunction1(9, _c4, ctx_r0.commonConfig.ENTITY_TYPES.STATIC_PAGE_BUILDER_MODULE).includes((tmp_5_0 = ctx_r0.form.get("entityType")) == null ? null : tmp_5_0.value) || \u0275\u0275pureFunction1(11, _c4, ctx_r0.commonConfig.WIZARD_TYPES.STATIC).includes((tmp_5_0 = ctx_r0.form.get("wizardType")) == null ? null : tmp_5_0.value));
  }
}
function MasterEntityComponent_ng_container_79_div_10_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 31);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getErrorMessage("reportInformation"), " ");
  }
}
function MasterEntityComponent_ng_container_79_Template(rf, ctx) {
  if (rf & 1) {
    const _r12 = \u0275\u0275getCurrentView();
    \u0275\u0275elementContainerStart(0);
    \u0275\u0275elementStart(1, "div", 83)(2, "div", 72)(3, "div", 73)(4, "label", 84);
    \u0275\u0275text(5);
    \u0275\u0275pipe(6, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(7, "i", 75);
    \u0275\u0275listener("click", function MasterEntityComponent_ng_container_79_Template_i_click_7_listener() {
      \u0275\u0275restoreView(_r12);
      const ctx_r0 = \u0275\u0275nextContext();
      return \u0275\u0275resetView(ctx_r0.openInfoPopUp("reportInfo"));
    });
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(8, "div", 76);
    \u0275\u0275element(9, "ngx-monaco-editor", 85);
    \u0275\u0275elementEnd();
    \u0275\u0275template(10, MasterEntityComponent_ng_container_79_div_10_Template, 2, 1, "div", 14);
    \u0275\u0275elementEnd()();
    \u0275\u0275elementContainerEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext();
    \u0275\u0275advance(5);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(6, 3, "form_label_report_information"));
    \u0275\u0275advance(4);
    \u0275\u0275property("options", ctx_r0.editorOptions);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx_r0.isFieldInvalid("reportInformation"));
  }
}
function MasterEntityComponent_ng_container_80_div_10_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 31);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getErrorMessage("queryInformation"), " ");
  }
}
function MasterEntityComponent_ng_container_80_ng_container_11_div_9_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 31);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(3);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getErrorMessage("associateTable"), " ");
  }
}
function MasterEntityComponent_ng_container_80_ng_container_11_Template(rf, ctx) {
  if (rf & 1) {
    const _r14 = \u0275\u0275getCurrentView();
    \u0275\u0275elementContainerStart(0);
    \u0275\u0275elementStart(1, "div", 72)(2, "div", 73)(3, "label", 86);
    \u0275\u0275text(4);
    \u0275\u0275pipe(5, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(6, "i", 75);
    \u0275\u0275listener("click", function MasterEntityComponent_ng_container_80_ng_container_11_Template_i_click_6_listener() {
      \u0275\u0275restoreView(_r14);
      const ctx_r0 = \u0275\u0275nextContext(2);
      return \u0275\u0275resetView(ctx_r0.openInfoPopUp("associatedTableInfo"));
    });
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(7, "div", 76);
    \u0275\u0275element(8, "ngx-monaco-editor", 87);
    \u0275\u0275elementEnd();
    \u0275\u0275template(9, MasterEntityComponent_ng_container_80_ng_container_11_div_9_Template, 2, 1, "div", 14);
    \u0275\u0275elementEnd();
    \u0275\u0275elementContainerEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance(4);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(5, 3, "form_label_associated_tables"));
    \u0275\u0275advance(4);
    \u0275\u0275property("options", ctx_r0.editorOptions);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx_r0.isFieldInvalid("associateTable"));
  }
}
function MasterEntityComponent_ng_container_80_Template(rf, ctx) {
  if (rf & 1) {
    const _r13 = \u0275\u0275getCurrentView();
    \u0275\u0275elementContainerStart(0);
    \u0275\u0275elementStart(1, "div", 10)(2, "div", 72)(3, "div", 73)(4, "label", 74);
    \u0275\u0275text(5);
    \u0275\u0275pipe(6, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(7, "i", 75);
    \u0275\u0275listener("click", function MasterEntityComponent_ng_container_80_Template_i_click_7_listener() {
      \u0275\u0275restoreView(_r13);
      const ctx_r0 = \u0275\u0275nextContext();
      return \u0275\u0275resetView(ctx_r0.openInfoPopUp("jobBuilderQueryInfo"));
    });
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(8, "div", 76);
    \u0275\u0275element(9, "ngx-monaco-editor", 77);
    \u0275\u0275elementEnd();
    \u0275\u0275template(10, MasterEntityComponent_ng_container_80_div_10_Template, 2, 1, "div", 14);
    \u0275\u0275elementEnd();
    \u0275\u0275template(11, MasterEntityComponent_ng_container_80_ng_container_11_Template, 10, 5, "ng-container", 22);
    \u0275\u0275elementEnd();
    \u0275\u0275elementContainerEnd();
  }
  if (rf & 2) {
    let tmp_1_0;
    let tmp_5_0;
    const ctx_r0 = \u0275\u0275nextContext();
    \u0275\u0275advance();
    \u0275\u0275property("ngClass", \u0275\u0275pureFunction1(9, _c5, !\u0275\u0275pureFunction1(7, _c4, ctx_r0.commonConfig.ENTITY_TYPES.JOB_BUILDER_MODULE).includes((tmp_1_0 = ctx_r0.form.get("entityType")) == null ? null : tmp_1_0.value)));
    \u0275\u0275advance(4);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(6, 5, "form_label_query_information"));
    \u0275\u0275advance(4);
    \u0275\u0275property("options", ctx_r0.editorOptions);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx_r0.isFieldInvalid("queryInformation"));
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", \u0275\u0275pureFunction1(11, _c4, ctx_r0.commonConfig.ENTITY_TYPES.GRID_BUILDER_MODULE).includes((tmp_5_0 = ctx_r0.form.get("entityType")) == null ? null : tmp_5_0.value));
  }
}
function MasterEntityComponent_ng_container_81_div_9_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 31);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getErrorMessage("formInformation"), " ");
  }
}
function MasterEntityComponent_ng_container_81_div_19_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 31);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getErrorMessage("queryInformation"), " ");
  }
}
function MasterEntityComponent_ng_container_81_div_27_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 31);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getErrorMessage("addQueryInformation"), " ");
  }
}
function MasterEntityComponent_ng_container_81_div_35_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 31);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getErrorMessage("editQueryInformation"), " ");
  }
}
function MasterEntityComponent_ng_container_81_div_43_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 31);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getErrorMessage("presetQueryInformation"), " ");
  }
}
function MasterEntityComponent_ng_container_81_Template(rf, ctx) {
  if (rf & 1) {
    const _r15 = \u0275\u0275getCurrentView();
    \u0275\u0275elementContainerStart(0);
    \u0275\u0275elementStart(1, "div", 71)(2, "div", 88)(3, "div", 73)(4, "label", 89);
    \u0275\u0275text(5, "Form Information");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(6, "i", 75);
    \u0275\u0275listener("click", function MasterEntityComponent_ng_container_81_Template_i_click_6_listener() {
      \u0275\u0275restoreView(_r15);
      const ctx_r0 = \u0275\u0275nextContext();
      return \u0275\u0275resetView(ctx_r0.openInfoPopUp("formInfo"));
    });
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(7, "div", 76);
    \u0275\u0275element(8, "ngx-monaco-editor", 90);
    \u0275\u0275elementEnd();
    \u0275\u0275template(9, MasterEntityComponent_ng_container_81_div_9_Template, 2, 1, "div", 14);
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(10, "div", 88)(11, "div", 73)(12, "label", 74);
    \u0275\u0275text(13);
    \u0275\u0275pipe(14, "translate");
    \u0275\u0275elementStart(15, "i", 91);
    \u0275\u0275listener("click", function MasterEntityComponent_ng_container_81_Template_i_click_15_listener() {
      \u0275\u0275restoreView(_r15);
      const ctx_r0 = \u0275\u0275nextContext();
      return \u0275\u0275resetView(ctx_r0.toggleTheme());
    });
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(16, "i", 75);
    \u0275\u0275listener("click", function MasterEntityComponent_ng_container_81_Template_i_click_16_listener() {
      \u0275\u0275restoreView(_r15);
      const ctx_r0 = \u0275\u0275nextContext();
      return \u0275\u0275resetView(ctx_r0.openInfoPopUp("formQueryInfo"));
    });
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(17, "div", 76);
    \u0275\u0275element(18, "ngx-monaco-editor", 92);
    \u0275\u0275elementEnd();
    \u0275\u0275template(19, MasterEntityComponent_ng_container_81_div_19_Template, 2, 1, "div", 14);
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(20, "div", 88)(21, "div", 73)(22, "label", 93);
    \u0275\u0275text(23, "Add JSON Structure");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(24, "i", 75);
    \u0275\u0275listener("click", function MasterEntityComponent_ng_container_81_Template_i_click_24_listener() {
      \u0275\u0275restoreView(_r15);
      const ctx_r0 = \u0275\u0275nextContext();
      return \u0275\u0275resetView(ctx_r0.openInfoPopUp("addQueryInfo"));
    });
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(25, "div", 76);
    \u0275\u0275element(26, "ngx-monaco-editor", 94);
    \u0275\u0275elementEnd();
    \u0275\u0275template(27, MasterEntityComponent_ng_container_81_div_27_Template, 2, 1, "div", 14);
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(28, "div", 88)(29, "div", 73)(30, "label", 95);
    \u0275\u0275text(31, "Edit JSON Structure");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(32, "i", 75);
    \u0275\u0275listener("click", function MasterEntityComponent_ng_container_81_Template_i_click_32_listener() {
      \u0275\u0275restoreView(_r15);
      const ctx_r0 = \u0275\u0275nextContext();
      return \u0275\u0275resetView(ctx_r0.openInfoPopUp("editQueryInfo"));
    });
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(33, "div", 76);
    \u0275\u0275element(34, "ngx-monaco-editor", 96);
    \u0275\u0275elementEnd();
    \u0275\u0275template(35, MasterEntityComponent_ng_container_81_div_35_Template, 2, 1, "div", 14);
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(36, "div", 88)(37, "div", 73)(38, "label", 97);
    \u0275\u0275text(39, "Preset JSON Structure");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(40, "i", 75);
    \u0275\u0275listener("click", function MasterEntityComponent_ng_container_81_Template_i_click_40_listener() {
      \u0275\u0275restoreView(_r15);
      const ctx_r0 = \u0275\u0275nextContext();
      return \u0275\u0275resetView(ctx_r0.openInfoPopUp("presetQueryInfo"));
    });
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(41, "div", 76);
    \u0275\u0275element(42, "ngx-monaco-editor", 98);
    \u0275\u0275elementEnd();
    \u0275\u0275template(43, MasterEntityComponent_ng_container_81_div_43_Template, 2, 1, "div", 14);
    \u0275\u0275elementEnd()();
    \u0275\u0275elementContainerEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext();
    \u0275\u0275advance(8);
    \u0275\u0275property("options", ctx_r0.editorOptions);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx_r0.isFieldInvalid("formInformation"));
    \u0275\u0275advance(4);
    \u0275\u0275textInterpolate1(" ", \u0275\u0275pipeBind1(14, 12, "form_label_query_information"), " ");
    \u0275\u0275advance(2);
    \u0275\u0275property("ngClass", ctx_r0.isDarkTheme ? "fa-solid fa-sun" : "fa-solid fa-moon");
    \u0275\u0275advance(3);
    \u0275\u0275property("options", ctx_r0.editorOptions);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx_r0.isFieldInvalid("queryInformation"));
    \u0275\u0275advance(7);
    \u0275\u0275property("options", ctx_r0.editorOptions);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx_r0.isFieldInvalid("addQueryInformation"));
    \u0275\u0275advance(7);
    \u0275\u0275property("options", ctx_r0.editorOptions);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx_r0.isFieldInvalid("editQueryInformation"));
    \u0275\u0275advance(7);
    \u0275\u0275property("options", ctx_r0.editorOptions);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx_r0.isFieldInvalid("presetQueryInformation"));
  }
}
function MasterEntityComponent_ng_container_82_ng_container_49_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementContainerStart(0);
    \u0275\u0275elementStart(1, "tr")(2, "td", 112);
    \u0275\u0275text(3);
    \u0275\u0275pipe(4, "translate");
    \u0275\u0275elementEnd()();
    \u0275\u0275elementContainerEnd();
  }
  if (rf & 2) {
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(4, 1, "no_records_found"));
  }
}
function MasterEntityComponent_ng_container_82_ng_container_50_div_6_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 142);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const i_r18 = \u0275\u0275nextContext().index;
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getItemErrorMessage(i_r18, "fieldName"), " ");
  }
}
function MasterEntityComponent_ng_container_82_ng_container_50_div_11_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 142);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const i_r18 = \u0275\u0275nextContext().index;
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getItemErrorMessage(i_r18, "displayName"), " ");
  }
}
function MasterEntityComponent_ng_container_82_ng_container_50_div_16_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 142);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const i_r18 = \u0275\u0275nextContext().index;
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getItemErrorMessage(i_r18, "orderNo"), " ");
  }
}
function MasterEntityComponent_ng_container_82_ng_container_50_div_29_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 142);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const i_r18 = \u0275\u0275nextContext().index;
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getItemErrorMessage(i_r18, "isGridColumn"), " ");
  }
}
function MasterEntityComponent_ng_container_82_ng_container_50_div_42_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 142);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const i_r18 = \u0275\u0275nextContext().index;
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getItemErrorMessage(i_r18, "isSearchable"), " ");
  }
}
function MasterEntityComponent_ng_container_82_ng_container_50_div_55_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 142);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const i_r18 = \u0275\u0275nextContext().index;
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getItemErrorMessage(i_r18, "clauseType"), " ");
  }
}
function MasterEntityComponent_ng_container_82_ng_container_50_div_68_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 142);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const i_r18 = \u0275\u0275nextContext().index;
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getItemErrorMessage(i_r18, "isSortable"), " ");
  }
}
function MasterEntityComponent_ng_container_82_ng_container_50_ng_container_75_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementContainerStart(0);
    \u0275\u0275elementStart(1, "option", 21);
    \u0275\u0275text(2);
    \u0275\u0275pipe(3, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementContainerEnd();
  }
  if (rf & 2) {
    const fieldType_r19 = ctx.$implicit;
    \u0275\u0275advance();
    \u0275\u0275property("value", fieldType_r19.value);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(3, 2, fieldType_r19.label));
  }
}
function MasterEntityComponent_ng_container_82_ng_container_50_div_76_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 142);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const i_r18 = \u0275\u0275nextContext().index;
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getItemErrorMessage(i_r18, "fieldType"), " ");
  }
}
function MasterEntityComponent_ng_container_82_ng_container_50_div_92_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 142);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const i_r18 = \u0275\u0275nextContext().index;
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getItemErrorMessage(i_r18, "linkType"), " ");
  }
}
function MasterEntityComponent_ng_container_82_ng_container_50_select_96_ng_container_4_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementContainerStart(0);
    \u0275\u0275elementStart(1, "option", 21);
    \u0275\u0275text(2);
    \u0275\u0275elementEnd();
    \u0275\u0275elementContainerEnd();
  }
  if (rf & 2) {
    const entity_r20 = ctx.$implicit;
    \u0275\u0275advance();
    \u0275\u0275property("value", entity_r20.value);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate(entity_r20.label);
  }
}
function MasterEntityComponent_ng_container_82_ng_container_50_select_96_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "select", 143)(1, "option", 17);
    \u0275\u0275text(2);
    \u0275\u0275pipe(3, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275template(4, MasterEntityComponent_ng_container_82_ng_container_50_select_96_ng_container_4_Template, 3, 2, "ng-container", 18);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const i_r18 = \u0275\u0275nextContext().index;
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275property("id", "linkAction" + i_r18)("ngClass", \u0275\u0275pureFunction1(6, _c3, ctx_r0.isItemFieldInvalid(i_r18, "linkAction")));
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(3, 4, "select_any"));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngForOf", ctx_r0.masterEntities);
  }
}
function MasterEntityComponent_ng_container_82_ng_container_50_select_97_ng_container_4_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementContainerStart(0);
    \u0275\u0275elementStart(1, "option", 21);
    \u0275\u0275text(2);
    \u0275\u0275elementEnd();
    \u0275\u0275elementContainerEnd();
  }
  if (rf & 2) {
    const entity_r21 = ctx.$implicit;
    \u0275\u0275advance();
    \u0275\u0275property("value", entity_r21.value);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate(entity_r21.label);
  }
}
function MasterEntityComponent_ng_container_82_ng_container_50_select_97_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "select", 143)(1, "option", 17);
    \u0275\u0275text(2);
    \u0275\u0275pipe(3, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275template(4, MasterEntityComponent_ng_container_82_ng_container_50_select_97_ng_container_4_Template, 3, 2, "ng-container", 18);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const i_r18 = \u0275\u0275nextContext().index;
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275property("id", "linkAction" + i_r18)("ngClass", \u0275\u0275pureFunction1(6, _c3, ctx_r0.isItemFieldInvalid(i_r18, "linkAction")));
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(3, 4, "select_any"));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngForOf", ctx_r0.masterEntitiesForChildProcess);
  }
}
function MasterEntityComponent_ng_container_82_ng_container_50_input_98_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275element(0, "input", 144);
    \u0275\u0275pipe(1, "translate");
  }
  if (rf & 2) {
    const i_r18 = \u0275\u0275nextContext().index;
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275propertyInterpolate("placeholder", \u0275\u0275pipeBind1(1, 3, "enter_url"));
    \u0275\u0275property("id", "linkAction" + i_r18)("ngClass", \u0275\u0275pureFunction1(5, _c3, ctx_r0.isItemFieldInvalid(i_r18, "linkAction")));
  }
}
function MasterEntityComponent_ng_container_82_ng_container_50_span_99_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "span");
    \u0275\u0275text(1, "-");
    \u0275\u0275elementEnd();
  }
}
function MasterEntityComponent_ng_container_82_ng_container_50_div_100_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 142);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const i_r18 = \u0275\u0275nextContext().index;
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.getItemErrorMessage(i_r18, "linkAction"), " ");
  }
}
function MasterEntityComponent_ng_container_82_ng_container_50_Template(rf, ctx) {
  if (rf & 1) {
    const _r17 = \u0275\u0275getCurrentView();
    \u0275\u0275elementContainerStart(0, 113);
    \u0275\u0275elementStart(1, "tr", 114)(2, "td", 108)(3, "div", 115);
    \u0275\u0275element(4, "input", 116);
    \u0275\u0275pipe(5, "translate");
    \u0275\u0275template(6, MasterEntityComponent_ng_container_82_ng_container_50_div_6_Template, 2, 1, "div", 117);
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(7, "td", 118)(8, "div", 115)(9, "input", 119);
    \u0275\u0275pipe(10, "translate");
    \u0275\u0275listener("keydown", function MasterEntityComponent_ng_container_82_ng_container_50_Template_input_keydown_9_listener($event) {
      \u0275\u0275restoreView(_r17);
      const ctx_r0 = \u0275\u0275nextContext(2);
      return \u0275\u0275resetView(ctx_r0.localStorageService.handleKeyPress($event, { type: ctx_r0.commonConfig.keypress_config.allow_only_lowercase_alphanumeric }));
    });
    \u0275\u0275elementEnd();
    \u0275\u0275template(11, MasterEntityComponent_ng_container_82_ng_container_50_div_11_Template, 2, 1, "div", 117);
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(12, "td", 107)(13, "div", 115);
    \u0275\u0275element(14, "input", 120);
    \u0275\u0275pipe(15, "translate");
    \u0275\u0275template(16, MasterEntityComponent_ng_container_82_ng_container_50_div_16_Template, 2, 1, "div", 117);
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(17, "td", 107)(18, "div", 115)(19, "select", 121)(20, "option", 122);
    \u0275\u0275text(21);
    \u0275\u0275pipe(22, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(23, "option", 123);
    \u0275\u0275text(24);
    \u0275\u0275pipe(25, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(26, "option", 124);
    \u0275\u0275text(27);
    \u0275\u0275pipe(28, "translate");
    \u0275\u0275elementEnd()();
    \u0275\u0275template(29, MasterEntityComponent_ng_container_82_ng_container_50_div_29_Template, 2, 1, "div", 117);
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(30, "td", 106)(31, "div", 115)(32, "select", 125)(33, "option", 122);
    \u0275\u0275text(34);
    \u0275\u0275pipe(35, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(36, "option", 123);
    \u0275\u0275text(37);
    \u0275\u0275pipe(38, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(39, "option", 124);
    \u0275\u0275text(40);
    \u0275\u0275pipe(41, "translate");
    \u0275\u0275elementEnd()();
    \u0275\u0275template(42, MasterEntityComponent_ng_container_82_ng_container_50_div_42_Template, 2, 1, "div", 117);
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(43, "td", 107)(44, "div", 115)(45, "select", 126)(46, "option", 122);
    \u0275\u0275text(47);
    \u0275\u0275pipe(48, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(49, "option", 127);
    \u0275\u0275text(50);
    \u0275\u0275pipe(51, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(52, "option", 128);
    \u0275\u0275text(53);
    \u0275\u0275pipe(54, "translate");
    \u0275\u0275elementEnd()();
    \u0275\u0275template(55, MasterEntityComponent_ng_container_82_ng_container_50_div_55_Template, 2, 1, "div", 117);
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(56, "td", 106)(57, "div", 115)(58, "select", 129)(59, "option", 122);
    \u0275\u0275text(60);
    \u0275\u0275pipe(61, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(62, "option", 123);
    \u0275\u0275text(63);
    \u0275\u0275pipe(64, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(65, "option", 124);
    \u0275\u0275text(66);
    \u0275\u0275pipe(67, "translate");
    \u0275\u0275elementEnd()();
    \u0275\u0275template(68, MasterEntityComponent_ng_container_82_ng_container_50_div_68_Template, 2, 1, "div", 117);
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(69, "td", 107)(70, "div", 115)(71, "select", 130)(72, "option", 122);
    \u0275\u0275text(73);
    \u0275\u0275pipe(74, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275template(75, MasterEntityComponent_ng_container_82_ng_container_50_ng_container_75_Template, 4, 4, "ng-container", 18);
    \u0275\u0275elementEnd();
    \u0275\u0275template(76, MasterEntityComponent_ng_container_82_ng_container_50_div_76_Template, 2, 1, "div", 117);
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(77, "td", 106)(78, "div", 115)(79, "select", 131)(80, "option", 132);
    \u0275\u0275text(81);
    \u0275\u0275pipe(82, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(83, "option", 133);
    \u0275\u0275text(84);
    \u0275\u0275pipe(85, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(86, "option", 134);
    \u0275\u0275text(87);
    \u0275\u0275pipe(88, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(89, "option", 135);
    \u0275\u0275text(90);
    \u0275\u0275pipe(91, "translate");
    \u0275\u0275elementEnd()();
    \u0275\u0275template(92, MasterEntityComponent_ng_container_82_ng_container_50_div_92_Template, 2, 1, "div", 117);
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(93, "td", 108)(94, "div", 115);
    \u0275\u0275elementContainerStart(95, 136);
    \u0275\u0275template(96, MasterEntityComponent_ng_container_82_ng_container_50_select_96_Template, 5, 8, "select", 137)(97, MasterEntityComponent_ng_container_82_ng_container_50_select_97_Template, 5, 8, "select", 137)(98, MasterEntityComponent_ng_container_82_ng_container_50_input_98_Template, 2, 7, "input", 138)(99, MasterEntityComponent_ng_container_82_ng_container_50_span_99_Template, 2, 0, "span", 139);
    \u0275\u0275elementContainerEnd();
    \u0275\u0275template(100, MasterEntityComponent_ng_container_82_ng_container_50_div_100_Template, 2, 1, "div", 117);
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(101, "td", 107)(102, "button", 140);
    \u0275\u0275listener("click", function MasterEntityComponent_ng_container_82_ng_container_50_Template_button_click_102_listener() {
      const i_r18 = \u0275\u0275restoreView(_r17).index;
      const ctx_r0 = \u0275\u0275nextContext(2);
      return \u0275\u0275resetView(ctx_r0.removeItem(i_r18));
    });
    \u0275\u0275element(103, "i", 141);
    \u0275\u0275text(104, "\xA0");
    \u0275\u0275elementEnd()()();
    \u0275\u0275elementContainerEnd();
  }
  if (rf & 2) {
    let tmp_53_0;
    const item_r22 = ctx.$implicit;
    const i_r18 = ctx.index;
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275property("formGroupName", i_r18);
    \u0275\u0275advance(4);
    \u0275\u0275propertyInterpolate("placeholder", \u0275\u0275pipeBind1(5, 54, "table_field_name_placeholder"));
    \u0275\u0275property("id", "fieldName" + i_r18)("ngClass", \u0275\u0275pureFunction1(94, _c3, ctx_r0.isItemFieldInvalid(i_r18, "fieldName")));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngIf", ctx_r0.isItemFieldInvalid(i_r18, "fieldName"));
    \u0275\u0275advance(3);
    \u0275\u0275propertyInterpolate("placeholder", \u0275\u0275pipeBind1(10, 56, "table_display_name_placeholder"));
    \u0275\u0275property("id", "displayName" + i_r18)("ngClass", \u0275\u0275pureFunction1(96, _c3, ctx_r0.isItemFieldInvalid(i_r18, "displayName")));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngIf", ctx_r0.isItemFieldInvalid(i_r18, "displayName"));
    \u0275\u0275advance(3);
    \u0275\u0275propertyInterpolate("placeholder", \u0275\u0275pipeBind1(15, 58, "table_order_no_placeholder"));
    \u0275\u0275property("id", "orderNo" + i_r18)("ngClass", \u0275\u0275pureFunction1(98, _c3, ctx_r0.isItemFieldInvalid(i_r18, "orderNo")));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngIf", ctx_r0.isItemFieldInvalid(i_r18, "orderNo"));
    \u0275\u0275advance(3);
    \u0275\u0275property("id", "isGridColumn" + i_r18)("ngClass", \u0275\u0275pureFunction1(100, _c3, ctx_r0.isItemFieldInvalid(i_r18, "isGridColumn")));
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(22, 60, "select_any"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(25, 62, "yes"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(28, 64, "no"));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngIf", ctx_r0.isItemFieldInvalid(i_r18, "isGridColumn"));
    \u0275\u0275advance(3);
    \u0275\u0275property("id", "isSearchable" + i_r18)("ngClass", \u0275\u0275pureFunction1(102, _c3, ctx_r0.isItemFieldInvalid(i_r18, "isSearchable")));
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(35, 66, "select_any"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(38, 68, "yes"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(41, 70, "no"));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngIf", ctx_r0.isItemFieldInvalid(i_r18, "isSearchable"));
    \u0275\u0275advance(3);
    \u0275\u0275property("id", "clauseType" + i_r18)("ngClass", \u0275\u0275pureFunction1(104, _c3, ctx_r0.isItemFieldInvalid(i_r18, "clauseType")));
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(48, 72, "select_any"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(51, 74, "where"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(54, 76, "having"));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngIf", ctx_r0.isItemFieldInvalid(i_r18, "clauseType"));
    \u0275\u0275advance(3);
    \u0275\u0275property("id", "isSortable" + i_r18)("ngClass", \u0275\u0275pureFunction1(106, _c3, ctx_r0.isItemFieldInvalid(i_r18, "isSortable")));
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(61, 78, "select_any"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(64, 80, "yes"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(67, 82, "no"));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngIf", ctx_r0.isItemFieldInvalid(i_r18, "isSortable"));
    \u0275\u0275advance(3);
    \u0275\u0275property("id", "fieldType" + i_r18)("ngClass", \u0275\u0275pureFunction1(108, _c3, ctx_r0.isItemFieldInvalid(i_r18, "fieldType")));
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(74, 84, "select_any"));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngForOf", ctx_r0.field_types);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx_r0.isItemFieldInvalid(i_r18, "fieldType"));
    \u0275\u0275advance(3);
    \u0275\u0275property("id", "linkType" + i_r18)("ngClass", \u0275\u0275pureFunction1(110, _c3, ctx_r0.isItemFieldInvalid(i_r18, "linkType")));
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(82, 86, "none"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(85, 88, "component"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(88, 90, "child_grid"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(91, 92, "url"));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngIf", ctx_r0.isItemFieldInvalid(i_r18, "linkType"));
    \u0275\u0275advance(3);
    \u0275\u0275property("ngSwitch", (tmp_53_0 = item_r22.get("linkType")) == null ? null : tmp_53_0.value);
    \u0275\u0275advance();
    \u0275\u0275property("ngSwitchCase", "component");
    \u0275\u0275advance();
    \u0275\u0275property("ngSwitchCase", "child_grid");
    \u0275\u0275advance();
    \u0275\u0275property("ngSwitchCase", "url");
    \u0275\u0275advance(2);
    \u0275\u0275property("ngIf", ctx_r0.isItemFieldInvalid(i_r18, "linkAction"));
  }
}
function MasterEntityComponent_ng_container_82_Template(rf, ctx) {
  if (rf & 1) {
    const _r16 = \u0275\u0275getCurrentView();
    \u0275\u0275elementContainerStart(0);
    \u0275\u0275elementStart(1, "div", 99)(2, "div", 100);
    \u0275\u0275text(3);
    \u0275\u0275pipe(4, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(5, "div", 4)(6, "button", 101);
    \u0275\u0275listener("click", function MasterEntityComponent_ng_container_82_Template_button_click_6_listener() {
      \u0275\u0275restoreView(_r16);
      const ctx_r0 = \u0275\u0275nextContext();
      return \u0275\u0275resetView(ctx_r0.addItem());
    });
    \u0275\u0275element(7, "i", 102);
    \u0275\u0275text(8, "\xA0 ");
    \u0275\u0275elementEnd()()();
    \u0275\u0275element(9, "hr", 7);
    \u0275\u0275elementStart(10, "div", 8)(11, "div", 103)(12, "table")(13, "thead")(14, "tr")(15, "th", 104);
    \u0275\u0275text(16);
    \u0275\u0275pipe(17, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(18, "th", 104);
    \u0275\u0275text(19);
    \u0275\u0275pipe(20, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(21, "th", 105);
    \u0275\u0275text(22);
    \u0275\u0275pipe(23, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(24, "th", 106);
    \u0275\u0275text(25);
    \u0275\u0275pipe(26, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(27, "th", 106);
    \u0275\u0275text(28);
    \u0275\u0275pipe(29, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(30, "th", 107);
    \u0275\u0275text(31);
    \u0275\u0275pipe(32, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(33, "th", 106);
    \u0275\u0275text(34);
    \u0275\u0275pipe(35, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(36, "th", 107);
    \u0275\u0275text(37);
    \u0275\u0275pipe(38, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(39, "th", 108);
    \u0275\u0275text(40);
    \u0275\u0275pipe(41, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(42, "th", 109);
    \u0275\u0275text(43);
    \u0275\u0275pipe(44, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(45, "th", 107);
    \u0275\u0275text(46);
    \u0275\u0275pipe(47, "translate");
    \u0275\u0275elementEnd()()();
    \u0275\u0275elementStart(48, "tbody", 110);
    \u0275\u0275template(49, MasterEntityComponent_ng_container_82_ng_container_49_Template, 5, 3, "ng-container", 22)(50, MasterEntityComponent_ng_container_82_ng_container_50_Template, 105, 112, "ng-container", 111);
    \u0275\u0275elementEnd()()()();
    \u0275\u0275elementContainerEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext();
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(4, 14, "title_entity_line_items"));
    \u0275\u0275advance(13);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(17, 16, "table_field_name"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(20, 18, "table_display_name"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(23, 20, "table_order_no"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(26, 22, "table_is_grid_column"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(29, 24, "table_is_searchable"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(32, 26, "table_is_clause_type"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(35, 28, "table_is_sortable"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(38, 30, "table_field_type"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(41, 32, "link_type"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(44, 34, "link_action"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(47, 36, "table_action"));
    \u0275\u0275advance(3);
    \u0275\u0275property("ngIf", ctx_r0.itemsControls.length <= 0);
    \u0275\u0275advance();
    \u0275\u0275property("ngForOf", ctx_r0.itemsControls);
  }
}
function MasterEntityComponent_div_83_ng_container_16_Template(rf, ctx) {
  if (rf & 1) {
    const _r24 = \u0275\u0275getCurrentView();
    \u0275\u0275elementContainerStart(0);
    \u0275\u0275elementStart(1, "button", 165);
    \u0275\u0275listener("click", function MasterEntityComponent_div_83_ng_container_16_Template_button_click_1_listener() {
      const i_r25 = \u0275\u0275restoreView(_r24).index;
      const ctx_r0 = \u0275\u0275nextContext(2);
      return \u0275\u0275resetView(ctx_r0.selectTab(i_r25));
    });
    \u0275\u0275text(2);
    \u0275\u0275elementEnd();
    \u0275\u0275elementContainerEnd();
  }
  if (rf & 2) {
    const name_r26 = ctx.$implicit;
    const i_r25 = ctx.index;
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance();
    \u0275\u0275property("ngClass", \u0275\u0275pureFunction1(2, _c6, ctx_r0.selectedInfoTab == i_r25));
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", name_r26, " ");
  }
}
function MasterEntityComponent_div_83_li_19_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "li")(1, "div", 166)(2, "span", 167);
    \u0275\u0275text(3);
    \u0275\u0275pipe(4, "translate");
    \u0275\u0275elementEnd()()();
  }
  if (rf & 2) {
    const item_r27 = ctx.$implicit;
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(4, 1, item_r27));
  }
}
function MasterEntityComponent_div_83_p_21_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "p", 168);
    \u0275\u0275text(1, "Copied to clipboard!");
    \u0275\u0275elementEnd();
  }
}
function MasterEntityComponent_div_83_Template(rf, ctx) {
  if (rf & 1) {
    const _r23 = \u0275\u0275getCurrentView();
    \u0275\u0275elementStart(0, "div", 145);
    \u0275\u0275element(1, "div", 146);
    \u0275\u0275elementStart(2, "div", 147)(3, "div", 148)(4, "div", 149)(5, "div", 150)(6, "div", 151)(7, "p", 152);
    \u0275\u0275text(8);
    \u0275\u0275pipe(9, "translate");
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(10, "button", 153);
    \u0275\u0275listener("click", function MasterEntityComponent_div_83_Template_button_click_10_listener() {
      \u0275\u0275restoreView(_r23);
      const ctx_r0 = \u0275\u0275nextContext();
      return \u0275\u0275resetView(ctx_r0.closeInfoPopUp());
    });
    \u0275\u0275elementStart(11, "span", 154);
    \u0275\u0275text(12, "Close");
    \u0275\u0275elementEnd();
    \u0275\u0275element(13, "i", 155);
    \u0275\u0275elementEnd()()();
    \u0275\u0275elementStart(14, "div", 156)(15, "div", 157);
    \u0275\u0275template(16, MasterEntityComponent_div_83_ng_container_16_Template, 3, 4, "ng-container", 18);
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(17, "div", 158)(18, "ul", 159);
    \u0275\u0275template(19, MasterEntityComponent_div_83_li_19_Template, 5, 3, "li", 18);
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(20, "div", 160);
    \u0275\u0275template(21, MasterEntityComponent_div_83_p_21_Template, 2, 0, "p", 161);
    \u0275\u0275elementStart(22, "div", 162)(23, "ngx-monaco-editor", 163);
    \u0275\u0275listener("click", function MasterEntityComponent_div_83_Template_ngx_monaco_editor_click_23_listener() {
      \u0275\u0275restoreView(_r23);
      const ctx_r0 = \u0275\u0275nextContext();
      return \u0275\u0275resetView(ctx_r0.copyToClipboard());
    });
    \u0275\u0275twoWayListener("ngModelChange", function MasterEntityComponent_div_83_Template_ngx_monaco_editor_ngModelChange_23_listener($event) {
      \u0275\u0275restoreView(_r23);
      const ctx_r0 = \u0275\u0275nextContext();
      \u0275\u0275twoWayBindingSet(ctx_r0.popupInformation.data, $event) || (ctx_r0.popupInformation.data = $event);
      return \u0275\u0275resetView($event);
    });
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(24, "div", 164);
    \u0275\u0275listener("click", function MasterEntityComponent_div_83_Template_div_click_24_listener() {
      \u0275\u0275restoreView(_r23);
      const ctx_r0 = \u0275\u0275nextContext();
      return \u0275\u0275resetView(ctx_r0.copyToClipboard());
    });
    \u0275\u0275elementEnd()()()()()()();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext();
    \u0275\u0275advance(8);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(9, 6, ctx_r0.popupInformation.header));
    \u0275\u0275advance(8);
    \u0275\u0275property("ngForOf", ctx_r0.popupInformation.tabNames);
    \u0275\u0275advance(3);
    \u0275\u0275property("ngForOf", ctx_r0.popupInformation.comments);
    \u0275\u0275advance(2);
    \u0275\u0275property("ngIf", ctx_r0.copied);
    \u0275\u0275advance(2);
    \u0275\u0275property("options", ctx_r0.popupInfoEditorOptions);
    \u0275\u0275twoWayProperty("ngModel", ctx_r0.popupInformation.data);
  }
}
function viewMandatoryValidator() {
  return (control) => {
    const selectedOptions = control.value;
    if (Array.isArray(selectedOptions) && selectedOptions.includes("view")) {
      return null;
    }
    return { viewMandatory: true };
  };
}
var _MasterEntityComponent = class _MasterEntityComponent {
  constructor(fb, gridApiService, toastr, route, router, localStorageService, storeData, location, translate, titleService) {
    this.fb = fb;
    this.gridApiService = gridApiService;
    this.toastr = toastr;
    this.route = route;
    this.router = router;
    this.localStorageService = localStorageService;
    this.storeData = storeData;
    this.location = location;
    this.translate = translate;
    this.titleService = titleService;
    this.items = [];
    this.entity_types = [];
    this.action_types = [];
    this.field_types = [];
    this.tables_list = [];
    this.wizard_type_list = [];
    this.report_type_list = [];
    this.id = null;
    this.editTitle = false;
    this.submitted = false;
    this.commonConfig = commonConfig;
    this.existing_actions = [];
    this.redirect_url = "";
    this.rowsLength = 26;
    this.editorOptions = { theme: "vs-dark", language: "sql", tabSize: 1, insertSpaces: true };
    this.htmlEditorOptions = __spreadProps(__spreadValues({}, this.editorOptions), { language: "html" });
    this.isDarkTheme = true;
    this.insert_json_schema = {
      // it will be removed
      action: ["insert", "insert", "insert"],
      table: ["master_entities", "permissions", "master_entity_line_items"],
      table_mapping: ["table1", "table2", "table3"],
      data: {
        table1: [],
        table2: [],
        table3: []
      }
    };
    this.update_json_schema = {
      // it will be removed
      action: ["update", "hard_delete", "insert", "hard_delete", "insert"],
      table: ["master_entities", "master_entity_line_items", "master_entity_line_items", "permissions", "permissions"],
      table_mapping: ["table1", "table2", "table3", "table4", "table5"],
      data: {
        table1: [],
        table3: [],
        table5: []
      },
      conditions: {
        table1: [],
        table2: [],
        table4: []
      }
    };
    this.exportTemplates = [];
    this.wizardGroups = [];
    this.showWizardGroupMenu = false;
    this.showWizardGroupModal = false;
    this.newWizardGroupName = "";
    this.isInfoModalOpen = false;
    this.infoContents = {
      reportInfo: {
        header: "sample_report_information",
        examples: [
          {
            name: "example_1",
            comments: ["background_settings", "layout_types"],
            data: {
              groupId: "power_bi_group_id",
              reportId: "power_bi_report_id",
              settings: {
                background: 1,
                barsHidden: true,
                layoutType: 1,
                filterPaneEnabled: false,
                navContentPaneEnabled: false
              }
            }
          }
        ]
      },
      queryInfo: {
        header: "sample_query_information",
        examples: [
          {
            name: "example_1",
            comments: [],
            data: {
              cte: "WITH test_constants AS ( SELECT 1 AS dummy_id )",
              company_id: 1,
              print_query: false,
              primary_table: "users",
              start_index: 0,
              limit_range: 15,
              attached_policies: ["user_filer1"],
              sort_columns: [["users.id", "desc"]],
              search_all: [
                {
                  column_name: "users.deleted_at",
                  value: null,
                  operator: "IS"
                }
              ],
              search_any: [
                {
                  column_name: "users.deleted_at",
                  value: null,
                  operator: "IS"
                }
              ],
              select_columns: [["users.id"], ["users.email", "user_mail"], ["concat(user_details.first_name, ' ', user_details.last_name)", "full_name"]],
              includes: [
                {
                  table_name: "user_details",
                  join_type: "INNER",
                  join_condition: "users.id = user_details.user_id"
                }
              ],
              group_by: ["users.id", "user_details.first_name", "user_details.last_name"],
              having_conditions: [
                {
                  column_name: "users.deleted_at",
                  value: null,
                  operator: "IS"
                }
              ],
              having_any_conditions: [
                {
                  value: "%Mukesh%",
                  operator: "ILIKE",
                  column_name: "concat(user_details.first_name, ' ', user_details.last_name)"
                }
              ]
            }
          }
        ]
      },
      formQueryInfo: {
        header: "sample_query_information",
        examples: [
          {
            name: "example_1",
            comments: [],
            data: {
              cte: "WITH test_constants AS ( SELECT 1 AS dummy_id )",
              company_id: 1,
              print_query: false,
              primary_table: "users",
              start_index: 0,
              limit_range: 15,
              attached_policies: ["user_filer1"],
              sort_columns: [["users.id", "desc"]],
              search_all: [
                {
                  column_name: "users.deleted_at",
                  value: null,
                  operator: "IS"
                }
              ],
              search_any: [
                {
                  column_name: "users.deleted_at",
                  value: null,
                  operator: "IS"
                }
              ],
              select_columns: [["users.id"], ["users.email", "user_mail"], ["concat(user_details.first_name, ' ', user_details.last_name)", "full_name"]],
              includes: [
                {
                  table_name: "user_details",
                  join_type: "INNER",
                  join_condition: "users.id = user_details.user_id"
                }
              ],
              group_by: ["users.id", "user_details.first_name", "user_details.last_name"],
              having_conditions: [
                {
                  column_name: "users.deleted_at",
                  value: null,
                  operator: "IS"
                }
              ],
              having_any_conditions: [
                {
                  value: "%Mukesh%",
                  operator: "ILIKE",
                  column_name: "concat(user_details.first_name, ' ', user_details.last_name)"
                }
              ]
            }
          }
        ]
      },
      jobBuilderQueryInfo: {
        header: "sample_query_information",
        examples: [
          /*{
            name: 'example_1',
            comments: [],
            data: {
              data: {
                table1: [
                  {
                    deleted_at: true,
                    deleted_by: true,
                  },
                ],
              },
              table: ['users'],
              action: ['delete'],
              conditions: {
                table1: [
                  {
                    id: '$unique_id',
                  },
                ],
              },
              reset_unique: {
                table1: [
                  {
                    column_name: 'email',
                    column_length: 100,
                  },
                  {
                    column_name: 'username',
                    column_length: 100,
                  },
                ],
              },
              table_mapping: ['table1'],
            },
          },*/
          {
            name: "example_1",
            comments: [],
            data: {
              cte: "WITH test_constants AS ( SELECT 1 AS dummy_id )",
              company_id: 1,
              print_query: false,
              primary_table: "users",
              start_index: 0,
              limit_range: 15,
              attached_policies: ["user_filer1"],
              sort_columns: [["users.id", "desc"]],
              search_all: [
                {
                  column_name: "users.deleted_at",
                  value: null,
                  operator: "IS"
                }
              ],
              search_any: [
                {
                  column_name: "users.deleted_at",
                  value: null,
                  operator: "IS"
                }
              ],
              select_columns: [["users.id"], ["users.email", "user_mail"], ["concat(user_details.first_name, ' ', user_details.last_name)", "full_name"]],
              includes: [
                {
                  table_name: "user_details",
                  join_type: "INNER",
                  join_condition: "users.id = user_details.user_id"
                }
              ],
              group_by: ["users.id", "user_details.first_name", "user_details.last_name"],
              having_conditions: [
                {
                  column_name: "users.deleted_at",
                  value: null,
                  operator: "IS"
                }
              ],
              having_any_conditions: [
                {
                  value: "%Mukesh%",
                  operator: "ILIKE",
                  column_name: "concat(user_details.first_name, ' ', user_details.last_name)"
                }
              ]
            }
          }
        ]
      },
      associatedTableInfo: {
        header: "sample_associated_table_information",
        examples: [
          {
            name: "example_1",
            comments: [],
            data: [
              {
                table: "user_details",
                where_clause: "user_id = $1"
              }
            ]
          }
        ]
      },
      addQueryInfo: {
        header: "sample_add_json_information",
        examples: [
          {
            name: "example_1",
            comments: [],
            data: {
              data: {
                table1: [
                  {
                    role: "$users.role",
                    email: "$users.email",
                    username: "$users.username",
                    status_id: "$users.status_id",
                    created_at: true,
                    created_by: true,
                    updated_at: true,
                    updated_by: true
                  }
                ],
                table2: [
                  {
                    dob: "$user_details.dob",
                    code: "$user_details.code",
                    gender: "$user_details.gender",
                    address: "$user_details.address",
                    culture: "$user_details.culture",
                    user_id: "@table1.id",
                    last_name: "$user_details.last_name",
                    created_at: true,
                    created_by: true,
                    first_name: "$user_details.first_name",
                    updated_at: true,
                    updated_by: true,
                    profile_pic: "$user_details.profile_pic",
                    phone_number: "$user_details.phone_number",
                    department_id: "$user_details.department_id",
                    designation_id: "$user_details.designation_id"
                  }
                ],
                table3: [
                  {
                    role_id: "$user_roles.role_id",
                    user_id: "@table1.id"
                  }
                ],
                table4: [
                  {
                    user_id: "@table1.id",
                    unique_id: "@table1.id",
                    created_at: true,
                    created_by: true,
                    prefill_data: "$model",
                    email_template_process_slug: "user-created"
                  }
                ]
              },
              table: ["users", "user_details", "user_roles", "email_process_jobs"],
              action: ["insert", "insert", "insert", "insert"],
              table_mapping: ["table1", "table2", "table3", "table4"]
            }
          }
        ]
      },
      editQueryInfo: {
        header: "sample_edit_json_information",
        examples: [
          {
            name: "example_1",
            comments: [],
            data: {
              data: {
                table1: [
                  {
                    email: "$users.email",
                    username: "$users.username",
                    status_id: "$users.status_id",
                    updated_at: true,
                    updated_by: true
                  }
                ],
                table2: [
                  {
                    dob: "$user_details.dob",
                    code: "$user_details.code",
                    gender: "$user_details.gender",
                    address: "$user_details.address",
                    culture: "$user_details.culture",
                    last_name: "$user_details.last_name",
                    first_name: "$user_details.first_name",
                    updated_at: true,
                    updated_by: true,
                    profile_pic: "$user_details.profile_pic",
                    phone_number: "$user_details.phone_number",
                    department_id: "$user_details.department_id",
                    designation_id: "$user_details.designation_id"
                  }
                ],
                table4: [
                  {
                    role_id: "$user_roles.role_id",
                    user_id: "@table1.id"
                  }
                ]
              },
              table: ["users", "user_details", "user_roles", "user_roles"],
              action: ["update", "update", "hard_delete", "insert"],
              conditions: {
                table1: [
                  {
                    uuid: "$unique_id"
                  }
                ],
                table2: [
                  {
                    user_id: "@table1.id"
                  }
                ],
                table3: [
                  {
                    user_id: "@table1.id"
                  }
                ]
              },
              table_mapping: ["table1", "table2", "table3", "table4"]
            }
          }
        ]
      },
      formInfo: {
        header: "sample_from_information",
        examples: [
          {
            name: "normal_form_example",
            comments: [],
            data: {
              model: {
                users: {
                  role: "admin",
                  email: null,
                  role_id: null,
                  username: null,
                  status_id: 1
                },
                user_roles: {
                  role_id: []
                },
                user_details: {
                  dob: null,
                  code: null,
                  gender: "male",
                  address: null,
                  culture: null,
                  last_name: null,
                  first_name: null,
                  profile_pic: null,
                  phone_number: null,
                  department_id: null,
                  designation_id: null
                }
              },
              fields: [
                {
                  key: "users",
                  wrappers: ["form-field"],
                  fieldGroup: [
                    {
                      key: "username",
                      type: "input",
                      props: {
                        label: "Username",
                        required: true,
                        placeholder: "Enter username"
                      }
                    },
                    {
                      key: "email",
                      type: "input",
                      props: {
                        type: "email",
                        label: "Email",
                        required: true,
                        placeholder: "Enter email"
                      }
                    },
                    {
                      type: "#status"
                    }
                  ],
                  fieldGroupClassName: "grid grid-cols-1 gap-2 md:grid-cols-3"
                },
                {
                  key: "user_details",
                  wrappers: ["form-field"],
                  fieldGroup: [
                    {
                      key: "code",
                      type: "input",
                      props: {
                        label: "Code",
                        required: true,
                        placeholder: "Enter code"
                      }
                    },
                    {
                      key: "first_name",
                      type: "input",
                      props: {
                        label: "First Name",
                        required: true,
                        placeholder: "Enter first name"
                      }
                    },
                    {
                      key: "last_name",
                      type: "input",
                      props: {
                        label: "Last Name",
                        placeholder: "Enter last name"
                      }
                    },
                    {
                      key: "department_id",
                      type: "select",
                      hooks: {
                        onInit: true
                      },
                      props: {
                        label: "Department"
                      },
                      attached_policies: ["filterdepartmentstartswithe"]
                    },
                    {
                      key: "designation_id",
                      type: "select",
                      hooks: {
                        onInit: true
                      },
                      props: {
                        label: "Designation"
                      }
                    },
                    {
                      key: "dob",
                      type: "input",
                      props: {
                        type: "date",
                        label: "Date of Birth",
                        placeholder: "Enter date of birth"
                      }
                    },
                    {
                      key: "phone_number",
                      type: "input",
                      props: {
                        label: "Phone Number",
                        placeholder: "Enter phone number"
                      }
                    },
                    {
                      key: "gender",
                      type: "radio",
                      props: {
                        label: "Gender",
                        options: [
                          {
                            label: "Male",
                            value: "male"
                          },
                          {
                            label: "Female",
                            value: "female"
                          },
                          {
                            label: "Others",
                            value: "others"
                          }
                        ],
                        required: true
                      }
                    },
                    {
                      key: "culture",
                      type: "input",
                      props: {
                        label: "Culture",
                        placeholder: "Enter culture"
                      }
                    },
                    {
                      key: "address",
                      type: "textarea",
                      props: {
                        rows: 3,
                        label: "Address",
                        placeholder: "Enter address"
                      }
                    },
                    {
                      key: "profile_pic",
                      type: "input",
                      props: {
                        type: "hidden"
                      },
                      className: "hidden"
                    },
                    {
                      key: "profile_pic_file",
                      type: "file",
                      props: {
                        label: "Profile Picture",
                        accept: "png",
                        max_size: "1mb"
                      }
                    }
                  ],
                  fieldGroupClassName: "grid grid-cols-1 gap-2 md:grid-cols-3"
                },
                {
                  key: "user_roles",
                  wrappers: ["form-field"],
                  fieldGroup: [
                    {
                      key: "role_id",
                      type: "select-from-db",
                      templateOptions: {
                        label: "Role",
                        table: "roles",
                        multiple: true,
                        required: true,
                        labelColumn: "name",
                        placeholder: "Please select",
                        valueColumn: "id"
                      },
                      attached_policies: ["filterrolesstartswiths"]
                    }
                  ],
                  fieldGroupClassName: "grid grid-cols-1 gap-2 md:grid-cols-3"
                }
              ],
              options: {}
            }
          },
          {
            name: "dynamic_form_example",
            comments: [],
            data: {
              model: {
                items: {
                  sku: null,
                  name: null,
                  team_id: null,
                  parent_id: null,
                  status_id: 1,
                  description: null,
                  item_type_id: null,
                  department_id: null,
                  active_passive: 1,
                  manufacturer_id: null,
                  item_images_limit: 2048,
                  enable_zain_tag_tracking: false,
                  enable_serial_number_tracking: false,
                  enable_sequential_lot_tracking: false
                },
                item_uoms: [],
                item_images: []
              },
              fields: [
                {
                  key: "items",
                  wrappers: ["form-field"],
                  fieldGroup: [
                    {
                      key: "parent_id",
                      type: "select-from-db",
                      props: {
                        label: "Parent Item",
                        table: "items",
                        labelColumn: "name",
                        placeholder: "Select Parent Item",
                        valueColumn: "id"
                      }
                    },
                    {
                      key: "sku",
                      type: "input",
                      props: {
                        label: "SKU",
                        required: true,
                        placeholder: "Enter SKU"
                      }
                    },
                    {
                      key: "name",
                      type: "input",
                      props: {
                        label: "Name",
                        required: true,
                        placeholder: "Enter Name"
                      }
                    },
                    {
                      key: "description",
                      type: "textarea",
                      props: {
                        label: "Description",
                        placeholder: "Enter Description"
                      }
                    },
                    {
                      key: "manufacturer_id",
                      type: "select-from-db",
                      props: {
                        label: "Manufacturer",
                        table: "manufacturers",
                        labelColumn: "name",
                        placeholder: "Select Manufacturer",
                        valueColumn: "id"
                      }
                    },
                    {
                      key: "department_id",
                      type: "select-from-db",
                      props: {
                        label: "Department",
                        table: "departments",
                        labelColumn: "name",
                        placeholder: "Select Department",
                        valueColumn: "id"
                      }
                    },
                    {
                      key: "team_id",
                      type: "select-from-db",
                      props: {
                        label: "Team",
                        table: "teams",
                        labelColumn: "name",
                        placeholder: "Select Team",
                        valueColumn: "id"
                      }
                    },
                    {
                      key: "item_type_id",
                      type: "select-from-db",
                      props: {
                        label: "Item Type",
                        table: "item_types",
                        labelColumn: "name",
                        placeholder: "Select Item Type",
                        valueColumn: "id"
                      }
                    },
                    {
                      key: "active_passive",
                      type: "select",
                      props: {
                        label: "Active/Passive",
                        options: [
                          {
                            label: "Active",
                            value: 1
                          },
                          {
                            label: "Passive",
                            value: 2
                          }
                        ],
                        required: true
                      }
                    },
                    {
                      key: "enable_serial_number_tracking",
                      type: "checkbox",
                      props: {
                        label: "Enable Serial Number Tracking"
                      }
                    },
                    {
                      key: "enable_zain_tag_tracking",
                      type: "checkbox",
                      props: {
                        label: "Enable Zain Tag Tracking"
                      }
                    },
                    {
                      key: "enable_sequential_lot_tracking",
                      type: "checkbox",
                      props: {
                        label: "Enable Sequential Lot Tracking"
                      }
                    }
                  ],
                  fieldGroupClassName: "grid grid-cols-1 gap-4 md:grid-cols-4"
                },
                {
                  template: "<h2 class='text-lg font-bold text-gray-800 border-b pb-2 mb-4'>Item Images</h2>"
                },
                {
                  key: "item_images",
                  type: "repeat-table",
                  props: {
                    limit: 10,
                    required: false
                  },
                  wrappers: ["form-field"],
                  fieldArray: {
                    fieldGroup: [
                      {
                        key: "image_path",
                        type: "input",
                        props: {
                          type: "hidden"
                        },
                        className: "hidden"
                      },
                      {
                        key: "image_path_file",
                        type: "image",
                        props: {
                          label: "Item Image",
                          required: false
                        },
                        className: "flex-1"
                      },
                      {
                        key: "image_name",
                        type: "input",
                        props: {
                          label: "Image Name",
                          required: true,
                          placeholder: "Enter Image Name"
                        },
                        className: "flex-1"
                      },
                      {
                        key: "description",
                        type: "textarea",
                        props: {
                          label: "Image Description",
                          placeholder: "Enter Image Description"
                        },
                        className: "flex-1"
                      }
                    ],
                    fieldGroupClassName: "grid grid-cols-1 gap-2 md:grid-cols-4"
                  }
                },
                {
                  template: "<h2 class='text-lg font-bold text-gray-800 border-b pb-2 mb-4'>Item UOMs</h2>"
                },
                {
                  key: "item_uoms",
                  type: "repeat-table",
                  props: {
                    limit: 5,
                    required: true
                  },
                  wrappers: ["form-field"],
                  fieldArray: {
                    fieldGroup: [
                      {
                        key: "uom_id",
                        type: "select-from-db",
                        hooks: {
                          onInit: true
                        },
                        props: {
                          label: "UOM",
                          table: "units_of_measure",
                          required: true,
                          uniqueRow: true,
                          labelColumn: "name",
                          placeholder: "Select UOM",
                          valueColumn: "id"
                        }
                      },
                      {
                        key: "conversion_factor",
                        type: "number",
                        props: {
                          label: "Conversion Factor",
                          required: true,
                          placeholder: "Enter Conversion Factor"
                        }
                      },
                      {
                        key: "af_sqm_ops",
                        type: "input",
                        props: {
                          label: "AF SQM OPS",
                          placeholder: "Enter AF SQM OPS"
                        }
                      },
                      {
                        key: "af_sqm_st",
                        type: "input",
                        props: {
                          label: "AF SQM ST",
                          placeholder: "Enter AF SQM ST"
                        }
                      },
                      {
                        key: "length",
                        type: "number",
                        props: {
                          label: "Length",
                          required: false,
                          placeholder: "Enter Length"
                        }
                      },
                      {
                        key: "height",
                        type: "number",
                        props: {
                          label: "Height",
                          required: false,
                          placeholder: "Enter Height"
                        }
                      },
                      {
                        key: "width",
                        type: "number",
                        props: {
                          label: "Width",
                          required: false,
                          placeholder: "Enter Width"
                        }
                      },
                      {
                        key: "level",
                        type: "select",
                        props: {
                          label: "Level",
                          options: [
                            {
                              label: "1",
                              value: "1"
                            },
                            {
                              label: "2",
                              value: "2"
                            },
                            {
                              label: "3",
                              value: "3"
                            }
                          ],
                          required: true,
                          uniqueRow: true
                        }
                      },
                      {
                        key: "is_base_uom",
                        type: "checkbox",
                        props: {
                          label: "Is Base UOM",
                          uniqueRow: true
                        },
                        defaultValue: false
                      }
                    ],
                    fieldGroupClassName: "grid grid-cols-1 gap-2 md:grid-cols-3"
                  }
                }
              ]
            }
          }
        ]
      },
      presetQueryInfo: {
        header: "sample_preset_json_information",
        examples: [
          {
            name: "example_1",
            comments: [],
            data: {
              users: {
                company_id: 1,
                search_all: [
                  {
                    value: "$unique_id",
                    operator: "=",
                    column_name: "users.uuid"
                  },
                  {
                    value: "3",
                    operator: "!=",
                    column_name: "users.status_id"
                  }
                ],
                limit_range: 1,
                print_query: false,
                start_index: 0,
                sort_columns: [["users.id", "asc"]],
                primary_table: "users",
                select_columns: [["email"], ["username"], ["role"], ["status_id"]]
              },
              user_roles: {
                group_by: ["user_roles.user_id"],
                includes: [
                  {
                    join_type: "INNER",
                    table_name: "users",
                    join_condition: "users.id = user_roles.user_id"
                  }
                ],
                company_id: 1,
                search_all: [
                  {
                    value: "$unique_id",
                    operator: "=",
                    column_name: "users.uuid"
                  },
                  {
                    value: "3",
                    operator: "!=",
                    column_name: "users.status_id"
                  }
                ],
                limit_range: 15,
                print_query: false,
                start_index: 0,
                sort_columns: [["user_roles.user_id", "desc"]],
                primary_table: "user_roles",
                select_columns: [["json_agg(user_roles.role_id::int)", "role_id"]]
              },
              user_details: {
                includes: [
                  {
                    join_type: "INNER",
                    table_name: "user_details",
                    join_condition: "users.id = user_details.user_id"
                  }
                ],
                company_id: 1,
                search_all: [
                  {
                    value: "$unique_id",
                    operator: "=",
                    column_name: "users.uuid"
                  },
                  {
                    value: "3",
                    operator: "!=",
                    column_name: "users.status_id"
                  }
                ],
                limit_range: 1,
                print_query: false,
                start_index: 0,
                sort_columns: [["users.id", "asc"]],
                primary_table: "users",
                select_columns: [
                  ["user_details.code"],
                  ["user_details.first_name"],
                  ["user_details.last_name"],
                  ["user_details.designation_id"],
                  ["user_details.department_id"],
                  ["user_details.dob"],
                  ["user_details.phone_number"],
                  ["user_details.country_code"],
                  ["user_details.gender"],
                  ["user_details.user_time_zone"],
                  ["user_details.address"],
                  ["user_details.culture"],
                  ["user_details.profile_pic"]
                ]
              }
            }
          }
        ]
      }
    };
    this.selectedInfoTab = 0;
    this.popupInformation = null;
    this.popupName = "reportInfo";
    this.popupInfoEditorOptions = __spreadProps(__spreadValues({}, this.editorOptions), { language: "sql", cursorStyle: "line", readOnly: true, automaticLayout: true, minimap: { enabled: false } });
    this.copied = false;
    this.masterEntities = [];
    this.masterEntitiesForChildProcess = [];
    this.initStore();
  }
  ngOnInit() {
    this.id = this.route.snapshot.params["id"] || this.route.snapshot.params["uuid"] || null;
    this.initForm();
    this.constructRedirectUrl();
    this.initWizardGroupForm();
    this.loadWizardGroups();
    this.loadExportTemplates();
    this.field_types = this.commonConfig.field_types;
    this.entity_types = this.commonConfig.entity_types;
    this.action_types = this.commonConfig.action_types;
    this.wizard_type_list = this.commonConfig.wizard_type;
    this.report_type_list = this.commonConfig.report_type;
    this.fetchAllTables();
    this.form.get("entityType")?.valueChanges.subscribe((value) => {
      this.updateFormValidation(value);
    });
    if (!this.id) {
      this.editTitle = false;
    } else {
      this.editTitle = true;
      this.loadData(this.id);
    }
    this.titleChange();
    this.fetchAllMasterEntities();
  }
  // ngAfterViewInit() {
  //   if (this.monacoEditor && this.monacoEditor._editorContainer) {
  //     const editorElement = this.monacoEditor._editorContainer.nativeElement;
  //     const resizeObserver = new ResizeObserver(() => {
  //       // Access the editor instance from the DOM element, if possible
  //       const monacoInstance = (editorElement as any).editorInstance;
  //       if (monacoInstance && typeof monacoInstance.layout === 'function') {
  //         monacoInstance.layout();
  //       }
  //     });
  //     resizeObserver.observe(editorElement);
  //   }
  // }
  // ngAfterViewInit() {
  //   if (this.monacoEditor && this.monacoEditor._editorContainer) {
  //     const editorElement = this.monacoEditor._editorContainer.nativeElement;
  //     // Try observing the window resize as a fallback
  //     window.addEventListener('resize', () => {
  //       console.log('Observing element:', editorElement);
  //       this.adjustEditorHeight(editorElement);
  //     });
  //     // Still, attempt to use ResizeObserver as well
  //     const resizeObserver = new ResizeObserver(() => {
  //       this.adjustEditorHeight(editorElement);
  //     });
  //     resizeObserver.observe(editorElement);
  //   }
  // }
  // private adjustEditorHeight(editorElement: any) {
  //   const newHeight = editorElement.clientHeight;
  //   editorElement.style.height = `${newHeight}px`;
  //   console.log('Adjusted Height:', newHeight);
  //   const monacoInstance = (editorElement as any).editorInstance;
  //   if (monacoInstance && typeof monacoInstance.layout === 'function') {
  //     monacoInstance.layout();
  //   }
  // }
  initStore() {
    return __async(this, null, function* () {
      this.storeData.select((d) => d.index).subscribe((d) => {
        this.store = d;
      });
    });
  }
  titleChange() {
    const title = this.editTitle ? "title_edit_entity" : "title_add_entity";
    const translateTitle = this.translate.instant(title);
    this.titleService.setTitle(translateTitle);
  }
  decimalValidator(control) {
    const value = control.value;
    if (value !== null && value !== void 0 && !/^\d+(\.\d{1,2})?$/.test(value)) {
      return { decimalInvalid: true };
    }
    return null;
  }
  initForm() {
    this.form = this.fb.group({
      name: ["", [Validators.required, Validators.maxLength(100)]],
      entityName: [""],
      entityType: ["", Validators.required],
      permissions: ["", [Validators.required, viewMandatoryValidator()]],
      primaryTable: [""],
      statusId: [1],
      isAdminModule: [false],
      draftMode: [false],
      associateTable: [""],
      wizardType: [""],
      reportType: [this.commonConfig.REPORT_TYPES.LCP],
      wizardGroup: [""],
      export_template_id: [""],
      dashboard_wizard_rows: [""],
      dashboard_wizard_columns: [""],
      dashboard_wizard_order_no: ["0.01", [this.decimalValidator]],
      queryInformation: [""],
      reportInformation: [""],
      dashboard_wizard_options: [""],
      formInformation: [""],
      addQueryInformation: [""],
      editQueryInformation: [""],
      presetQueryInformation: [""],
      staticPageContent: [""],
      items: this.fb.array([])
    });
  }
  initWizardGroupForm() {
    this.wizardGroupForm = this.fb.group({
      name: ["", [Validators.required, Validators.maxLength(100)]]
    });
  }
  loadWizardGroups() {
    const params = {
      company_id: 1,
      print_query: true,
      primary_table: "wizard_group",
      start_index: 0,
      limit_range: 1e3,
      sort_columns: [["wizard_group.id", "desc"]],
      select_columns: [["wizard_group.*"]]
    };
    this.gridApiService.getAllList(params).subscribe((response) => {
      if (response.status && response.code === 200) {
        this.wizardGroups = response.data.records;
      }
    }, (error) => {
      const key = "error";
      const errorMessage = this.translate.instant(key);
      this.toastr.error(errorMessage, "Error");
    });
  }
  loadExportTemplates() {
    const params = {
      company_id: 1,
      print_query: true,
      primary_table: "export_templates",
      start_index: 0,
      limit_range: 1e3,
      sort_columns: [["export_templates.id", "desc"]],
      select_columns: [["export_templates.id, export_templates.name"]]
    };
    this.gridApiService.getAllList(params).subscribe((response) => {
      if (response.status && response.code === 200) {
        this.exportTemplates = response.data.records;
      }
    }, (error) => {
      const key = "error";
      const errorMessage = this.translate.instant(key);
      this.toastr.error(errorMessage, "Error");
    });
  }
  addNewWizardGroup() {
    if (this.wizardGroupForm.valid) {
      const newGroupName = this.wizardGroupForm.get("name")?.value;
      const params = {
        action: ["insert"],
        table: ["wizard_group"],
        table_mapping: ["table1"],
        data: {
          table1: [
            {
              name: newGroupName,
              slug: newGroupName
            }
          ]
        }
      };
      this.gridApiService.executeRecords(params).subscribe((response) => {
        if (response.status && response.code === 200) {
          const key = "record_inserted_successfully";
          const successMessage = this.translate.instant(key);
          this.toastr.success(successMessage);
          this.loadWizardGroups();
          this.cancelAddWizardGroup();
        } else {
          const key = response.message;
          const errorMessage = this.translate.instant(key);
          this.toastr.error(errorMessage, "Error");
        }
      }, (error) => {
        const key = "error";
        const errorMessage = this.translate.instant(key);
        this.toastr.error(errorMessage, "Error");
      });
    }
  }
  isWizardGroupFieldInvalid(fieldName) {
    const field = this.wizardGroupForm.get(fieldName);
    return field?.invalid && (field.touched || field.dirty);
  }
  getWizardGroupErrorMessage(fieldName) {
    const field = this.wizardGroupForm.get(fieldName);
    if (field) {
      if (field.hasError("required")) {
        return "required_message";
      }
      if (field.hasError("maxlength")) {
        return `Maximum length exceeded (${field.errors?.["maxlength"].requiredLength} characters allowed)`;
      }
      if (field.hasError("min")) {
        return `Minimum value is ${field.errors?.["min"].min}`;
      }
      if (field.hasError("viewMandatory")) {
        return '"view" option is mandatory';
      }
    }
    return "";
  }
  showAddNewWizardGroup() {
    this.showWizardGroupMenu = true;
  }
  cancelAddWizardGroup() {
    this.showWizardGroupMenu = false;
    this.wizardGroupForm.reset();
  }
  updateFormValidation(entityType) {
    this.form.clearValidators();
    const primaryTableControl = this.form.get("primaryTable");
    const itemsControl = this.form.get("items");
    if (entityType == commonConfig.ENTITY_TYPES.FORM_BUILDER_MODULE) {
      primaryTableControl?.setValidators([Validators.required, Validators.maxLength(100)]);
      itemsControl?.setValidators([Validators.required, Validators.minLength(1)]);
    }
    this.form.updateValueAndValidity();
  }
  constructRedirectUrl() {
    const currentUrl = this.router.url;
    let updatedUrl = currentUrl.replace(/\/edit\/\d+$/, "");
    this.redirect_url = updatedUrl.replace(/\/add$/, "");
  }
  toggleTheme() {
    this.isDarkTheme = !this.isDarkTheme;
    this.editorOptions = __spreadProps(__spreadValues({}, this.editorOptions), {
      theme: this.isDarkTheme ? "vs-dark" : "vs-light"
    });
  }
  fetchAllTables() {
    this.gridApiService.getAllTables().subscribe((response) => {
      if (response.status && response.code === 200) {
        this.tables_list = response.data;
      }
    }, (error) => {
      const key = "error";
      const errorMessage = this.translate.instant(key);
      this.toastr.error(errorMessage, "Error");
    });
  }
  addItem() {
    const items = this.form.get("items");
    const group = this.fb.group({
      fieldName: ["", [Validators.required, Validators.maxLength(100)]],
      displayName: ["", [Validators.required, Validators.maxLength(100)]],
      orderNo: ["", [Validators.required, Validators.min(0)]],
      isGridColumn: ["true", Validators.required],
      isSearchable: ["true", Validators.required],
      clauseType: ["where", Validators.required],
      isSortable: ["true", Validators.required],
      fieldType: [this.commonConfig.field_types[0].value, Validators.required],
      linkType: ["none", Validators.required],
      linkAction: [""]
    });
    this.setupLinkModeAutoUpdate(group);
    items.push(group);
    console.log(items);
  }
  removeItem(index) {
    const items = this.form.get("items");
    if (items.length > 0) {
      items.removeAt(index);
    } else {
      this.toastr.warning("At least one item is required.");
    }
  }
  get itemsControls() {
    return this.form.get("items").controls;
  }
  loadData(id) {
    const params = {
      company_id: 1,
      print_query: true,
      primary_table: "master_entities",
      start_index: 0,
      limit_range: 1,
      sort_columns: [["master_entities.id", "desc"]],
      select_columns: [
        ["master_entities.*"],
        ["COALESCE(Json_agg(DISTINCT jsonb_build_object('name', permissions.name)))", "permissions"],
        [
          "CASE WHEN COUNT(master_entity_line_items.id) = 0 THEN null ELSE COALESCE(Json_agg(DISTINCT jsonb_build_object('id', master_entity_line_items.id,'field_name', master_entity_line_items.field_name,'display_name', master_entity_line_items.display_name,'order_no', master_entity_line_items.order_no,'link_type', master_entity_line_items.link_type,'link_action', master_entity_line_items.link_action,'link_mode', master_entity_line_items.link_mode,'is_grid_column', master_entity_line_items.is_grid_column,'is_searchable', master_entity_line_items.is_searchable,'is_sortable', master_entity_line_items.is_sortable,'field_type_id', master_entity_line_items.field_type_id, 'clause_type', master_entity_line_items.clause_type))) END",
          "items"
        ]
      ],
      includes: [
        {
          table_name: "permissions",
          join_type: "INNER",
          join_condition: `master_entities.id = permissions.entity_id AND master_entities.uuid = '${id}'`
        },
        {
          table_name: "master_entity_line_items",
          join_type: "LEFT",
          join_condition: `master_entities.id = master_entity_line_items.master_grid_id AND master_entities.uuid = '${id}'`
        }
      ],
      group_by: ["master_entities.id"]
    };
    this.gridApiService.getAllList(params).subscribe((response) => {
      if (response.status && response.code === 200) {
        const entity = response.data.records[0];
        this.existing_actions = this.populateSelectedActionTypes(entity.permissions);
        this.form.patchValue({
          name: entity.name,
          entityName: entity.entity_name,
          permissions: this.existing_actions,
          associateTable: entity.associated_tables ? this.prettyJSON(entity.associated_tables) : "",
          primaryTable: entity.primary_table && entity.primary_table != "null" ? entity.primary_table : "",
          statusId: entity.status_id,
          isAdminModule: entity.is_admin_module,
          draftMode: entity.draft_mode || false,
          entityType: entity.entity_type,
          queryInformation: entity.query_information ? this.prettyJSON(entity.query_information) : "",
          reportInformation: entity.report_information ? this.prettyJSON(entity.report_information) : "",
          formInformation: entity.form_information ? this.prettyJSON(entity.form_information) : "",
          addQueryInformation: entity.add_query_information ? this.prettyJSON(entity.add_query_information) : "",
          editQueryInformation: entity.edit_query_information ? this.prettyJSON(entity.edit_query_information) : "",
          presetQueryInformation: entity.preset_query_information ? this.prettyJSON(entity.preset_query_information) : "",
          staticPageContent: entity.static_page_content,
          wizardType: entity.dashboard_wizard_type,
          reportType: entity?.report_type || this.commonConfig.REPORT_TYPES.LCP,
          wizardGroup: entity.dashboard_wizard_group_id,
          export_template_id: entity.export_template_id,
          dashboard_wizard_rows: entity.dashboard_wizard_rows,
          dashboard_wizard_columns: entity.dashboard_wizard_columns,
          dashboard_wizard_order_no: entity.dashboard_wizard_order_no,
          dashboard_wizard_options: entity.dashboard_wizard_options ? this.prettyJSON(entity.dashboard_wizard_options) : ""
        });
        const items = this.form.get("items");
        if (entity.items && entity.items.length > 0) {
          entity.items.forEach((item) => {
            const linkType = item.link_type || "none";
            const linkAction = item.link_action || "";
            const group = this.fb.group({
              fieldName: [item.field_name, Validators.required],
              displayName: [item.display_name, Validators.required],
              orderNo: [item.order_no, [Validators.required, Validators.min(0)]],
              isGridColumn: [item.is_grid_column, Validators.required],
              isSearchable: [item.is_searchable, Validators.required],
              clauseType: [item?.clause_type || "where", Validators.required],
              isSortable: [item.is_sortable, Validators.required],
              fieldType: [item.field_type_id, Validators.required],
              linkType: [linkType, Validators.required],
              linkAction: [linkAction]
            });
            this.setupLinkModeAutoUpdate(group, linkAction);
            items.push(group);
          });
        }
      }
    }, (error) => {
      const key = "error";
      const errorMessage = this.translate.instant(key);
      this.toastr.error(errorMessage, "Error");
    });
  }
  populateSelectedActionTypes(permissions) {
    const permissionList = permissions.map((item) => {
      const actionType = this.action_types.find((elem) => elem.value == item.name);
      return actionType ? actionType.value : "";
    });
    return permissionList;
  }
  getAddParams(formData) {
    const formDataName = commonConfig.PREFIX_SHORTCODE[formData.entityType] + "_" + formData.name;
    const entitySlug = this.localStorageService.generateSlugWithTimestamp(formDataName);
    const master = [
      __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({
        name: formData.name,
        entity_name: entitySlug,
        entity_type: formData.entityType
      }, formData.primaryTable && { primary_table: formData.primaryTable }), formData.statusId && { status_id: formData.statusId }), formData.isAdminModule && { is_admin_module: formData.isAdminModule ? formData.isAdminModule : false }), formData.draftMode && { draft_mode: formData.draftMode ? formData.draftMode : false }), formData.associateTable && { associated_tables: this.prepareJSON(formData.associateTable, true) }), formData.queryInformation && { query_information: this.prepareJSON(formData.queryInformation, true) }), formData.reportInformation && { report_information: this.prepareJSON(formData.reportInformation, true) }), formData.formInformation && { form_information: this.prepareJSON(formData.formInformation, true) }), formData.addQueryInformation && { add_query_information: this.prepareJSON(formData.addQueryInformation, true) }), formData.editQueryInformation && { edit_query_information: this.prepareJSON(formData.editQueryInformation, true) }), formData.presetQueryInformation && { preset_query_information: this.prepareJSON(formData.presetQueryInformation, true) }), formData.staticPageContent && { static_page_content: formData.staticPageContent }), formData.wizardType && { dashboard_wizard_type: formData.wizardType }), formData.reportType && { report_type: formData.reportType }), formData.wizardGroup && { dashboard_wizard_group_id: formData.wizardGroup }), formData.export_template_id && { export_template_id: formData.export_template_id }), formData.dashboard_wizard_rows && { dashboard_wizard_rows: formData.dashboard_wizard_rows }), formData.dashboard_wizard_columns && { dashboard_wizard_columns: formData.dashboard_wizard_columns }), formData.dashboard_wizard_order_no && { dashboard_wizard_order_no: formData.dashboard_wizard_order_no }), formData.dashboard_wizard_options && { dashboard_wizard_options: this.prepareJSON(formData.dashboard_wizard_options, true) })
    ];
    const permissions = formData.permissions.map((action_type_name, pindex) => ({
      entity_id: "@table1.id",
      name: action_type_name,
      slug: `${action_type_name}_${entitySlug}`,
      order_no: pindex + 1,
      status_id: commonConfig.STATUS.ACTIVE
    }));
    const itemsArray = this.form.get("items");
    if (itemsArray && itemsArray.length > 0) {
      const items = itemsArray.controls.map((control) => {
        const linkActionValue = control.value.linkAction;
        let link_mode = "none";
        if (control.value.linkType === "component") {
          const entity = this.masterEntities.find((e) => e.value === linkActionValue);
          if (entity) {
            if (entity.entity_type === "static_page_builder_module") {
              link_mode = "popup_details";
            } else if (entity.entity_type === "form_builder_module") {
              link_mode = "popup_edit";
            } else if (entity.entity_type === "grid_builder_module") {
              link_mode = "child_grid";
            }
          }
        }
        return {
          master_grid_id: "@table1.id",
          field_name: control.value.fieldName,
          display_name: control.value.displayName,
          order_no: control.value.orderNo,
          is_grid_column: control.value.isGridColumn,
          is_searchable: control.value.isSearchable,
          clause_type: control.value.clauseType || "where",
          is_sortable: control.value.isSortable,
          field_type_id: control.value.fieldType,
          link_type: control.value.linkType,
          link_action: control.value.linkAction,
          link_mode
        };
      });
      this.insert_json_schema.data["table3"] = items;
    }
    this.insert_json_schema.data["table1"] = master;
    this.insert_json_schema.data["table2"] = permissions;
    return this.insert_json_schema;
  }
  getEditParams(formData, id) {
    const master = [
      __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({
        name: formData.name,
        entity_type: formData.entityType
      }, formData.primaryTable ? { primary_table: formData.primaryTable } : { primary_table: null }), formData.statusId ? { status_id: formData.statusId } : { status_id: null }), formData.isAdminModule ? { is_admin_module: formData.isAdminModule } : { is_admin_module: false }), formData.draftMode ? { draft_mode: formData.draftMode } : { draft_mode: false }), formData.associateTable ? { associated_tables: this.prepareJSON(formData.associateTable, true) } : { associated_tables: null }), formData.queryInformation ? { query_information: this.prepareJSON(formData.queryInformation, true) } : { query_information: null }), formData.reportInformation ? { report_information: this.prepareJSON(formData.reportInformation, true) } : { report_information: null }), formData.formInformation ? { form_information: this.prepareJSON(formData.formInformation, true) } : { form_information: null }), formData.addQueryInformation ? { add_query_information: this.prepareJSON(formData.addQueryInformation, true) } : { add_query_information: null }), formData.editQueryInformation ? { edit_query_information: this.prepareJSON(formData.editQueryInformation, true) } : { edit_query_information: null }), formData.presetQueryInformation ? { preset_query_information: this.prepareJSON(formData.presetQueryInformation, true) } : { preset_query_information: null }), formData.staticPageContent ? { static_page_content: formData.staticPageContent } : { static_page_content: null }), formData.wizardType ? { dashboard_wizard_type: formData.wizardType } : { dashboard_wizard_type: null }), formData?.reportType ? { report_type: formData.reportType } : { report_type: this.commonConfig.REPORT_TYPES.LCP }), formData.wizardGroup ? { dashboard_wizard_group_id: formData.wizardGroup } : { dashboard_wizard_group_id: null }), formData.export_template_id ? { export_template_id: formData.export_template_id } : { export_template_id: null }), formData.dashboard_wizard_rows ? { dashboard_wizard_rows: formData.dashboard_wizard_rows } : { dashboard_wizard_rows: null }), formData.dashboard_wizard_columns ? { dashboard_wizard_columns: formData.dashboard_wizard_columns } : { dashboard_wizard_columns: null }), formData.dashboard_wizard_order_no ? { dashboard_wizard_order_no: formData.dashboard_wizard_order_no } : { dashboard_wizard_order_no: null }), formData.dashboard_wizard_options ? { dashboard_wizard_options: this.prepareJSON(formData.dashboard_wizard_options, true) } : { dashboard_wizard_options: null })
    ];
    this.update_json_schema.data["table1"] = master;
    this.update_json_schema.conditions["table1"] = [{ uuid: id }];
    this.update_json_schema.conditions["table2"] = [{ master_grid_id: "@table1.id" }];
    const itemsArray = this.form.get("items");
    if (itemsArray && itemsArray.length > 0) {
      const items = itemsArray.controls.map((control) => {
        const linkActionValue = control.value.linkAction;
        let link_mode = "none";
        if (control.value.linkType === "component") {
          const entity = this.masterEntities.find((e) => e.value === linkActionValue);
          if (entity) {
            if (entity.entity_type === "static_page_builder_module") {
              link_mode = "popup_details";
            } else if (entity.entity_type === "form_builder_module") {
              link_mode = "popup_edit";
            } else if (entity.entity_type === "grid_builder_module") {
              link_mode = "child_grid";
            }
          }
        }
        return {
          master_grid_id: "@table1.id",
          field_name: control.value.fieldName,
          display_name: control.value.displayName,
          order_no: control.value.orderNo,
          is_grid_column: control.value.isGridColumn,
          is_searchable: control.value.isSearchable,
          clause_type: control.value.clauseType || "where",
          is_sortable: control.value.isSortable,
          field_type_id: control.value.fieldType,
          link_type: control.value.linkType,
          link_action: control.value.linkAction,
          link_mode
        };
      });
      this.update_json_schema.data["table3"] = items;
    }
    let newly_added_items = formData.permissions.filter((item) => !this.existing_actions.includes(item)).map((action_type_name) => ({
      entity_id: "@table1.id",
      name: action_type_name,
      slug: `${action_type_name}_${formData.entityName}`,
      order_no: "1",
      status_id: "1"
    }));
    let removable_items = this.existing_actions.filter((item) => !formData.permissions.includes(item)).map((action_type_name) => ({
      entity_id: "@table1.id",
      name: action_type_name
    }));
    this.update_json_schema.conditions["table4"] = removable_items;
    this.update_json_schema.data["table5"] = newly_added_items;
    return this.update_json_schema;
  }
  // prepareJSON(data: any): string {
  //   return JSON.stringify(JSON.parse(data));
  // }
  prepareJSON(data, replace_param = false) {
    try {
      const parsedData = JSON.parse(data);
      let jsonString = JSON.stringify(parsedData);
      if (replace_param) {
        jsonString = jsonString.replace(/@table/g, "##table").replace(/{{{/g, "{#{").replace(/}}}/g, "}#}");
      }
      return jsonString;
    } catch (error) {
      console.error("Error preparing JSON:", error);
      throw new Error("Invalid JSON input");
    }
  }
  prettyJSON(data) {
    return JSON.stringify(JSON.parse(JSON.stringify(data)), null, 2);
  }
  onSubmit() {
    this.submitted = true;
    const formData = this.form.value;
    const payload = this.id ? this.getEditParams(formData, this.id) : this.getAddParams(formData);
    this.gridApiService.executeRecords(payload).subscribe((response) => {
      if (response.status && response.code === 200) {
        let key;
        if (this.id) {
          key = "record_updated_successfully";
        } else {
          key = "record_inserted_successfully";
        }
        const successMessage = this.translate.instant(key);
        this.toastr.success(successMessage);
        this.router.navigate([this.redirect_url]);
      } else {
        const key = response.message;
        const errorMessage = this.translate.instant(key);
        this.toastr.error(errorMessage, "Error");
      }
    }, (error) => {
      const key = "error";
      const errorMessage = this.translate.instant(key);
      this.toastr.error(errorMessage, "Error");
    });
  }
  isFieldInvalid(fieldName) {
    const field = this.form.get(fieldName);
    return field ? field.invalid && (field.touched || this.submitted) : false;
  }
  isFormInvalid() {
    return this.form.invalid || this.form.value.entityType === commonConfig.ENTITY_TYPES.GRID_BUILDER_MODULE && this.itemsControls.length === 0;
  }
  logFormStatus() {
    Object.keys(this.form.controls).forEach((field) => {
      const control = this.form.get(field);
      if (control) {
        console.log(`Field: ${field}, Status: ${control.status}, Errors: ${JSON.stringify(control.errors)}`);
      }
    });
  }
  getErrorMessage(fieldName) {
    const field = this.form.get(fieldName);
    if (field) {
      if (field.hasError("required")) {
        return "required_message";
      }
      if (field.hasError("maxlength")) {
        return `Maximum length exceeded (${field.errors?.["maxlength"].requiredLength} characters allowed)`;
      }
      if (field.hasError("min")) {
        return `Minimum value is ${field.errors?.["min"].min}`;
      }
      if (field.hasError("viewMandatory")) {
        return '"view" option is mandatory';
      }
    }
    return "";
  }
  isItemFieldInvalid(index, fieldName) {
    const items = this.form.get("items");
    const field = items.at(index).get(fieldName);
    return field ? field.invalid && (field.touched || this.submitted) : false;
  }
  getItemErrorMessage(index, fieldName) {
    const items = this.form.get("items");
    const field = items.at(index).get(fieldName);
    if (field) {
      if (field.hasError("required")) {
        return "required_message";
      }
      if (field.hasError("maxlength")) {
        return `Maximum length exceeded (${field.errors?.["maxlength"].requiredLength} characters allowed)`;
      }
      if (field.hasError("min")) {
        return `Minimum value is ${field.errors?.["min"].min}`;
      }
    }
    return "";
  }
  openInfoPopUp(popup) {
    this.isInfoModalOpen = true;
    this.popupName = popup;
    this.selectedInfoTab = 0;
    this.popupInformation = {
      header: this.infoContents[this.popupName].header,
      tabNames: this.infoContents[this.popupName].examples.map((example) => example.name),
      data: JSON.stringify(this.infoContents[this.popupName].examples[this.selectedInfoTab].data, null, 2)
    };
  }
  closeInfoPopUp() {
    this.isInfoModalOpen = false;
    this.popupInformation = null;
  }
  // Copy content from Monaco Editor
  copyToClipboard() {
    navigator.clipboard.writeText(this.popupInformation.data).then(() => {
      this.copied = true;
      setTimeout(() => this.copied = false, 3e3);
    }).catch((err) => console.error("Failed to copy:", err));
  }
  // Function to switch tabs
  selectTab(index) {
    this.selectedInfoTab = index;
    this.popupInformation = __spreadProps(__spreadValues({}, this.popupInformation), {
      data: JSON.stringify(this.infoContents[this.popupName].examples[this.selectedInfoTab].data, null, 2)
    });
  }
  fetchAllMasterEntities() {
    const params = {
      company_id: 1,
      print_query: false,
      primary_table: "master_entities",
      start_index: 0,
      limit_range: 1e3,
      sort_columns: [["master_entities.id", "desc"]],
      select_columns: [
        ["master_entities.entity_name", "value"],
        ["master_entities.name", "label"],
        ["master_entities.entity_type", "entity_type"]
      ]
    };
    this.gridApiService.getAllList(params).subscribe((response) => {
      if (response.status && response.code === 200) {
        this.masterEntities = response.data.records.filter((entity) => entity.entity_type === "static_page_builder_module" || entity.entity_type === "form_builder_module");
        this.masterEntitiesForChildProcess = response.data.records.filter((entity) => entity.entity_type === this.commonConfig.ENTITY_TYPES.GRID_BUILDER_MODULE);
      }
    }, (error) => {
      const key = "error";
      const errorMessage = this.translate.instant(key);
      this.toastr.error(errorMessage, "Error");
    });
  }
  setupLinkModeAutoUpdate(group, initialLinkAction) {
    const linkTypeControl = group.get("linkType");
    const linkActionControl = group.get("linkAction");
    group._linkMode = "none";
    const setLinkMode = (entityName) => {
      const type = linkTypeControl?.value;
      let entity;
      if (type === "component") {
        entity = this.masterEntities.find((e) => e.value === entityName);
      } else if (type === "child_grid") {
        entity = this.masterEntitiesForChildProcess.find((e) => e.value === entityName);
      }
      if (entity) {
        if (entity.entity_type === "static_page_builder_module") {
          group._linkMode = "popup_details";
        } else if (entity.entity_type === "form_builder_module") {
          group._linkMode = "popup_edit";
        } else {
          group._linkMode = "none";
        }
      } else {
        group._linkMode = "none";
      }
    };
    if (initialLinkAction) {
      setLinkMode(initialLinkAction);
    }
    linkActionControl?.valueChanges.subscribe((entityName) => {
      if (linkTypeControl?.value === "component" || linkTypeControl?.value === "child_grid") {
        setLinkMode(entityName);
      } else {
        group._linkMode = "none";
      }
    });
    linkTypeControl?.valueChanges.subscribe((type) => {
      if (type !== "component" && type !== "child_grid") {
        group._linkMode = "none";
      } else {
        setLinkMode(linkActionControl?.value);
      }
    });
  }
};
_MasterEntityComponent.\u0275fac = function MasterEntityComponent_Factory(t) {
  return new (t || _MasterEntityComponent)(\u0275\u0275directiveInject(FormBuilder), \u0275\u0275directiveInject(GridApiService), \u0275\u0275directiveInject(ToastrService), \u0275\u0275directiveInject(ActivatedRoute), \u0275\u0275directiveInject(Router), \u0275\u0275directiveInject(LocalStorageService), \u0275\u0275directiveInject(Store), \u0275\u0275directiveInject(Location), \u0275\u0275directiveInject(TranslateService), \u0275\u0275directiveInject(Title));
};
_MasterEntityComponent.\u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ type: _MasterEntityComponent, selectors: [["app-add-master-entity"]], viewQuery: function MasterEntityComponent_Query(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275viewQuery(_c0, 5);
  }
  if (rf & 2) {
    let _t;
    \u0275\u0275queryRefresh(_t = \u0275\u0275loadQuery()) && (ctx.monacoEditor = _t.first);
  }
}, standalone: true, features: [\u0275\u0275StandaloneFeature], decls: 84, vars: 88, consts: [[3, "formGroup"], [1, "panel"], [1, "flex", "flex-wrap", "justify-between"], [1, "text-md", "font-bold", "uppercase"], [1, "relative", "inline-flex", "align-middle"], ["appDynamicFontSize", "body", "type", "button", 1, "btn", "btn-danger", "mr-5", "ltr:rounded-r", "rtl:rounded-l", 3, "click"], ["appDynamicFontSize", "body", "type", "button", 1, "btn", "btn-outline-secondary", "ltr:rounded-r", "rtl:rounded-l", 3, "click", "disabled"], [1, "my-3", "border-[#e0e6ed]", "dark:border-[#1b2e4b]"], [1, "mt-2"], [1, "flex", "flex-col", "justify-between"], [1, "grid", "grid-cols-1", "gap-2", 3, "ngClass"], [1, "mt-0"], ["for", "name", 1, "required-mark", "mb-2", "block", "font-medium"], ["id", "name", "type", "text", "formControlName", "name", "appDynamicFontSize", "body", 1, "form-input", "w-full", 3, "placeholder", "ngClass"], ["class", "invalid-feedback mt-1 text-danger", 4, "ngIf"], ["for", "entityType", 1, "required-mark", "mb-2", "block", "font-medium"], ["id", "entityType", "formControlName", "entityType", "appDynamicFontSize", "body", 1, "form-select", "w-full", 3, "ngClass"], ["value", ""], [4, "ngFor", "ngForOf"], ["for", "permissions", 1, "required-mark", "mb-2", "block", "font-medium"], ["id", "permissions", "formControlName", "permissions", "appDynamicFontSize", "body", "placeholder", "Select an option", 1, "custom-multiselect", 3, "multiple", "clearable", "ngClass"], [3, "value"], [4, "ngIf"], ["for", "statusId", 1, "required-mark", "mb-2", "block", "font-medium"], [1, "flex", "items-center", "space-x-4"], [1, "flex", "cursor-pointer", "items-center"], ["type", "radio", "formControlName", "statusId", "appDynamicFontSize", "body", 1, "form-radio", 3, "value"], [1, "ml-2", "text-white-dark"], ["for", "isAdminModule", 1, "required-mark", "mb-2", "block", "font-medium"], ["type", "radio", "formControlName", "isAdminModule", "appDynamicFontSize", "body", 1, "form-radio", 3, "value"], ["class", "fixed inset-0 z-50 overflow-y-auto", 4, "ngIf"], [1, "invalid-feedback", "mt-1", "text-danger"], ["for", "export_templates", 1, "required-mark", "mb-2", "block", "font-medium"], [1, "mt-1.5", "flex", "items-center", "space-x-2"], ["id", "export_templates", "formControlName", "export_template_id", "appDynamicFontSize", "body", 1, "custom-multiselect", "min-w-[200px]", "flex-grow", 3, "clearable", "placeholder", "ngClass"], ["for", "primaryTable", 1, "required-mark", "mb-2", "block", "font-medium"], ["id", "primaryTable", "formControlName", "primaryTable", "appDynamicFontSize", "body", 1, "form-select", "w-full", 3, "ngClass"], ["for", "draftMode", 1, "required-mark", "mb-2", "block", "font-medium"], ["type", "radio", "formControlName", "draftMode", "appDynamicFontSize", "body", 1, "form-radio", 3, "value"], ["for", "", 1, "required-mark", "mb-2", "block", "font-medium"], ["id", "reportType", "formControlName", "reportType", "appDynamicFontSize", "body", 1, "form-select", "w-full", 3, "ngClass"], ["class", "mt-0", 4, "ngIf"], ["for", "wizardGroup", 1, "required-mark", "mb-2", "block", "font-medium"], ["id", "wizardGroup", "formControlName", "wizardGroup", "appDynamicFontSize", "body", 1, "custom-multiselect", "min-w-[90px]", "flex-grow", 3, "clearable", "placeholder", "ngClass"], ["aria-expanded", "true", "aria-haspopup", "true", "type", "button", "appDynamicFontSize", "body", 1, "btn-primary", "flex", "items-center", "rounded-md", "border", "border-[#e0e6ed]", "px-4", "py-2", "font-semibold", "dark:border-[#253b5c]", "dark:bg-[#1b2e4b]", "dark:text-white-dark", 3, "click"], [1, "fas", "fa-plus", "fa-xl"], ["aria-labelledby", "options-menu", "aria-orientation", "vertical", "class", "advancedfiltercontainer absolute z-10 mt-2 origin-top-left divide-y divide-gray-100 rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5", "role", "menu", 4, "ngIf"], ["for", "dashboard_wizard_rows", 1, "required-mark", "mb-2", "block", "font-medium"], ["id", "dashboard_wizard_rows", "type", "number", "formControlName", "dashboard_wizard_rows", "appDynamicFontSize", "body", 1, "form-input", "w-full", 3, "placeholder", "ngClass"], ["for", "dashboard_wizard_columns", 1, "required-mark", "mb-2", "block", "font-medium"], ["id", "dashboard_wizard_columns", "type", "number", "formControlName", "dashboard_wizard_columns", "appDynamicFontSize", "body", 1, "form-input", "w-full", 3, "placeholder", "ngClass"], ["for", "dashboard_wizard_order_no", 1, "required-mark", "mb-2", "block", "font-medium"], ["id", "dashboard_wizard_order_no", "type", "number", "formControlName", "dashboard_wizard_order_no", "appDynamicFontSize", "body", "step", "0.01", "min", "0.01", 1, "form-input", "w-full", 3, "placeholder", "ngClass"], ["for", "wizardType", 1, "required-mark", "mb-2", "block", "font-medium"], ["id", "wizardType", "formControlName", "wizardType", "appDynamicFontSize", "body", 1, "form-select", "w-full", 3, "ngClass"], ["aria-labelledby", "options-menu", "aria-orientation", "vertical", "role", "menu", 1, "advancedfiltercontainer", "absolute", "z-10", "mt-2", "origin-top-left", "divide-y", "divide-gray-100", "rounded-md", "bg-white", "shadow-lg", "ring-1", "ring-black", "ring-opacity-5"], [3, "ngSubmit", "formGroup"], [1, "flex", "items-center", "justify-between", "border-b", "border-gray-200", "p-4"], [1, "flex", "items-center", "gap-4"], ["type", "button", 1, "close", 3, "click"], ["aria-hidden", "true"], ["appearance", "compact", 1, "relative", "!h-[calc(40vh-40px)]"], [1, "space-y-2", "p-4"], [1, "form-group"], ["for", "newWizardGroupName"], ["type", "text", "id", "newWizardGroupName", "formControlName", "name", 1, "form-input", 3, "ngClass"], ["class", "invalid-feedback", 4, "ngIf"], [1, "flex", "items-center", "justify-between", "border-t", "border-gray-200", "p-4"], ["type", "button", "appDynamicFontSize", "body", 1, "btn", "btn-secondary", "mr-3", "ltr:rounded-r", "rtl:rounded-l", 3, "click"], ["type", "submit", "appDynamicFontSize", "body", 1, "btn", "btn-primary", 3, "disabled"], [1, "invalid-feedback"], [1, "grid", "grid-cols-1", "gap-2", "md:grid-cols-2"], [1, "mt-3"], [1, "flex", "flex-row", "gap-3"], ["for", "queryInformation", 1, "mb-2", "block", "font-medium"], [1, "fas", "fa-circle-info", "fa-lg", "cursor-pointer", "!leading-none", 3, "click"], ["appDynamicFontSize", "body", 1, "monaco-editor-container"], ["monacoEditor", "", "id", "queryInformation", "formControlName", "queryInformation", 1, "monaco-editor", 3, "options"], ["class", "mt-3", 4, "ngIf"], ["for", "dashboard_wizard_options", 1, "mb-2", "block", "font-medium"], ["monacoEditor", "", "id", "dashboard_wizard_options", "formControlName", "dashboard_wizard_options", 1, "monaco-editor", 3, "options"], ["for", "staticPageContent", 1, "mb-2", "block", "font-medium"], ["monacoEditor", "", "id", "staticPageContent", "formControlName", "staticPageContent", 1, "monaco-editor", 3, "options"], [1, "grid", "grid-cols-1", "gap-2", "md:grid-cols-1"], ["for", "reportInformation", 1, "mb-2", "block", "font-medium"], ["monacoEditor", "", "id", "reportInformation", "formControlName", "reportInformation", 1, "monaco-editor", 3, "options"], ["for", "associateTable", 1, "mb-2", "block", "font-medium"], ["monacoEditor", "", "id", "associateTable", "formControlName", "associateTable", 1, "monaco-editor", 3, "options"], [1, "mt-5"], ["for", "formInformation", 1, "mb-2", "block", "font-medium"], ["id", "formInformation", "formControlName", "formInformation", 1, "monaco-editor", 3, "options"], ["aria-hidden", "true", 1, "ml-2", "cursor-pointer", 3, "click", "ngClass"], ["id", "queryInformation", "formControlName", "queryInformation", 1, "monaco-editor", 3, "options"], ["for", "addQueryInformation", 1, "mb-2", "block", "font-medium"], ["id", "addQueryInformation", "formControlName", "addQueryInformation", 1, "monaco-editor", 3, "options"], ["for", "editQueryInformation", 1, "mb-2", "block", "font-medium"], ["id", "editQueryInformation", "formControlName", "editQueryInformation", 1, "monaco-editor", 3, "options"], ["for", "presetQueryInformation", 1, "mb-2", "block", "font-medium"], ["id", "presetQueryInformation", "formControlName", "presetQueryInformation", 1, "monaco-editor", 3, "options"], [1, "mt-5", "flex", "flex-wrap", "justify-between"], [1, "text-md", "required-mark", "font-bold"], ["type", "button", 1, "btn", "btn-outline-secondary", "ltr:rounded-r", "rtl:rounded-l", 3, "click"], [1, "fa-solid", "fa-plus"], [1, "table-responsive"], [1, "required-mark", "w-2/12"], [1, "required-mark", "w-1/16"], [1, "w-1/16"], [1, "w-1/12"], [1, "w-2/12"], [1, "w-3/12"], ["formArrayName", "items"], [3, "formGroupName", 4, "ngFor", "ngForOf"], ["colspan", "11", 1, "!text-center", "font-semibold"], [3, "formGroupName"], [1, "align-top"], [1, "mb-2"], ["type", "text", "formControlName", "fieldName", "appDynamicFontSize", "body", 1, "form-input", "w-full", 3, "id", "placeholder", "ngClass"], ["class", "invalid-feedback text-danger", 4, "ngIf"], [1, "w-2/16"], ["type", "text", "formControlName", "displayName", "appDynamicFontSize", "body", 1, "form-input", "w-full", 3, "keydown", "id", "placeholder", "ngClass"], ["type", "number", "formControlName", "orderNo", "appDynamicFontSize", "body", 1, "form-input", "w-full", 3, "id", "placeholder", "ngClass"], ["formControlName", "isGridColumn", "appDynamicFontSize", "body", 1, "form-select", "w-full", 3, "id", "ngClass"], ["value", "", "selected", "", "disabled", ""], ["value", "true"], ["value", "false"], ["formControlName", "isSearchable", "appDynamicFontSize", "body", 1, "form-select", "w-full", 3, "id", "ngClass"], ["formControlName", "clauseType", "appDynamicFontSize", "body", 1, "form-select", "w-full", 3, "id", "ngClass"], ["value", "where"], ["value", "having"], ["formControlName", "isSortable", "appDynamicFontSize", "body", 1, "form-select", "w-full", 3, "id", "ngClass"], ["formControlName", "fieldType", "appDynamicFontSize", "body", 1, "form-select", "w-full", 3, "id", "ngClass"], ["formControlName", "linkType", "appDynamicFontSize", "body", 1, "form-select", "w-full", 3, "id", "ngClass"], ["value", "none"], ["value", "component"], ["value", "child_grid"], ["value", "url"], [3, "ngSwitch"], ["formControlName", "linkAction", "appDynamicFontSize", "body", "class", "form-select w-full", 3, "id", "ngClass", 4, "ngSwitchCase"], ["type", "text", "formControlName", "linkAction", "appDynamicFontSize", "body", "class", "form-input w-full", 3, "id", "placeholder", "ngClass", 4, "ngSwitchCase"], [4, "ngSwitchDefault"], ["type", "button", 3, "click"], [1, "fa-solid", "fa-xmark", "text-xl"], [1, "invalid-feedback", "text-danger"], ["formControlName", "linkAction", "appDynamicFontSize", "body", 1, "form-select", "w-full", 3, "id", "ngClass"], ["type", "text", "formControlName", "linkAction", "appDynamicFontSize", "body", 1, "form-input", "w-full", 3, "id", "placeholder", "ngClass"], [1, "fixed", "inset-0", "z-50", "overflow-y-auto"], [1, "fixed", "inset-0", "bg-black/50", "transition-opacity", "dark:bg-black/70"], [1, "flex", "min-h-screen", "items-center", "justify-center", "p-2", "sm:p-4"], [1, "max-w-auto", "relative", "w-10/12", "transform", "overflow-hidden", "rounded-lg", "bg-white", "shadow-xl", "transition-all", "dark:border", "dark:border-gray-700", "dark:bg-gray-800", "sm:w-8/12"], [1, "border-b", "bg-gray-50", "px-4", "py-3", "dark:border-gray-700", "dark:bg-gray-900", "sm:px-6"], [1, "flex", "items-center", "justify-between"], [1, "flex", "gap-4"], ["appDynamicFontSize", "body", 1, "text-md", "font-bold"], [1, "close-btn", 3, "click"], [1, "sr-only"], [1, "fa-solid", "fa-xmark"], [1, "max-h-auto", "gap-5", "overflow-y-auto", "px-4", "py-4", "sm:px-6"], [1, "flex", "flex-wrap", "border-b", "border-white-light", "dark:border-[#191e3a]"], [1, "px-4", "sm:px-6"], [1, "flex", "list-disc", "flex-col", "gap-3"], [1, "relative"], ["class", "absolute right-5 top-3 z-50 rounded bg-green-700 px-3 py-1 text-sm text-white hover:bg-green-600", 4, "ngIf"], [1, "monaco-editor-container", ".editor-container", "mt-3", "rounded", "border", "border-gray-300"], ["monacoEditor", "", "id", "popupInformation", 1, "monaco-editor", 3, "click", "ngModelChange", "options", "ngModel"], [1, "editor-overlay", 3, "click"], [1, "-mb-[1px]", "block", "border", "border-transparent", "p-3.5", "py-2", "!outline-none", "transition", "duration-300", "hover:text-primary", "dark:hover:border-b-black", 3, "click", "ngClass"], [1, "flex", "items-center", "gap-2"], ["appDynamicFontSize", "body", 1, "text-sm"], [1, "absolute", "right-5", "top-3", "z-50", "rounded", "bg-green-700", "px-3", "py-1", "text-sm", "text-white", "hover:bg-green-600"]], template: function MasterEntityComponent_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 0)(1, "div", 1)(2, "div", 2)(3, "div", 3);
    \u0275\u0275text(4);
    \u0275\u0275pipe(5, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(6, "div", 4)(7, "button", 5);
    \u0275\u0275listener("click", function MasterEntityComponent_Template_button_click_7_listener() {
      return ctx.location.back();
    });
    \u0275\u0275text(8);
    \u0275\u0275pipe(9, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(10, "button", 6);
    \u0275\u0275listener("click", function MasterEntityComponent_Template_button_click_10_listener() {
      return ctx.onSubmit();
    });
    \u0275\u0275text(11);
    \u0275\u0275pipe(12, "translate");
    \u0275\u0275elementEnd()()();
    \u0275\u0275element(13, "hr", 7);
    \u0275\u0275elementStart(14, "div", 8)(15, "div", 9)(16, "div", 10)(17, "div", 11)(18, "label", 12);
    \u0275\u0275text(19);
    \u0275\u0275pipe(20, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275element(21, "input", 13);
    \u0275\u0275pipe(22, "translate");
    \u0275\u0275template(23, MasterEntityComponent_div_23_Template, 2, 1, "div", 14);
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(24, "div", 11)(25, "label", 15);
    \u0275\u0275text(26);
    \u0275\u0275pipe(27, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(28, "select", 16)(29, "option", 17);
    \u0275\u0275text(30);
    \u0275\u0275pipe(31, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275template(32, MasterEntityComponent_ng_container_32_Template, 3, 2, "ng-container", 18);
    \u0275\u0275elementEnd();
    \u0275\u0275template(33, MasterEntityComponent_div_33_Template, 2, 1, "div", 14);
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(34, "div", 11)(35, "label", 19);
    \u0275\u0275text(36);
    \u0275\u0275pipe(37, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(38, "ng-select", 20);
    \u0275\u0275repeaterCreate(39, MasterEntityComponent_For_40_Template, 3, 4, "ng-option", 21, _forTrack0);
    \u0275\u0275elementEnd();
    \u0275\u0275template(41, MasterEntityComponent_div_41_Template, 2, 1, "div", 14);
    \u0275\u0275elementEnd();
    \u0275\u0275template(42, MasterEntityComponent_ng_container_42_Template, 13, 13, "ng-container", 22)(43, MasterEntityComponent_ng_container_43_Template, 11, 11, "ng-container", 22);
    \u0275\u0275elementStart(44, "div", 11)(45, "label", 23);
    \u0275\u0275text(46);
    \u0275\u0275pipe(47, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(48, "div", 24)(49, "label", 25);
    \u0275\u0275element(50, "input", 26);
    \u0275\u0275elementStart(51, "span", 27);
    \u0275\u0275text(52);
    \u0275\u0275pipe(53, "translate");
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(54, "label", 25);
    \u0275\u0275element(55, "input", 26);
    \u0275\u0275elementStart(56, "span", 27);
    \u0275\u0275text(57);
    \u0275\u0275pipe(58, "translate");
    \u0275\u0275elementEnd()()();
    \u0275\u0275template(59, MasterEntityComponent_div_59_Template, 2, 1, "div", 14);
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(60, "div", 11)(61, "label", 28);
    \u0275\u0275text(62);
    \u0275\u0275pipe(63, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(64, "div", 24)(65, "label", 25);
    \u0275\u0275element(66, "input", 29);
    \u0275\u0275elementStart(67, "span", 27);
    \u0275\u0275text(68);
    \u0275\u0275pipe(69, "translate");
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(70, "label", 25);
    \u0275\u0275element(71, "input", 29);
    \u0275\u0275elementStart(72, "span", 27);
    \u0275\u0275text(73);
    \u0275\u0275pipe(74, "translate");
    \u0275\u0275elementEnd()()();
    \u0275\u0275template(75, MasterEntityComponent_div_75_Template, 2, 1, "div", 14);
    \u0275\u0275elementEnd();
    \u0275\u0275template(76, MasterEntityComponent_ng_container_76_Template, 17, 12, "ng-container", 22)(77, MasterEntityComponent_ng_container_77_Template, 47, 54, "ng-container", 22);
    \u0275\u0275elementEnd();
    \u0275\u0275template(78, MasterEntityComponent_ng_container_78_Template, 13, 13, "ng-container", 22)(79, MasterEntityComponent_ng_container_79_Template, 11, 5, "ng-container", 22)(80, MasterEntityComponent_ng_container_80_Template, 12, 13, "ng-container", 22)(81, MasterEntityComponent_ng_container_81_Template, 44, 14, "ng-container", 22);
    \u0275\u0275elementEnd()();
    \u0275\u0275template(82, MasterEntityComponent_ng_container_82_Template, 51, 38, "ng-container", 22);
    \u0275\u0275elementEnd()();
    \u0275\u0275template(83, MasterEntityComponent_div_83_Template, 25, 8, "div", 30);
  }
  if (rf & 2) {
    let tmp_5_0;
    let tmp_21_0;
    let tmp_22_0;
    let tmp_35_0;
    let tmp_36_0;
    let tmp_37_0;
    let tmp_38_0;
    let tmp_39_0;
    let tmp_40_0;
    let tmp_41_0;
    \u0275\u0275property("formGroup", ctx.form);
    \u0275\u0275advance(4);
    \u0275\u0275textInterpolate(ctx.editTitle ? "title_edit_entity" : \u0275\u0275pipeBind1(5, 42, "title_add_entity"));
    \u0275\u0275advance(4);
    \u0275\u0275textInterpolate1(" ", \u0275\u0275pipeBind1(9, 44, "back"), " ");
    \u0275\u0275advance(2);
    \u0275\u0275property("disabled", ctx.isFormInvalid());
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", \u0275\u0275pipeBind1(12, 46, "submit"), " ");
    \u0275\u0275advance(5);
    \u0275\u0275property("ngClass", \u0275\u0275pureFunction2(76, _c2, \u0275\u0275pureFunction2(70, _c1, ctx.commonConfig.ENTITY_TYPES.GRID_BUILDER_MODULE, ctx.commonConfig.ENTITY_TYPES.DASHBOARD_WIZARD_BUILDER_MODULE).includes((tmp_5_0 = ctx.form.get("entityType")) == null ? null : tmp_5_0.value), !\u0275\u0275pureFunction2(73, _c1, ctx.commonConfig.ENTITY_TYPES.GRID_BUILDER_MODULE, ctx.commonConfig.ENTITY_TYPES.DASHBOARD_WIZARD_BUILDER_MODULE).includes((tmp_5_0 = ctx.form.get("entityType")) == null ? null : tmp_5_0.value)));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(20, 48, "form_label_name"));
    \u0275\u0275advance(2);
    \u0275\u0275propertyInterpolate("placeholder", \u0275\u0275pipeBind1(22, 50, "form_label_name_placeholder"));
    \u0275\u0275property("ngClass", \u0275\u0275pureFunction1(79, _c3, ctx.isFieldInvalid("name")));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngIf", ctx.isFieldInvalid("name"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(27, 52, "form_label_entity_type"));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngClass", \u0275\u0275pureFunction1(81, _c3, ctx.isFieldInvalid("entityType")));
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(31, 54, "form_label_entity_type_dropdown"));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngForOf", ctx.entity_types);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx.isFieldInvalid("entityType"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(37, 56, "form_label_permissions"));
    \u0275\u0275advance(2);
    \u0275\u0275property("multiple", true)("clearable", false)("ngClass", \u0275\u0275pureFunction1(83, _c3, ctx.isFieldInvalid("permissions")));
    \u0275\u0275advance();
    \u0275\u0275repeater(ctx.action_types);
    \u0275\u0275advance(2);
    \u0275\u0275property("ngIf", ctx.isFieldInvalid("permissions"));
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ((tmp_21_0 = ctx.form.get("entityType")) == null ? null : tmp_21_0.value) === ctx.commonConfig.ENTITY_TYPES.EXPORT_MODULE);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ((tmp_22_0 = ctx.form.get("entityType")) == null ? null : tmp_22_0.value) === ctx.commonConfig.ENTITY_TYPES.GRID_BUILDER_MODULE);
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(47, 58, "form_label_status"));
    \u0275\u0275advance(4);
    \u0275\u0275property("value", 1);
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(53, 60, "table_status_val_0"));
    \u0275\u0275advance(3);
    \u0275\u0275property("value", 2);
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(58, 62, "table_status_val_1"));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngIf", ctx.isFieldInvalid("statusId"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(63, 64, "form_label_is_admin_module"));
    \u0275\u0275advance(4);
    \u0275\u0275property("value", true);
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(69, 66, "yes"));
    \u0275\u0275advance(3);
    \u0275\u0275property("value", false);
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(74, 68, "no"));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngIf", ctx.isFieldInvalid("isAdminModule"));
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ((tmp_35_0 = ctx.form.get("entityType")) == null ? null : tmp_35_0.value) === ctx.commonConfig.ENTITY_TYPES.FORM_BUILDER_MODULE);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ((tmp_36_0 = ctx.form.get("entityType")) == null ? null : tmp_36_0.value) === ctx.commonConfig.ENTITY_TYPES.DASHBOARD_WIZARD_BUILDER_MODULE);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx.commonConfig.ENTITY_TYPES.STATIC_PAGE_BUILDER_MODULE === ((tmp_37_0 = ctx.form.get("entityType")) == null ? null : tmp_37_0.value) || ctx.commonConfig.ENTITY_TYPES.DASHBOARD_WIZARD_BUILDER_MODULE === ((tmp_37_0 = ctx.form.get("entityType")) == null ? null : tmp_37_0.value) && ((tmp_37_0 = ctx.form.get("reportType")) == null ? null : tmp_37_0.value) === ctx.commonConfig.REPORT_TYPES.LCP);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx.commonConfig.ENTITY_TYPES.DASHBOARD_WIZARD_BUILDER_MODULE === ((tmp_38_0 = ctx.form.get("entityType")) == null ? null : tmp_38_0.value) && ((tmp_38_0 = ctx.form.get("reportType")) == null ? null : tmp_38_0.value) === ctx.commonConfig.REPORT_TYPES.POWERBI);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", \u0275\u0275pureFunction2(85, _c1, ctx.commonConfig.ENTITY_TYPES.GRID_BUILDER_MODULE, ctx.commonConfig.ENTITY_TYPES.JOB_BUILDER_MODULE).includes((tmp_39_0 = ctx.form.get("entityType")) == null ? null : tmp_39_0.value));
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ((tmp_40_0 = ctx.form.get("entityType")) == null ? null : tmp_40_0.value) === ctx.commonConfig.ENTITY_TYPES.FORM_BUILDER_MODULE);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ((tmp_41_0 = ctx.form.get("entityType")) == null ? null : tmp_41_0.value) === ctx.commonConfig.ENTITY_TYPES.GRID_BUILDER_MODULE);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx.isInfoModalOpen);
  }
}, dependencies: [CommonSharedModule, NgClass, NgForOf, NgIf, NgSwitch, NgSwitchCase, NgSwitchDefault, NgScrollbar, \u0275NgNoValidate, NgSelectOption, \u0275NgSelectMultipleOption, DefaultValueAccessor, NumberValueAccessor, SelectControlValueAccessor, RadioControlValueAccessor, NgControlStatus, NgControlStatusGroup, MinValidator, NgModel, NgSelectComponent, NgOptionComponent, DynamicFontSizeDirective, TranslatePipe, MonacoEditorModule, EditorComponent, ReactiveFormsModule, FormGroupDirective, FormControlName, FormGroupName, FormArrayName], styles: ["\n\n.monaco-editor-container[_ngcontent-%COMP%] {\n  display: flex;\n  flex-direction: column;\n  height: 50vh;\n  resize: vertical;\n  min-height: 60vh;\n  max-height: 100vh;\n}\n.monaco-editor[_ngcontent-%COMP%] {\n  flex: 1;\n  width: 100%;\n}\n.editor-container[_ngcontent-%COMP%] {\n  position: relative;\n}\n.editor-overlay[_ngcontent-%COMP%] {\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  overflow: auto;\n  cursor: pointer !important;\n  background: transparent;\n  pointer-events: none;\n}\n.monaco-editor[_ngcontent-%COMP%] {\n  cursor: pointer !important;\n}\n.monaco-editor[_ngcontent-%COMP%]   .view-line[_ngcontent-%COMP%] {\n  cursor: pointer !important;\n}\n/*# sourceMappingURL=master-entity.component.css.map */"], data: { animation: [
  trigger("toggleAnimation", [
    transition(":enter", [style({ opacity: 0, transform: "scale(0.95)" }), animate("100ms ease-out", style({ opacity: 1, transform: "scale(1)" }))]),
    transition(":leave", [animate("75ms", style({ opacity: 0, transform: "scale(0.95)" }))])
  ])
] } });
var MasterEntityComponent = _MasterEntityComponent;
(() => {
  (typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(MasterEntityComponent, { className: "MasterEntityComponent", filePath: "src\\app\\@lcp-framework\\pages\\master-entity\\master-entity.component.ts", lineNumber: 59 });
})();
export {
  MasterEntityComponent,
  viewMandatoryValidator
};
//# sourceMappingURL=chunk-WX2AW5GB.js.map
