import {
  LanguageService
} from "./chunk-RWHSBLZT.js";
import "./chunk-KV3IUGXW.js";
import "./chunk-TN2NHK56.js";
import "./chunk-TIV2UYBT.js";
import "./chunk-YWQICJL7.js";
import "./chunk-LAL7OD5G.js";
import "./chunk-BP5JJWGC.js";
import "./chunk-IAAODDF7.js";
import "./chunk-2XS6LH2E.js";
import "./chunk-FXJXZPYD.js";
import "./chunk-NFRJCL7R.js";
import "./chunk-62OL73TD.js";
import "./chunk-IGGXREIH.js";
import "./chunk-X5XWBDVM.js";
import {
  require_sweetalert2_all
} from "./chunk-KLTWPXW2.js";
import "./chunk-XKNDBYX7.js";
import {
  MenuMapService
} from "./chunk-3FLJCSSF.js";
import {
  ToastrService
} from "./chunk-2YLAF7RI.js";
import {
  CommonSharedModule,
  DynamicFontSizeDirective,
  NgScrollbar,
  NgxTippyDirective,
  Store
} from "./chunk-7NQGM4EA.js";
import {
  DefaultValueAccessor,
  FormArrayName,
  FormBuilder,
  FormGroupDirective,
  FormGroupName,
  NgControlStatus,
  NgControlStatusGroup,
  NgModel,
  NgSelectOption,
  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
} from "./chunk-P7K2QEDI.js";
import {
  NgClass,
  NgForOf,
  NgIf,
  NgSwitch,
  NgSwitchCase,
  NgSwitchDefault,
  Title,
  ɵsetClassDebugInfo,
  ɵɵStandaloneFeature,
  ɵɵadvance,
  ɵɵattribute,
  ɵɵdefineComponent,
  ɵɵdefinePipe,
  ɵɵdirectiveInject,
  ɵɵelement,
  ɵɵelementContainerEnd,
  ɵɵelementContainerStart,
  ɵɵelementEnd,
  ɵɵelementStart,
  ɵɵgetCurrentView,
  ɵɵlistener,
  ɵɵnamespaceHTML,
  ɵɵnamespaceSVG,
  ɵɵnextContext,
  ɵɵpipe,
  ɵɵpipeBind1,
  ɵɵproperty,
  ɵɵpropertyInterpolate,
  ɵɵpropertyInterpolate1,
  ɵɵpureFunction0,
  ɵɵpureFunction1,
  ɵɵresetView,
  ɵɵrestoreView,
  ɵɵtemplate,
  ɵɵtext,
  ɵɵtextInterpolate,
  ɵɵtextInterpolate1,
  ɵɵtwoWayBindingSet,
  ɵɵtwoWayListener,
  ɵɵtwoWayProperty
} from "./chunk-GKZIWABI.js";
import {
  __async,
  __spreadValues,
  __toESM
} from "./chunk-CVWHNZRK.js";

// src/app/@lcp-framework/pipes/search.pipe.ts
var _SearchPipe = class _SearchPipe {
  transform(items, searchTerm) {
    if (!items || !searchTerm) {
      return items;
    }
    searchTerm = searchTerm.toLowerCase();
    return items.filter((item) => item.value.key1.toLowerCase().includes(searchTerm));
  }
};
_SearchPipe.\u0275fac = function SearchPipe_Factory(t) {
  return new (t || _SearchPipe)();
};
_SearchPipe.\u0275pipe = /* @__PURE__ */ \u0275\u0275definePipe({ name: "search", type: _SearchPipe, pure: true, standalone: true });
var SearchPipe = _SearchPipe;

// src/app/@lcp-framework/pages/language-mapping/language-mapping.component.ts
var import_sweetalert2 = __toESM(require_sweetalert2_all());
var _c0 = () => ({ standalone: true });
var _c1 = (a0) => ({ "bg-blue-50": a0 });
function LanguageMappingComponent_button_13_Template(rf, ctx) {
  if (rf & 1) {
    const _r1 = \u0275\u0275getCurrentView();
    \u0275\u0275elementStart(0, "button", 41);
    \u0275\u0275pipe(1, "translate");
    \u0275\u0275listener("click", function LanguageMappingComponent_button_13_Template_button_click_0_listener() {
      \u0275\u0275restoreView(_r1);
      const ctx_r1 = \u0275\u0275nextContext();
      return \u0275\u0275resetView(ctx_r1.toggleMenu());
    });
    \u0275\u0275element(2, "i", 42);
    \u0275\u0275text(3);
    \u0275\u0275pipe(4, "translate");
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    \u0275\u0275propertyInterpolate("ngxTippy", \u0275\u0275pipeBind1(1, 2, "form_button_add_new"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate1("\xA0", \u0275\u0275pipeBind1(4, 4, "form_button_add"), " ");
  }
}
function LanguageMappingComponent_th_26_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "th", 15);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const lang_r3 = ctx.$implicit;
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", lang_r3.language_name, " ");
  }
}
function LanguageMappingComponent_ng_container_31_tr_2_ng_container_4_Template(rf, ctx) {
  if (rf & 1) {
    const _r4 = \u0275\u0275getCurrentView();
    \u0275\u0275elementContainerStart(0);
    \u0275\u0275elementStart(1, "td", 49)(2, "input", 50);
    \u0275\u0275listener("input", function LanguageMappingComponent_ng_container_31_tr_2_ng_container_4_Template_input_input_2_listener($event) {
      const controlName_r5 = \u0275\u0275restoreView(_r4).$implicit;
      const group_r6 = \u0275\u0275nextContext(2).$implicit;
      const ctx_r1 = \u0275\u0275nextContext();
      return \u0275\u0275resetView(ctx_r1.onInputChange($event, group_r6.get(controlName_r5)));
    });
    \u0275\u0275elementEnd()();
    \u0275\u0275elementContainerEnd();
  }
  if (rf & 2) {
    let tmp_6_0;
    const controlName_r5 = ctx.$implicit;
    const group_r6 = \u0275\u0275nextContext(2).$implicit;
    const ctx_r1 = \u0275\u0275nextContext();
    \u0275\u0275advance(2);
    \u0275\u0275property("value", (tmp_6_0 = group_r6.get(controlName_r5)) == null ? null : tmp_6_0.value);
    \u0275\u0275attribute("readonly", !(ctx_r1.masterInfo == null ? null : ctx_r1.masterInfo.permissions == null ? null : ctx_r1.masterInfo.permissions.edit) ? true : null);
  }
}
function LanguageMappingComponent_ng_container_31_tr_2_button_6_Template(rf, ctx) {
  if (rf & 1) {
    const _r7 = \u0275\u0275getCurrentView();
    \u0275\u0275elementStart(0, "button", 51);
    \u0275\u0275listener("click", function LanguageMappingComponent_ng_container_31_tr_2_button_6_Template_button_click_0_listener() {
      let tmp_6_0;
      \u0275\u0275restoreView(_r7);
      const group_r6 = \u0275\u0275nextContext(2).$implicit;
      const ctx_r1 = \u0275\u0275nextContext();
      return \u0275\u0275resetView(ctx_r1.removeItem1((tmp_6_0 = group_r6.get("key1")) == null ? null : tmp_6_0.value));
    });
    \u0275\u0275element(1, "i", 52);
    \u0275\u0275elementEnd();
  }
}
function LanguageMappingComponent_ng_container_31_tr_2_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "tr")(1, "td", 45)(2, "label", 46);
    \u0275\u0275text(3);
    \u0275\u0275elementEnd()();
    \u0275\u0275template(4, LanguageMappingComponent_ng_container_31_tr_2_ng_container_4_Template, 3, 2, "ng-container", 19);
    \u0275\u0275elementStart(5, "td", 47);
    \u0275\u0275template(6, LanguageMappingComponent_ng_container_31_tr_2_button_6_Template, 2, 0, "button", 48);
    \u0275\u0275elementEnd()();
  }
  if (rf & 2) {
    let tmp_4_0;
    const group_r6 = \u0275\u0275nextContext().$implicit;
    const ctx_r1 = \u0275\u0275nextContext();
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate((tmp_4_0 = group_r6.get("key1")) == null ? null : tmp_4_0.value);
    \u0275\u0275advance();
    \u0275\u0275property("ngForOf", ctx_r1.getControlNames(group_r6));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngIf", ctx_r1.masterInfo == null ? null : ctx_r1.masterInfo.permissions == null ? null : ctx_r1.masterInfo.permissions.delete);
  }
}
function LanguageMappingComponent_ng_container_31_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementContainerStart(0)(1, 43);
    \u0275\u0275template(2, LanguageMappingComponent_ng_container_31_tr_2_Template, 7, 3, "tr", 44);
    \u0275\u0275elementContainerEnd()();
  }
  if (rf & 2) {
    let tmp_4_0;
    const group_r6 = ctx.$implicit;
    const i_r8 = ctx.index;
    \u0275\u0275advance();
    \u0275\u0275property("formGroupName", i_r8);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", (tmp_4_0 = group_r6.get("isShow")) == null ? null : tmp_4_0.value);
  }
}
function LanguageMappingComponent_ng_container_71_button_2_Template(rf, ctx) {
  if (rf & 1) {
    const _r9 = \u0275\u0275getCurrentView();
    \u0275\u0275elementStart(0, "button", 56);
    \u0275\u0275listener("click", function LanguageMappingComponent_ng_container_71_button_2_Template_button_click_0_listener() {
      \u0275\u0275restoreView(_r9);
      const i_r10 = \u0275\u0275nextContext().index;
      const ctx_r1 = \u0275\u0275nextContext();
      return \u0275\u0275resetView(ctx_r1.handleEllipsisClick(i_r10));
    });
    \u0275\u0275text(1, " ... ");
    \u0275\u0275elementEnd();
  }
}
function LanguageMappingComponent_ng_container_71_button_3_Template(rf, ctx) {
  if (rf & 1) {
    const _r11 = \u0275\u0275getCurrentView();
    \u0275\u0275elementStart(0, "button", 57);
    \u0275\u0275listener("click", function LanguageMappingComponent_ng_container_71_button_3_Template_button_click_0_listener() {
      \u0275\u0275restoreView(_r11);
      const page_r12 = \u0275\u0275nextContext().$implicit;
      const ctx_r1 = \u0275\u0275nextContext();
      return \u0275\u0275resetView(ctx_r1.goToPage(page_r12));
    });
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const page_r12 = \u0275\u0275nextContext().$implicit;
    const ctx_r1 = \u0275\u0275nextContext();
    \u0275\u0275property("ngClass", \u0275\u0275pureFunction1(2, _c1, ctx_r1.currentPage === page_r12));
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", page_r12, " ");
  }
}
function LanguageMappingComponent_ng_container_71_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementContainerStart(0)(1, 53);
    \u0275\u0275template(2, LanguageMappingComponent_ng_container_71_button_2_Template, 2, 0, "button", 54)(3, LanguageMappingComponent_ng_container_71_button_3_Template, 2, 4, "button", 55);
    \u0275\u0275elementContainerEnd()();
  }
  if (rf & 2) {
    const page_r12 = ctx.$implicit;
    \u0275\u0275advance();
    \u0275\u0275property("ngSwitch", page_r12);
    \u0275\u0275advance();
    \u0275\u0275property("ngSwitchCase", "...");
  }
}
function LanguageMappingComponent_div_84_button_6_Template(rf, ctx) {
  if (rf & 1) {
    const _r14 = \u0275\u0275getCurrentView();
    \u0275\u0275elementStart(0, "button", 71);
    \u0275\u0275listener("click", function LanguageMappingComponent_div_84_button_6_Template_button_click_0_listener() {
      \u0275\u0275restoreView(_r14);
      const ctx_r1 = \u0275\u0275nextContext(2);
      return \u0275\u0275resetView(ctx_r1.addNewItemFormArray(false));
    });
    \u0275\u0275element(1, "i", 42);
    \u0275\u0275elementEnd();
  }
}
function LanguageMappingComponent_div_84_th_14_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "th", 72);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const lang_r15 = ctx.$implicit;
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", lang_r15.language_name, " ");
  }
}
function LanguageMappingComponent_div_84_ng_container_17_tr_2_ng_container_1_Template(rf, ctx) {
  if (rf & 1) {
    const _r17 = \u0275\u0275getCurrentView();
    \u0275\u0275elementContainerStart(0);
    \u0275\u0275elementStart(1, "td", 45)(2, "input", 73);
    \u0275\u0275listener("input", function LanguageMappingComponent_div_84_ng_container_17_tr_2_ng_container_1_Template_input_input_2_listener($event) {
      const controlName_r18 = \u0275\u0275restoreView(_r17).$implicit;
      const group_r19 = \u0275\u0275nextContext(2).$implicit;
      const ctx_r1 = \u0275\u0275nextContext(2);
      return \u0275\u0275resetView(ctx_r1.onInputChange($event, group_r19.get(controlName_r18)));
    });
    \u0275\u0275elementEnd()();
    \u0275\u0275elementContainerEnd();
  }
  if (rf & 2) {
    let tmp_7_0;
    const controlName_r18 = ctx.$implicit;
    const group_r19 = \u0275\u0275nextContext(2).$implicit;
    \u0275\u0275advance(2);
    \u0275\u0275property("value", (tmp_7_0 = group_r19.get(controlName_r18)) == null ? null : tmp_7_0.value);
  }
}
function LanguageMappingComponent_div_84_ng_container_17_tr_2_Template(rf, ctx) {
  if (rf & 1) {
    const _r16 = \u0275\u0275getCurrentView();
    \u0275\u0275elementStart(0, "tr");
    \u0275\u0275template(1, LanguageMappingComponent_div_84_ng_container_17_tr_2_ng_container_1_Template, 3, 1, "ng-container", 19);
    \u0275\u0275elementStart(2, "td")(3, "button", 51);
    \u0275\u0275listener("click", function LanguageMappingComponent_div_84_ng_container_17_tr_2_Template_button_click_3_listener() {
      \u0275\u0275restoreView(_r16);
      const i_r20 = \u0275\u0275nextContext().index;
      const ctx_r1 = \u0275\u0275nextContext(2);
      return \u0275\u0275resetView(ctx_r1.removeItem(i_r20));
    });
    \u0275\u0275element(4, "i", 52);
    \u0275\u0275elementEnd()()();
  }
  if (rf & 2) {
    const group_r19 = \u0275\u0275nextContext().$implicit;
    const ctx_r1 = \u0275\u0275nextContext(2);
    \u0275\u0275advance();
    \u0275\u0275property("ngForOf", ctx_r1.getControlNames1(group_r19));
  }
}
function LanguageMappingComponent_div_84_ng_container_17_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementContainerStart(0)(1, 43);
    \u0275\u0275template(2, LanguageMappingComponent_div_84_ng_container_17_tr_2_Template, 5, 1, "tr", 44);
    \u0275\u0275elementContainerEnd()();
  }
  if (rf & 2) {
    let tmp_5_0;
    const group_r19 = ctx.$implicit;
    const i_r20 = ctx.index;
    \u0275\u0275advance();
    \u0275\u0275property("formGroupName", i_r20);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", (tmp_5_0 = group_r19.get("isShow")) == null ? null : tmp_5_0.value);
  }
}
function LanguageMappingComponent_div_84_Template(rf, ctx) {
  if (rf & 1) {
    const _r13 = \u0275\u0275getCurrentView();
    \u0275\u0275elementStart(0, "div", 58)(1, "div", 59)(2, "span");
    \u0275\u0275text(3);
    \u0275\u0275pipe(4, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(5, "div", 60);
    \u0275\u0275template(6, LanguageMappingComponent_div_84_button_6_Template, 2, 0, "button", 61);
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(7, "ng-scrollbar", 62)(8, "form", 63)(9, "table", 64)(10, "thead", 14)(11, "th", 65);
    \u0275\u0275text(12);
    \u0275\u0275pipe(13, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275template(14, LanguageMappingComponent_div_84_th_14_Template, 2, 1, "th", 66);
    \u0275\u0275element(15, "th");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(16, "tbody", 18);
    \u0275\u0275template(17, LanguageMappingComponent_div_84_ng_container_17_Template, 3, 2, "ng-container", 19);
    \u0275\u0275elementEnd()()()();
    \u0275\u0275elementStart(18, "div", 67)(19, "div", 68)(20, "button", 69);
    \u0275\u0275listener("click", function LanguageMappingComponent_div_84_Template_button_click_20_listener() {
      \u0275\u0275restoreView(_r13);
      const ctx_r1 = \u0275\u0275nextContext();
      return \u0275\u0275resetView(ctx_r1.prepareNewRecords());
    });
    \u0275\u0275text(21);
    \u0275\u0275pipe(22, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(23, "button", 70);
    \u0275\u0275listener("click", function LanguageMappingComponent_div_84_Template_button_click_23_listener() {
      \u0275\u0275restoreView(_r13);
      const ctx_r1 = \u0275\u0275nextContext();
      return \u0275\u0275resetView(ctx_r1.toggleMenu());
    });
    \u0275\u0275text(24);
    \u0275\u0275pipe(25, "translate");
    \u0275\u0275elementEnd()()()();
  }
  if (rf & 2) {
    const ctx_r1 = \u0275\u0275nextContext();
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(4, 9, "add_new_records"));
    \u0275\u0275advance(3);
    \u0275\u0275property("ngIf", ctx_r1.masterInfo.permissions.create);
    \u0275\u0275advance(2);
    \u0275\u0275property("formGroup", ctx_r1.langMapAddForm);
    \u0275\u0275advance(4);
    \u0275\u0275textInterpolate1(" ", \u0275\u0275pipeBind1(13, 11, "table_label_key"), " ");
    \u0275\u0275advance(2);
    \u0275\u0275property("ngForOf", ctx_r1.languages);
    \u0275\u0275advance(3);
    \u0275\u0275property("ngForOf", ctx_r1.getAddFormItems);
    \u0275\u0275advance(3);
    \u0275\u0275property("disabled", ctx_r1.langMapAddForm.invalid);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", \u0275\u0275pipeBind1(22, 13, "submit"), "");
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(25, 15, "cancel"));
  }
}
var _LanguageMappingComponent = class _LanguageMappingComponent {
  constructor(router, formBuilder, commonService, toastr, localStorageService, storeData, gridApiService, route, languageService, translate, titleService) {
    this.router = router;
    this.formBuilder = formBuilder;
    this.commonService = commonService;
    this.toastr = toastr;
    this.localStorageService = localStorageService;
    this.storeData = storeData;
    this.gridApiService = gridApiService;
    this.route = route;
    this.languageService = languageService;
    this.translate = translate;
    this.titleService = titleService;
    this.loading = false;
    this.allItems = [];
    this.filteredItems = [];
    this.languages = [];
    this.totalPages = 0;
    this.currentPage = 1;
    this.pageSize = 10;
    this.searchQuery = "";
    this.filteredControls = [];
    this.keys = ["key1"];
    this.initialValues = [];
    this.totalItems = 0;
    this.isMenuOpen = false;
    this.update_json_schema = {
      // it will be removed
      action: ["hard_delete", "insert"],
      table: ["language_contents", "language_contents"],
      table_mapping: ["table1", "table2"],
      data: {
        table2: []
      },
      conditions: {
        table1: []
      }
    };
    this.delete_json_schema = {
      // it will be removed
      action: ["hard_delete"],
      table: ["language_contents"],
      table_mapping: ["table1"],
      conditions: {
        table1: []
      }
    };
    this.title_key = "language_content";
    this.langMapForm = this.formBuilder.group({
      items: this.formBuilder.array([])
    });
    this.langMapAddForm = this.formBuilder.group({
      items: this.formBuilder.array([])
    });
    this.initStore();
  }
  ngOnInit() {
    this.title_key = this.route.snapshot.data["pageInfo"].fullEntity;
    const translateTitle = this.translate.instant(this.title_key);
    this.titleService.setTitle(translateTitle);
    const userData = this.localStorageService.getData("user_data");
    if (userData) {
      const parsedData = JSON.parse(userData);
      this.userId = parsedData.main?.id;
      this.companyId = parsedData.main?.company_id;
    }
    const pageInfo = this.route.snapshot.data["pageInfo"] || "";
    if (pageInfo) {
      this.masterInfo = pageInfo;
    }
    this.languageCode = this.languageService.getSavedLanguageCode();
    if (this.languageService.checkReloadFlag()) {
      console.log("Reloaded");
    } else {
      console.log("Initial Load");
    }
    const languageId = this.languageService.getLanguageId(this.languageCode);
    this.languageService.fetchLanguageData(this.companyId, languageId);
    this.fetchData();
  }
  initStore() {
    return __async(this, null, function* () {
      this.storeData.select((d) => d.index).subscribe((d) => {
        this.store = d;
      });
    });
  }
  toggleMenu() {
    this.isMenuOpen = !this.isMenuOpen;
    if (this.isMenuOpen)
      this.addNewItemFormArray(true);
  }
  fetchData() {
    this.loading = true;
    const procedureParams = { proc_name: "get_key_language_contents", params: { company_id: this.companyId } };
    this.commonService.procedureCall(procedureParams).subscribe({
      next: (response) => {
        if (response.code === 200 && response.status) {
          this.allItems = response.data?.[0]?.result || [];
          this.languages = this.extractLanguages(this.allItems);
          this.populateFormArray(this.allItems);
          this.storeInitialValues();
        } else {
          const key = "error";
          const errorMessage = this.translate.instant(key);
          this.toastr.error(errorMessage, "Error");
          console.log(response.message);
        }
      },
      error: (error) => {
        console.error("Error fetching data:", error);
        this.loading = false;
      },
      complete: () => {
        this.loading = false;
      }
    });
  }
  extractLanguages(items) {
    const languageSet = /* @__PURE__ */ new Set();
    for (let index = 0; index < items.length; index++) {
      if (index === 1)
        break;
      items[index].language_content.forEach((lang) => {
        languageSet.add(JSON.stringify(lang));
      });
    }
    return Array.from(languageSet).map((lang) => JSON.parse(lang));
  }
  get formItems() {
    return this.langMapForm.get("items");
  }
  get getAddFormItems() {
    let itemsArray = this.langMapAddForm.get("items");
    return itemsArray ? itemsArray.controls : [];
  }
  getItemControls() {
    const itemsArray = this.langMapForm.get("items");
    return itemsArray ? itemsArray.controls : [];
  }
  populateFormArray(data) {
    const itemsArray = this.langMapForm.get("items");
    itemsArray.clear();
    data.forEach((item, rowIndex) => {
      if (item && item.language_content) {
        const group = this.formBuilder.group({
          isShow: true,
          key1: [item.key1]
        });
        item.language_content.forEach((lang) => {
          const uniqueControlName = this.generateControlName(lang.language_id);
          group.addControl(uniqueControlName, this.formBuilder.control(lang.description || ""));
        });
        itemsArray.push(group);
      }
      if (data.length - 1 === rowIndex) {
        setTimeout(() => {
          this.updateFilteredControls();
        }, 500);
      }
    });
  }
  addNewItemFormArray(isFirstTime) {
    const itemsArray = this.langMapAddForm.get("items");
    if (isFirstTime)
      itemsArray.clear();
    const group = this.formBuilder.group({
      isShow: true,
      key1: ["", [Validators.required]]
    });
    this.languages.forEach((lang) => {
      const uniqueControlName = this.generateControlName(lang.language_id);
      group.addControl(uniqueControlName, this.formBuilder.control(lang.description || ""));
    });
    itemsArray.push(group);
  }
  updateFilteredControls() {
    const controls = this.getItemControls();
    controls.forEach((control) => {
      const matches = this.keys.some((key) => {
        const controlValue = control.get(key)?.value;
        return controlValue != null && controlValue.toString().toLowerCase().includes(this.searchQuery.toLowerCase());
      });
      control.get("isShow")?.setValue(matches);
    });
    this.filteredControls = controls.filter((control) => control.get("isShow")?.value);
    this.totalItems = this.filteredControls.length;
    this.totalPages = this.calculateTotalPages();
    const startIndex = (this.currentPage - 1) * this.pageSize;
    const endIndex = startIndex + this.pageSize;
    this.filteredControls.forEach((control, index) => {
      const isVisible = index >= startIndex && index < endIndex;
      control.get("isShow")?.setValue(isVisible);
    });
  }
  onInputChange(event, control) {
    const inputElement = event.target;
    const value = inputElement.value;
    control.setValue(value, { emitEvent: false });
  }
  onSearch() {
    this.currentPage = 1;
    this.updateFilteredControls();
  }
  generateControlName(languageId) {
    return `${languageId}_description`;
  }
  getControlNames(group) {
    return Object.keys(group.controls).filter((key) => key !== "key1" && key !== "isShow");
  }
  getControlNames1(group) {
    return Object.keys(group.controls).filter((key) => key !== "isShow");
  }
  removeItem(index) {
    this.getAddFormItems.splice(index, 1);
  }
  removeItem1(keyName) {
    return __async(this, null, function* () {
      let removableItems = [];
      const result = yield import_sweetalert2.default.fire({
        title: "Are you sure?",
        text: "You won't be able to delete this!",
        icon: "warning",
        showCancelButton: true,
        confirmButtonColor: "#3085d6",
        cancelButtonColor: "#d33",
        confirmButtonText: "Yes, delete it!"
      });
      if (result.isConfirmed) {
        console.log("deleted records", keyName);
        removableItems.push(keyName);
        if (removableItems.length > 0) {
          this.deleteRecords(removableItems);
        }
      }
    });
  }
  deleteRecords(postData) {
    const removable_items = postData.map((item) => ({
      key_content: item
    }));
    this.delete_json_schema.conditions["table1"] = removable_items;
    this.gridApiService.executeRecords(this.delete_json_schema).subscribe((response) => {
      if (response.status && response.code === 200) {
        const key = "record_deleted_successfully";
        const successMessage = this.translate.instant(key);
        this.toastr.success(successMessage);
        setTimeout(() => {
          location.reload();
        }, 500);
      } else {
        const key = "record_failed_deleted";
        const errorMessage = this.translate.instant(key);
        this.toastr.error(errorMessage, "Error");
      }
    }, (error) => {
      const key = "record_failed_deleted";
      const errorMessage = this.translate.instant(key);
      this.toastr.error(errorMessage, "Error");
    });
  }
  getActualIndex(index) {
    return index;
  }
  storeInitialValues() {
    this.initialValues = this.langMapForm.value.items.map((item) => __spreadValues({}, item));
  }
  onSubmit() {
    const itemsArray = this.langMapForm.get("items");
    const changedData = itemsArray.controls.map((control, index) => {
      const initialValue = this.initialValues[index];
      const currentValue = control.value;
      const changedControls = this.getControlNames(control).filter((controlName) => {
        return initialValue[controlName] !== currentValue[controlName];
      });
      if (changedControls.length > 0) {
        return changedControls.map((controlName) => {
          return {
            language_id: controlName.split("_")[0],
            key: control.get("key1")?.value,
            value: control.get(controlName)?.value
          };
        });
      }
      return [];
    }).flat().filter((item) => item);
    if (changedData.length > 0) {
      this.saveRecords(changedData);
    }
  }
  prepareNewRecords() {
    const itemsArray = this.langMapAddForm.get("items");
    const changedData = itemsArray.controls.map((control, index) => {
      const changedControls = this.getControlNames(control);
      if (changedControls.length > 0) {
        return changedControls.map((controlName) => {
          return {
            language_id: controlName.split("_")[0],
            key: control.get("key1")?.value,
            value: control.get(controlName)?.value
          };
        });
      }
      return [];
    }).flat().filter((item) => item);
    if (changedData.length > 0) {
      this.saveRecords(changedData);
    }
  }
  saveRecords(postData) {
    const removable_items = postData.map((item) => ({
      language_id: item.language_id,
      key_content: item.key
    }));
    const insertable_items = postData.map((item) => ({
      language_id: item.language_id,
      key_content: item.key,
      values: item.value
    }));
    this.update_json_schema.conditions["table1"] = removable_items;
    this.update_json_schema.data["table2"] = insertable_items;
    this.gridApiService.executeRecords(this.update_json_schema).subscribe((response) => {
      if (response.status && response.code === 200) {
        const key = "record_updated_successfully";
        const successMessage = this.translate.instant(key);
        this.toastr.success(successMessage);
        this.isMenuOpen = false;
        this.languageService.serviceChangeLanguage(this.companyId, this.languageCode.toLowerCase());
        this.fetchData();
      } else {
        const key = "record_failed_updated";
        const errorMessage = this.translate.instant(key);
        this.toastr.error(errorMessage, "Error");
      }
    }, (error) => {
      const key = "record_failed_inserted";
      const errorMessage = this.translate.instant(key);
      this.toastr.error(errorMessage, "Error");
    });
  }
  /* Pagination - Start */
  goToPage(page) {
    if (typeof page === "number" && page !== this.currentPage) {
      this.currentPage = page;
      this.updateFilteredControls();
    }
  }
  previousPage() {
    if (this.currentPage > 1) {
      this.currentPage--;
      this.updateFilteredControls();
    }
  }
  nextPage() {
    if (this.currentPage < this.totalPages) {
      this.currentPage++;
      this.updateFilteredControls();
    }
  }
  getDisplayedItemCount() {
    return Math.min(this.currentPage * this.pageSize, this.totalItems);
  }
  getPageNumbers() {
    const totalPages = this.calculateTotalPages();
    const currentPage = this.currentPage;
    const pageNumbers = [];
    if (totalPages <= 7) {
      for (let i = 1; i <= totalPages; i++) {
        pageNumbers.push(i);
      }
    } else {
      pageNumbers.push(1);
      if (currentPage > 3) {
        pageNumbers.push("...");
      }
      const start = Math.max(2, currentPage - 1);
      const end = Math.min(totalPages - 1, currentPage + 1);
      for (let i = start; i <= end; i++) {
        pageNumbers.push(i);
      }
      if (currentPage < totalPages - 2) {
        pageNumbers.push("...");
      }
      pageNumbers.push(totalPages);
    }
    return pageNumbers;
  }
  handleEllipsisClick(index) {
    const pageNumbers = this.getPageNumbers();
    if (index === 1) {
      this.goToPage(Math.floor((1 + this.currentPage) / 2));
    } else if (index === pageNumbers.length - 2) {
      this.goToPage(Math.floor((this.totalPages + this.currentPage) / 2));
    }
  }
  onResultsPerPageChange() {
    this.currentPage = 1;
    this.pageSize = 50;
    this.updateFilteredControls();
  }
  calculateTotalPages() {
    this.totalPages = Math.ceil(this.totalItems / this.pageSize);
    return this.totalPages;
  }
};
_LanguageMappingComponent.\u0275fac = function LanguageMappingComponent_Factory(t) {
  return new (t || _LanguageMappingComponent)(\u0275\u0275directiveInject(Router), \u0275\u0275directiveInject(FormBuilder), \u0275\u0275directiveInject(MenuMapService), \u0275\u0275directiveInject(ToastrService), \u0275\u0275directiveInject(LocalStorageService), \u0275\u0275directiveInject(Store), \u0275\u0275directiveInject(GridApiService), \u0275\u0275directiveInject(ActivatedRoute), \u0275\u0275directiveInject(LanguageService), \u0275\u0275directiveInject(TranslateService), \u0275\u0275directiveInject(Title));
};
_LanguageMappingComponent.\u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ type: _LanguageMappingComponent, selectors: [["app-language-mapping"]], standalone: true, features: [\u0275\u0275StandaloneFeature], decls: 85, vars: 51, consts: [[1, "panel"], [1, "mb-2.5"], [1, "header-panel", "mb-1", "mt-0", "flex", "flex-col", "gap-5", "px-2", "md:flex-row", "md:items-center"], ["appDynamicFontSize", "subtitle", 1, "font-bold", "py-1.5", "text-xs", "dark:text-white-light"], [1, "flex", "items-center", "gap-4", "md:flex-row", "md:items-center", "md:ltr:ml-auto", "md:rtl:mr-auto"], [1, "flex", "flex-wrap", "items-center", "gap-2"], [1, "relative", "mb-2", "flex-grow", "md:mb-0"], ["type", "text", "appDynamicFontSize", "body", 1, "form-input", "py-1.5", "text-xs", "w-full", "pr-10", "text-gray-600", 3, "ngModelChange", "ngModel", "ngModelOptions", "placeholder"], ["type", "button", "class", "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, "ngxTippy", "click", 4, "ngIf"], ["type", "submit", 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", "mx-auto", 3, "click"], [1, "datatable"], [1, "table-responsive", "overflow-x-auto"], [3, "ngSubmit", "formGroup"], [1, "min-w-full", "table-hover", "relative"], [1, "bg-gray-50"], ["scope", "col", "appDynamicFontSize", "body", 1, "text-xs", "font-bold", "max-w-150", "cursor-pointer", "truncate", "whitespace-nowrap", "px-4", "py-2", "text-left", "uppercase", "tracking-wider"], ["scope", "col", "class", "text-xs font-bold max-w-150 cursor-pointer truncate whitespace-nowrap px-4 py-2 text-left uppercase tracking-wider", "appDynamicFontSize", "body", 4, "ngFor", "ngForOf"], [1, "text-xs", "font-bold", "text-center"], ["formArrayName", "items"], [4, "ngFor", "ngForOf"], [1, "pagination", "md:flex", "items-center", "justify-between", "border-t", "border-gray-200", "py-2"], [1, "flex", "items-center"], [1, "mr-4"], ["id", "results-per-page", "appDynamicFontSize", "body", 1, "py-1.5", "text-xs", 3, "ngModelChange", "ngModel"], ["value", "10"], ["value", "25"], ["value", "50"], ["value", "100"], ["appDynamicFontSize", "body", 1, "text-gray-700", "py-1.5", "text-xs"], [1, "font-medium"], ["aria-label", "Pagination", "appDynamicFontSize", "body", 1, "py-1.5", "text-xs", "isolate", "inline-flex", "-space-x-px", "rounded-md", "shadow-sm"], [1, "relative", "inline-flex", "items-center", "rounded-l-md", "px-2", "py-1", "text-gray-400", "ring-1", "ring-inset", "ring-gray-300", "hover:bg-gray-50", "focus:z-20", "focus:outline-offset-0", 3, "click", "disabled"], [1, "sr-only"], ["viewBox", "0 0 20 20", "fill", "currentColor", "aria-hidden", "true", 1, "h-5", "w-5"], ["fill-rule", "evenodd", "d", "M15.79 14.77a.75.75 0 01-1.06.02l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 111.04 1.08L11.832 10l3.938 3.71a.75.75 0 01.02 1.06zm-6 0a.75.75 0 01-1.06.02l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 111.04 1.08L5.832 10l3.938 3.71a.75.75 0 01.02 1.06z", "clip-rule", "evenodd"], [1, "relative", "inline-flex", "items-center", "px-2", "py-2", "text-gray-400", "ring-1", "ring-inset", "ring-gray-300", "hover:bg-gray-50", "focus:z-20", "focus:outline-offset-0", 3, "click", "disabled"], ["fill-rule", "evenodd", "d", "M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z", "clip-rule", "evenodd"], ["fill-rule", "evenodd", "d", "M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z", "clip-rule", "evenodd"], [1, "relative", "inline-flex", "items-center", "rounded-r-md", "px-2", "py-2", "text-gray-400", "ring-1", "ring-inset", "ring-gray-300", "hover:bg-gray-50", "focus:z-20", "focus:outline-offset-0", 3, "click", "disabled"], ["fill-rule", "evenodd", "d", "M4.21 14.77a.75.75 0 01.02-1.06L8.168 10 4.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02zm6 0a.75.75 0 01.02-1.06L14.168 10 10.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z", "clip-rule", "evenodd"], ["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"], ["type", "button", 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", "ngxTippy"], [1, "fa-solid", "fa-plus"], [3, "formGroupName"], [4, "ngIf"], ["appDynamicFontSize", "body"], [1, "text-xs"], [1, "text-center"], ["class", "text-red-500", 3, "click", 4, "ngIf"], ["appDynamicFontSize", "body", 1, "ng-tns-c617364992-2", "ng-star-inserted", "md:text-xs", "md:pr-10"], ["type", "text", "appDynamicFontSize", "body", 1, "form-input", "py-1.5", "text-xs", "w-full", "text-gray-600", "ng-tns-c617364992-2", "md:text-xs", "md:pr-10", 3, "input", "value"], [1, "text-red-500", 3, "click"], [1, "fa-solid", "fa-xmark", "text-xl"], [3, "ngSwitch"], ["class", "relative inline-flex items-center px-4 py-2 font-semibold ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0", 3, "click", 4, "ngSwitchCase"], ["class", "relative inline-flex items-center px-4 py-2 font-semibold ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0", 3, "ngClass", "click", 4, "ngSwitchDefault"], [1, "relative", "inline-flex", "items-center", "px-4", "py-2", "font-semibold", "ring-1", "ring-inset", "ring-gray-300", "hover:bg-gray-50", "focus:z-20", "focus:outline-offset-0", 3, "click"], [1, "relative", "inline-flex", "items-center", "px-4", "py-2", "font-semibold", "ring-1", "ring-inset", "ring-gray-300", "hover:bg-gray-50", "focus:z-20", "focus:outline-offset-0", 3, "click", "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"], [1, "flex", "items-center", "justify-between", "border-b", "border-gray-200", "p-4"], [1, "flex", "items-center", "gap-4"], ["class", "text-blue-500", "ngxTippy", "Add New Record", 3, "click", 4, "ngIf"], ["appearance", "compact", 1, "relative", "!h-[calc(40vh-40px)]"], [3, "formGroup"], [1, "table-hover", "relative", "min-w-full"], ["scope", "col", "appDynamicFontSize", "body", 1, "font-large", "max-w-150", "required-mark", "cursor-pointer", "truncate", "whitespace-nowrap", "px-4", "py-2", "text-left", "uppercase", "tracking-wider"], ["scope", "col", "class", "font-large max-w-150 cursor-pointer truncate whitespace-nowrap px-4 py-2 text-left uppercase tracking-wider", "appDynamicFontSize", "body", 4, "ngFor", "ngForOf"], [1, "flex", "items-center", "justify-between", "border-t", "border-gray-200", "p-4"], [1, "flex", "gap-4"], [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", "mx-auto", 3, "click", "disabled"], [1, "btn-secondary", "flex", "items-center", "rounded-md", "border", "border-[#e0e6ed]", "px-4", "py-2", "font-semibold", "dark:border-[#253b5c]", "dark:bg-[#1b2e4b]", "dark:text-white-dark", "mx-auto", 3, "click"], ["ngxTippy", "Add New Record", 1, "text-blue-500", 3, "click"], ["scope", "col", "appDynamicFontSize", "body", 1, "font-large", "max-w-150", "cursor-pointer", "truncate", "whitespace-nowrap", "px-4", "py-2", "text-left", "uppercase", "tracking-wider"], ["type", "text", "appDynamicFontSize", "body", 1, "form-input", "w-full", "pr-10", "text-gray-600", 3, "input", "value"]], template: function LanguageMappingComponent_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div")(1, "div", 0)(2, "div", 1)(3, "div", 2)(4, "div", 3);
    \u0275\u0275text(5);
    \u0275\u0275pipe(6, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(7, "div", 4)(8, "div", 5)(9, "div", 6)(10, "input", 7);
    \u0275\u0275pipe(11, "translate");
    \u0275\u0275twoWayListener("ngModelChange", function LanguageMappingComponent_Template_input_ngModelChange_10_listener($event) {
      \u0275\u0275twoWayBindingSet(ctx.searchQuery, $event) || (ctx.searchQuery = $event);
      return $event;
    });
    \u0275\u0275listener("ngModelChange", function LanguageMappingComponent_Template_input_ngModelChange_10_listener() {
      return ctx.onSearch();
    });
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(12, "div", 5);
    \u0275\u0275template(13, LanguageMappingComponent_button_13_Template, 5, 6, "button", 8);
    \u0275\u0275elementStart(14, "button", 9);
    \u0275\u0275listener("click", function LanguageMappingComponent_Template_button_click_14_listener() {
      return ctx.onSubmit();
    });
    \u0275\u0275text(15);
    \u0275\u0275pipe(16, "translate");
    \u0275\u0275elementEnd()()()()()();
    \u0275\u0275elementStart(17, "div", 10)(18, "div", 11)(19, "form", 12);
    \u0275\u0275listener("ngSubmit", function LanguageMappingComponent_Template_form_ngSubmit_19_listener() {
      return ctx.onSubmit();
    });
    \u0275\u0275elementStart(20, "table", 13)(21, "thead", 14)(22, "tr")(23, "th", 15);
    \u0275\u0275text(24);
    \u0275\u0275pipe(25, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275template(26, LanguageMappingComponent_th_26_Template, 2, 1, "th", 16);
    \u0275\u0275elementStart(27, "th", 17);
    \u0275\u0275text(28);
    \u0275\u0275pipe(29, "translate");
    \u0275\u0275elementEnd()()();
    \u0275\u0275elementStart(30, "tbody", 18);
    \u0275\u0275template(31, LanguageMappingComponent_ng_container_31_Template, 3, 2, "ng-container", 19);
    \u0275\u0275elementEnd()()()();
    \u0275\u0275elementStart(32, "div", 20)(33, "div", 21)(34, "div", 22)(35, "select", 23);
    \u0275\u0275twoWayListener("ngModelChange", function LanguageMappingComponent_Template_select_ngModelChange_35_listener($event) {
      \u0275\u0275twoWayBindingSet(ctx.pageSize, $event) || (ctx.pageSize = $event);
      return $event;
    });
    \u0275\u0275elementStart(36, "option", 24);
    \u0275\u0275text(37, "10");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(38, "option", 25);
    \u0275\u0275text(39, "25");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(40, "option", 26);
    \u0275\u0275text(41, "50");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(42, "option", 27);
    \u0275\u0275text(43, "100");
    \u0275\u0275elementEnd()()();
    \u0275\u0275elementStart(44, "div")(45, "p", 28)(46, "span", 29);
    \u0275\u0275text(47);
    \u0275\u0275elementEnd();
    \u0275\u0275text(48, " - ");
    \u0275\u0275elementStart(49, "span", 29);
    \u0275\u0275text(50);
    \u0275\u0275elementEnd();
    \u0275\u0275text(51);
    \u0275\u0275pipe(52, "translate");
    \u0275\u0275elementStart(53, "span", 29);
    \u0275\u0275text(54);
    \u0275\u0275elementEnd();
    \u0275\u0275text(55);
    \u0275\u0275pipe(56, "translate");
    \u0275\u0275elementEnd()()();
    \u0275\u0275elementStart(57, "div")(58, "nav", 30)(59, "button", 31);
    \u0275\u0275listener("click", function LanguageMappingComponent_Template_button_click_59_listener() {
      return ctx.goToPage(1);
    });
    \u0275\u0275elementStart(60, "span", 32);
    \u0275\u0275text(61);
    \u0275\u0275pipe(62, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275namespaceSVG();
    \u0275\u0275elementStart(63, "svg", 33);
    \u0275\u0275element(64, "path", 34);
    \u0275\u0275elementEnd()();
    \u0275\u0275namespaceHTML();
    \u0275\u0275elementStart(65, "button", 35);
    \u0275\u0275listener("click", function LanguageMappingComponent_Template_button_click_65_listener() {
      return ctx.previousPage();
    });
    \u0275\u0275elementStart(66, "span", 32);
    \u0275\u0275text(67);
    \u0275\u0275pipe(68, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275namespaceSVG();
    \u0275\u0275elementStart(69, "svg", 33);
    \u0275\u0275element(70, "path", 36);
    \u0275\u0275elementEnd()();
    \u0275\u0275template(71, LanguageMappingComponent_ng_container_71_Template, 4, 2, "ng-container", 19);
    \u0275\u0275namespaceHTML();
    \u0275\u0275elementStart(72, "button", 35);
    \u0275\u0275listener("click", function LanguageMappingComponent_Template_button_click_72_listener() {
      return ctx.nextPage();
    });
    \u0275\u0275elementStart(73, "span", 32);
    \u0275\u0275text(74);
    \u0275\u0275pipe(75, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275namespaceSVG();
    \u0275\u0275elementStart(76, "svg", 33);
    \u0275\u0275element(77, "path", 37);
    \u0275\u0275elementEnd()();
    \u0275\u0275namespaceHTML();
    \u0275\u0275elementStart(78, "button", 38);
    \u0275\u0275listener("click", function LanguageMappingComponent_Template_button_click_78_listener() {
      return ctx.goToPage(ctx.totalPages);
    });
    \u0275\u0275elementStart(79, "span", 32);
    \u0275\u0275text(80);
    \u0275\u0275pipe(81, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275namespaceSVG();
    \u0275\u0275elementStart(82, "svg", 33);
    \u0275\u0275element(83, "path", 39);
    \u0275\u0275elementEnd()()()()()()();
    \u0275\u0275template(84, LanguageMappingComponent_div_84_Template, 26, 17, "div", 40);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    \u0275\u0275advance(5);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(6, 28, ctx.title_key));
    \u0275\u0275advance(5);
    \u0275\u0275propertyInterpolate1("placeholder", "", \u0275\u0275pipeBind1(11, 30, "table_search_placeholder"), "...");
    \u0275\u0275twoWayProperty("ngModel", ctx.searchQuery);
    \u0275\u0275property("ngModelOptions", \u0275\u0275pureFunction0(50, _c0));
    \u0275\u0275advance(3);
    \u0275\u0275property("ngIf", ctx.masterInfo == null ? null : ctx.masterInfo.permissions == null ? null : ctx.masterInfo.permissions.create);
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate1(" ", \u0275\u0275pipeBind1(16, 32, "submit"), "");
    \u0275\u0275advance(4);
    \u0275\u0275property("formGroup", ctx.langMapForm);
    \u0275\u0275advance(5);
    \u0275\u0275textInterpolate1(" ", \u0275\u0275pipeBind1(25, 34, "table_label_key"), " ");
    \u0275\u0275advance(2);
    \u0275\u0275property("ngForOf", ctx.languages);
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(29, 36, "table_action"));
    \u0275\u0275advance(3);
    \u0275\u0275property("ngForOf", ctx.filteredControls);
    \u0275\u0275advance(4);
    \u0275\u0275twoWayProperty("ngModel", ctx.pageSize);
    \u0275\u0275advance(12);
    \u0275\u0275textInterpolate((ctx.currentPage - 1) * ctx.pageSize + 1);
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(ctx.getDisplayedItemCount());
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", \u0275\u0275pipeBind1(52, 38, "table_results_0"), " ");
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(ctx.totalItems);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", \u0275\u0275pipeBind1(56, 40, "table_results_1"), " ");
    \u0275\u0275advance(4);
    \u0275\u0275property("disabled", ctx.currentPage === 1);
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(62, 42, "first"));
    \u0275\u0275advance(4);
    \u0275\u0275property("disabled", ctx.currentPage === 1);
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(68, 44, "previous"));
    \u0275\u0275advance(4);
    \u0275\u0275property("ngForOf", ctx.getPageNumbers());
    \u0275\u0275advance();
    \u0275\u0275property("disabled", ctx.currentPage === ctx.totalPages);
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(75, 46, "next"));
    \u0275\u0275advance(4);
    \u0275\u0275property("disabled", ctx.currentPage === ctx.totalPages);
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(81, 48, "last"));
    \u0275\u0275advance(4);
    \u0275\u0275property("ngIf", ctx.isMenuOpen);
  }
}, dependencies: [CommonSharedModule, NgClass, NgForOf, NgIf, NgSwitch, NgSwitchCase, NgSwitchDefault, NgScrollbar, \u0275NgNoValidate, NgSelectOption, \u0275NgSelectMultipleOption, DefaultValueAccessor, SelectControlValueAccessor, NgControlStatus, NgControlStatusGroup, NgModel, NgxTippyDirective, DynamicFontSizeDirective, TranslatePipe, ReactiveFormsModule, FormGroupDirective, FormGroupName, FormArrayName], styles: ["\n\n.advancedfiltercontainer[_ngcontent-%COMP%] {\n  min-width: 300px;\n  max-width: 100%;\n  width: 90%;\n  left: 50%;\n  transform: translateX(-50%);\n  right: auto;\n  z-index: 1000;\n  position: fixed;\n  top: 10%;\n  max-height: 60vh;\n  overflow-y: auto;\n}\ntable[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], table[_ngcontent-%COMP%]   tfoot[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%] {\n  padding-top: 0.35rem;\n  padding-bottom: 0.35rem;\n}\n@media (min-width: 640px) {\n  .advancedfiltercontainer[_ngcontent-%COMP%] {\n    min-width: 500px;\n    width: 60%;\n  }\n}\n@media (min-width: 1024px) {\n  .advancedfiltercontainer[_ngcontent-%COMP%] {\n    max-width: 600px;\n    width: 70%;\n  }\n}\n.advancedfiltercontainer[_ngcontent-%COMP%]   .relative[_ngcontent-%COMP%] {\n  max-height: calc(80vh - 120px);\n  overflow-y: auto;\n}\n@media (max-width: 640px) {\n  .advancedfiltercontainer[_ngcontent-%COMP%]   input[_ngcontent-%COMP%], .advancedfiltercontainer[_ngcontent-%COMP%]   select[_ngcontent-%COMP%] {\n    width: 100%;\n    margin-bottom: 0.5rem;\n  }\n  .advancedfiltercontainer[_ngcontent-%COMP%]   .flex[_ngcontent-%COMP%] {\n    flex-direction: column;\n  }\n  .advancedfiltercontainer[_ngcontent-%COMP%]   .flex[_ngcontent-%COMP%]    > *[_ngcontent-%COMP%] {\n    width: 100%;\n    margin-right: 0 !important;\n  }\n}\n.advancedfiltercontainer[_ngcontent-%COMP%]   .flex.items-center.justify-between[_ngcontent-%COMP%] {\n  flex-wrap: wrap;\n}\n.advancedfiltercontainer[_ngcontent-%COMP%]   .flex.items-center.justify-between[_ngcontent-%COMP%]    > *[_ngcontent-%COMP%] {\n  margin-bottom: 0.5rem;\n}\n.panel[_ngcontent-%COMP%] {\n  margin: -15px;\n  padding: 1.25rem 1.25rem 0.25rem 1.25rem;\n}\n.header-panel[_ngcontent-%COMP%] {\n  margin-top: -15px;\n}\n.panel[_ngcontent-%COMP%] {\n  padding: 1.25rem 1.25rem 0.25rem 1.25rem;\n}\n/*# sourceMappingURL=language-mapping.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 LanguageMappingComponent = _LanguageMappingComponent;
(() => {
  (typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(LanguageMappingComponent, { className: "LanguageMappingComponent", filePath: "src\\app\\@lcp-framework\\pages\\language-mapping\\language-mapping.component.ts", lineNumber: 46 });
})();
export {
  LanguageMappingComponent
};
//# sourceMappingURL=chunk-DCRMIUFM.js.map
