import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
import { NG_VALUE_ACCESSOR } from '@angular/forms';
import { ClaimAppEmpResponseModel } from '../../models/questionnaire/ClaimAppEmpResponseModel';
import { ClaimAppEmployerDetailsModel } from '../../models/questionnaire/ClaimAppEmployerDetailsModel';
import { ClaimAppEmpRequestModel } from '../../models/questionnaire/ClaimAppEmpRequestModel';
import { ClaimOnlyEmployerDataModel } from '../../models/questionnaire/ClaimOnlyEmployerDataModel';
import { EmployerWagesModel } from '../../models/questionnaire/EmployerWagesModel';
import { ComboOption } from '../../models/questionnaire/ComboModel';
import { FbConstants } from '../questionnaire/FbConstants';
import * as i0 from "@angular/core";
import * as i1 from "@ionic/angular";
import * as i2 from "../../services/logger/logger.service";
import * as i3 from "../../services/questionnaire/validation.service";
import * as i4 from "../../services/util/util.service";
import * as i5 from "../../services/login/login.service";
import * as i6 from "@angular/router";
import * as i7 from "../../services/claims/claims.service";
import * as i8 from "@ionic/storage-angular";
import * as i9 from "@angular/common";
import * as i10 from "primeng/api";
import * as i11 from "@angular/forms";
import * as i12 from "primeng/dialog";
import * as i13 from "primeng/table";
import * as i14 from "@fortawesome/angular-fontawesome";
import * as i15 from "../add-employer/add-employer.component";
import * as i16 from "@ngx-translate/core";
import * as i17 from "../../pipes/trust-html/trust-html.pipe";
const _c0 = () => ["fal", "edit"];
function EmployerGridComponent_div_23_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 10);
    i0.ɵɵelement(1, "fa-icon", 4)(2, "span", 2);
    i0.ɵɵpipe(3, "trustHtml");
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵtext(5, ",\u00A0 ");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("icon", i0.ɵɵpureFunction0(6, _c0));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("innerHtml", i0.ɵɵpipeBind1(3, 2, i0.ɵɵpipeBind1(4, 4, "induction.employment.subheader.edit")), i0.ɵɵsanitizeHtml);
} }
function EmployerGridComponent_br_24_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "br", 3);
} }
function EmployerGridComponent_p_table_29_ng_template_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr")(1, "th", 16);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(4, "th");
    i0.ɵɵelementStart(5, "th");
    i0.ɵɵtext(6);
    i0.ɵɵpipe(7, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(8, "th");
    i0.ɵɵtext(9);
    i0.ɵɵpipe(10, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(11, "th");
    i0.ɵɵtext(12);
    i0.ɵɵpipe(13, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(14, "th");
    i0.ɵɵtext(15);
    i0.ɵɵpipe(16, "translate");
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 5, "induction.employment.table.employer.name"), " ");
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(7, 7, "induction.employment.table.job.title"), " ");
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(10, 9, "induction.employment.table.pay"), " ");
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(13, 11, "induction.employment.table.dates"), " ");
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(16, 13, "induction.employment.table.sep.reason"), " ");
} }
function EmployerGridComponent_p_table_29_ng_template_3_tr_0_td_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "td", 16)(1, "span", 31);
    i0.ɵɵtext(2, "Employer");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "span", 32);
    i0.ɵɵtext(4);
    i0.ɵɵelement(5, "br");
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const employer_r10 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate2(" ", employer_r10.employerData.displayName, " - ", employer_r10.employerData.displayState.text, "");
} }
function EmployerGridComponent_p_table_29_ng_template_3_tr_0_ng_template_2_td_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "td", 16)(1, "span", 31);
    i0.ɵɵtext(2, "Employer");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "span", 32);
    i0.ɵɵtext(4);
    i0.ɵɵelement(5, "br");
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const employer_r10 = i0.ɵɵnextContext(3).$implicit;
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate2(" ", employer_r10.employerData.displayName, " - ", employer_r10.workState.text, "");
} }
function EmployerGridComponent_p_table_29_ng_template_3_tr_0_ng_template_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, EmployerGridComponent_p_table_29_ng_template_3_tr_0_ng_template_2_td_0_Template, 6, 2, "td", 19);
} if (rf & 2) {
    i0.ɵɵnextContext();
    const _r17 = i0.ɵɵreference(5);
    const employer_r10 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵproperty("ngIf", employer_r10.osaBpEmployerFlag === "1" && employer_r10.employerType === "REG" && employer_r10.workState != null)("ngIfElse", _r17);
} }
function EmployerGridComponent_p_table_29_ng_template_3_tr_0_ng_template_4_td_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "td", 16)(1, "span", 31);
    i0.ɵɵtext(2, "Employer");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "span", 32);
    i0.ɵɵtext(4);
    i0.ɵɵelement(5, "br");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(6, "div", 33);
    i0.ɵɵpipe(7, "trustHtml");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const employer_r10 = i0.ɵɵnextContext(3).$implicit;
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate1(" ", employer_r10.employerData.displayName, " ");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("innerHtml", i0.ɵɵpipeBind1(7, 2, employer_r10.employerData.mailingAddressDisplay), i0.ɵɵsanitizeHtml);
} }
function EmployerGridComponent_p_table_29_ng_template_3_tr_0_ng_template_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, EmployerGridComponent_p_table_29_ng_template_3_tr_0_ng_template_4_td_0_Template, 8, 4, "td", 22);
} if (rf & 2) {
    const employer_r10 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵproperty("ngIf", employer_r10.employerData.displayName && employer_r10.employerType != "MIL");
} }
function EmployerGridComponent_p_table_29_ng_template_3_tr_0_td_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "td", 16)(1, "span", 31);
    i0.ɵɵtext(2, "Employer");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(3, "span");
    i0.ɵɵelementEnd();
} }
function EmployerGridComponent_p_table_29_ng_template_3_tr_0_td_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "td", 16)(1, "span", 31);
    i0.ɵɵtext(2, "Employer");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "span");
    i0.ɵɵtext(4);
    i0.ɵɵelement(5, "br");
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const employer_r10 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate1(" ", employer_r10.serviceBranch.text, " ");
} }
function EmployerGridComponent_p_table_29_ng_template_3_tr_0_ion_button_9_Template(rf, ctx) { if (rf & 1) {
    const _r46 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "ion-button", 34);
    i0.ɵɵlistener("click", function EmployerGridComponent_p_table_29_ng_template_3_tr_0_ion_button_9_Template_ion_button_click_0_listener() { i0.ɵɵrestoreView(_r46); const employer_r10 = i0.ɵɵnextContext(2).$implicit; const ctx_r44 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r44.editBasePeriodEmployer(employer_r10)); });
    i0.ɵɵelement(1, "fa-icon", 35);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("icon", i0.ɵɵpureFunction0(1, _c0));
} }
function EmployerGridComponent_p_table_29_ng_template_3_tr_0_ion_button_10_Template(rf, ctx) { if (rf & 1) {
    const _r49 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "ion-button", 36);
    i0.ɵɵlistener("click", function EmployerGridComponent_p_table_29_ng_template_3_tr_0_ion_button_10_Template_ion_button_click_0_listener() { i0.ɵɵrestoreView(_r49); const employer_r10 = i0.ɵɵnextContext(2).$implicit; const ctx_r47 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r47.editEmployer(employer_r10)); });
    i0.ɵɵelement(1, "fa-icon", 35);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("icon", i0.ɵɵpureFunction0(1, _c0));
} }
const _c1 = () => ["fal", "check-circle"];
function EmployerGridComponent_p_table_29_ng_template_3_tr_0_ion_button_11_Template(rf, ctx) { if (rf & 1) {
    const _r52 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "ion-button", 37);
    i0.ɵɵlistener("click", function EmployerGridComponent_p_table_29_ng_template_3_tr_0_ion_button_11_Template_ion_button_click_0_listener() { i0.ɵɵrestoreView(_r52); const employer_r10 = i0.ɵɵnextContext(2).$implicit; const ctx_r50 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r50.finish(employer_r10)); });
    i0.ɵɵelement(1, "fa-icon", 35);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const rowIndex_r11 = i0.ɵɵnextContext(2).rowIndex;
    const ctx_r22 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("id", "btnConfirmEmployer-" + rowIndex_r11);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("icon", ctx_r22.util.isState("MS") ? i0.ɵɵpureFunction0(2, _c0) : i0.ɵɵpureFunction0(3, _c1));
} }
const _c2 = () => ["fal", "trash-alt"];
function EmployerGridComponent_p_table_29_ng_template_3_tr_0_ion_button_12_Template(rf, ctx) { if (rf & 1) {
    const _r56 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "ion-button", 38);
    i0.ɵɵlistener("click", function EmployerGridComponent_p_table_29_ng_template_3_tr_0_ion_button_12_Template_ion_button_click_0_listener() { i0.ɵɵrestoreView(_r56); const rowIndex_r11 = i0.ɵɵnextContext(2).rowIndex; const ctx_r54 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r54.deleteEmployer(rowIndex_r11)); });
    i0.ɵɵelement(1, "fa-icon", 35);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const rowIndex_r11 = i0.ɵɵnextContext(2).rowIndex;
    i0.ɵɵproperty("id", "btnDeleteEmployer-" + rowIndex_r11);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("icon", i0.ɵɵpureFunction0(2, _c2));
} }
function EmployerGridComponent_p_table_29_ng_template_3_tr_0_ion_button_13_Template(rf, ctx) { if (rf & 1) {
    const _r60 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "ion-button", 38);
    i0.ɵɵlistener("click", function EmployerGridComponent_p_table_29_ng_template_3_tr_0_ion_button_13_Template_ion_button_click_0_listener() { i0.ɵɵrestoreView(_r60); const ctx_r59 = i0.ɵɵnextContext(2); const employer_r10 = ctx_r59.$implicit; const rowIndex_r11 = ctx_r59.rowIndex; const ctx_r58 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r58.removeEmployment(employer_r10, rowIndex_r11)); });
    i0.ɵɵelement(1, "fa-icon", 35);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const rowIndex_r11 = i0.ɵɵnextContext(2).rowIndex;
    i0.ɵɵproperty("id", "btnRemoveEmployer-" + rowIndex_r11);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("icon", i0.ɵɵpureFunction0(2, _c2));
} }
const _c3 = () => ["fal", "trash-restore-alt"];
function EmployerGridComponent_p_table_29_ng_template_3_tr_0_ion_button_14_Template(rf, ctx) { if (rf & 1) {
    const _r64 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "ion-button", 39);
    i0.ɵɵlistener("click", function EmployerGridComponent_p_table_29_ng_template_3_tr_0_ion_button_14_Template_ion_button_click_0_listener() { i0.ɵɵrestoreView(_r64); const ctx_r63 = i0.ɵɵnextContext(2); const employer_r10 = ctx_r63.$implicit; const rowIndex_r11 = ctx_r63.rowIndex; const ctx_r62 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r62.restoreEmployment(employer_r10, rowIndex_r11)); });
    i0.ɵɵelement(1, "fa-icon", 35);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("icon", i0.ɵɵpureFunction0(1, _c3));
} }
function EmployerGridComponent_p_table_29_ng_template_3_tr_0_td_15_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "td")(1, "span", 31);
    i0.ɵɵtext(2, "Job Title");
    i0.ɵɵelementEnd();
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const employer_r10 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(employer_r10.jobTileOrPosition);
} }
function EmployerGridComponent_p_table_29_ng_template_3_tr_0_td_16_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "td")(1, "span", 31);
    i0.ɵɵtext(2, "Job Title");
    i0.ɵɵelementEnd();
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const employer_r10 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(employer_r10.fedJobTileOrPosition);
} }
function EmployerGridComponent_p_table_29_ng_template_3_tr_0_td_17_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "td")(1, "span", 31);
    i0.ɵɵtext(2, "Job Title");
    i0.ɵɵelementEnd()();
} }
function EmployerGridComponent_p_table_29_ng_template_3_tr_0_td_18_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "td")(1, "span", 31);
    i0.ɵɵtext(2, "Pay");
    i0.ɵɵelementEnd();
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "currency");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const employer_r10 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate2("", i0.ɵɵpipeBind1(4, 2, employer_r10.payRate), "/", employer_r10.payRateFrequency.text, "");
} }
function EmployerGridComponent_p_table_29_ng_template_3_tr_0_td_19_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "td")(1, "span", 31);
    i0.ɵɵtext(2, "Pay");
    i0.ɵɵelementEnd()();
} }
function EmployerGridComponent_p_table_29_ng_template_3_tr_0_td_20_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "td")(1, "span", 31);
    i0.ɵɵtext(2, "Start and End");
    i0.ɵɵelementEnd();
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "date");
    i0.ɵɵpipe(5, "date");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const employer_r10 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate2(" ", i0.ɵɵpipeBind2(4, 2, employer_r10.startDate, "M/d/yyyy"), " - ", i0.ɵɵpipeBind2(5, 5, employer_r10.endDate, "M/d/yyyy"), " ");
} }
function EmployerGridComponent_p_table_29_ng_template_3_tr_0_td_21_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "td")(1, "span", 31);
    i0.ɵɵtext(2, "Start and End");
    i0.ɵɵelementEnd();
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "date");
    i0.ɵɵpipe(5, "date");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const employer_r10 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate2(" ", i0.ɵɵpipeBind2(4, 2, employer_r10.startDateFed, "M/d/yyyy"), " - ", i0.ɵɵpipeBind2(5, 5, employer_r10.endDateFed, "M/d/yyyy"), " ");
} }
function EmployerGridComponent_p_table_29_ng_template_3_tr_0_td_22_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "td")(1, "span", 31);
    i0.ɵɵtext(2, "Start and End");
    i0.ɵɵelementEnd();
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "date");
    i0.ɵɵpipe(5, "date");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const employer_r10 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate2(" ", i0.ɵɵpipeBind2(4, 2, employer_r10.startDateMil, "M/d/yyyy"), " - ", i0.ɵɵpipeBind2(5, 5, employer_r10.endDateMil, "M/d/yyyy"), " ");
} }
function EmployerGridComponent_p_table_29_ng_template_3_tr_0_td_23_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "td")(1, "span", 31);
    i0.ɵɵtext(2, "Separation Reason");
    i0.ɵɵelementEnd();
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const employer_r10 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1("", employer_r10.reasonSeparation.text, " ");
} }
function EmployerGridComponent_p_table_29_ng_template_3_tr_0_td_24_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "td")(1, "span", 31);
    i0.ɵɵtext(2, "Separation Reason");
    i0.ɵɵelementEnd()();
} }
function EmployerGridComponent_p_table_29_ng_template_3_tr_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr", 18);
    i0.ɵɵtemplate(1, EmployerGridComponent_p_table_29_ng_template_3_tr_0_td_1_Template, 6, 2, "td", 19)(2, EmployerGridComponent_p_table_29_ng_template_3_tr_0_ng_template_2_Template, 1, 2, "ng-template", null, 20, i0.ɵɵtemplateRefExtractor)(4, EmployerGridComponent_p_table_29_ng_template_3_tr_0_ng_template_4_Template, 1, 1, "ng-template", null, 21, i0.ɵɵtemplateRefExtractor)(6, EmployerGridComponent_p_table_29_ng_template_3_tr_0_td_6_Template, 4, 0, "td", 22)(7, EmployerGridComponent_p_table_29_ng_template_3_tr_0_td_7_Template, 6, 1, "td", 22);
    i0.ɵɵelementStart(8, "td", 23);
    i0.ɵɵtemplate(9, EmployerGridComponent_p_table_29_ng_template_3_tr_0_ion_button_9_Template, 2, 2, "ion-button", 24)(10, EmployerGridComponent_p_table_29_ng_template_3_tr_0_ion_button_10_Template, 2, 2, "ion-button", 25)(11, EmployerGridComponent_p_table_29_ng_template_3_tr_0_ion_button_11_Template, 2, 4, "ion-button", 26)(12, EmployerGridComponent_p_table_29_ng_template_3_tr_0_ion_button_12_Template, 2, 3, "ion-button", 27)(13, EmployerGridComponent_p_table_29_ng_template_3_tr_0_ion_button_13_Template, 2, 3, "ion-button", 27)(14, EmployerGridComponent_p_table_29_ng_template_3_tr_0_ion_button_14_Template, 2, 2, "ion-button", 28);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(15, EmployerGridComponent_p_table_29_ng_template_3_tr_0_td_15_Template, 4, 1, "td", 29)(16, EmployerGridComponent_p_table_29_ng_template_3_tr_0_td_16_Template, 4, 1, "td", 29)(17, EmployerGridComponent_p_table_29_ng_template_3_tr_0_td_17_Template, 3, 0, "td", 29)(18, EmployerGridComponent_p_table_29_ng_template_3_tr_0_td_18_Template, 5, 4, "td", 29)(19, EmployerGridComponent_p_table_29_ng_template_3_tr_0_td_19_Template, 3, 0, "td", 29)(20, EmployerGridComponent_p_table_29_ng_template_3_tr_0_td_20_Template, 6, 8, "td", 29)(21, EmployerGridComponent_p_table_29_ng_template_3_tr_0_td_21_Template, 6, 8, "td", 29)(22, EmployerGridComponent_p_table_29_ng_template_3_tr_0_td_22_Template, 6, 8, "td", 29)(23, EmployerGridComponent_p_table_29_ng_template_3_tr_0_td_23_Template, 4, 1, "td", 29)(24, EmployerGridComponent_p_table_29_ng_template_3_tr_0_td_24_Template, 3, 0, "td", 29);
    i0.ɵɵelement(25, "td", 30);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const _r15 = i0.ɵɵreference(3);
    const employer_r10 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵproperty("ngClass", employer_r10.empDeleted == "Y" ? "strikethrough" : null);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", employer_r10.osaBpEmployerFlag === "1" && employer_r10.employerType === "REG" && employer_r10.employerData.displayState != null)("ngIfElse", _r15);
    i0.ɵɵadvance(5);
    i0.ɵɵproperty("ngIf", !employer_r10.employerData.displayName && employer_r10.employerType != "MIL");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", employer_r10.employerType === "MIL");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", employer_r10.bpEmployerFlag === "1" && employer_r10.payRate && employer_r10.startDate && employer_r10.empDeleted != "Y");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", employer_r10.bpEmployerFlag === "0");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", employer_r10.bpEmployerFlag === "1" && !employer_r10.payRate && !employer_r10.startDate && employer_r10.empDeleted != "Y");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", employer_r10.bpEmployerFlag === "0");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", employer_r10.bpEmployerFlag === "1" && employer_r10.empDeleted != "Y");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", employer_r10.bpEmployerFlag === "1" && employer_r10.empDeleted == "Y");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", employer_r10.jobTileOrPosition && !employer_r10.fedJobTileOrPosition);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", employer_r10.fedJobTileOrPosition && !employer_r10.jobTileOrPosition);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", employer_r10.employerType == "MIL");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", employer_r10.employerType != "MIL" && employer_r10.payRate && employer_r10.payRateFrequency);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", employer_r10.employerType == "MIL");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", employer_r10.employerType === "REG" && employer_r10.startDate && employer_r10.endDate);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", employer_r10.employerType === "FED" && employer_r10.startDateFed && employer_r10.endDateFed);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", employer_r10.employerType === "MIL" && employer_r10.startDateMil && employer_r10.endDateMil);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", employer_r10.employerType != "MIL" && employer_r10.reasonSeparation);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", employer_r10.employerType === "MIL");
} }
function EmployerGridComponent_p_table_29_ng_template_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, EmployerGridComponent_p_table_29_ng_template_3_tr_0_Template, 26, 21, "tr", 17);
} if (rf & 2) {
    const employer_r10 = ctx.$implicit;
    i0.ɵɵproperty("ngIf", employer_r10.displaySeasonalEmp === true);
} }
const _c4 = () => ["fal", "plus"];
function EmployerGridComponent_p_table_29_ng_template_4_Template(rf, ctx) { if (rf & 1) {
    const _r75 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "table")(1, "tr")(2, "td", 40);
    i0.ɵɵelement(3, "div", 2);
    i0.ɵɵpipe(4, "trustHtml");
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "td", 41)(7, "ion-button", 42);
    i0.ɵɵlistener("click", function EmployerGridComponent_p_table_29_ng_template_4_Template_ion_button_click_7_listener() { i0.ɵɵrestoreView(_r75); const ctx_r74 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r74.addNewEmpDetails()); });
    i0.ɵɵelement(8, "fa-icon", 35);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(9, "td", 30);
    i0.ɵɵtext(10, "\u00A0");
    i0.ɵɵelementEnd()()();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵattribute("colspan", 2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("innerHtml", i0.ɵɵpipeBind1(4, 4, i0.ɵɵpipeBind1(5, 6, "induction.employment.footer.label")), i0.ɵɵsanitizeHtml);
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("id", "btnAddEmployer");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("icon", i0.ɵɵpureFunction0(8, _c4));
} }
function EmployerGridComponent_p_table_29_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "p-table", 11, 12);
    i0.ɵɵtemplate(2, EmployerGridComponent_p_table_29_ng_template_2_Template, 17, 15, "ng-template", 13)(3, EmployerGridComponent_p_table_29_ng_template_3_Template, 1, 1, "ng-template", 14)(4, EmployerGridComponent_p_table_29_ng_template_4_Template, 11, 9, "ng-template", 15);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵproperty("columns", ctx_r2.cols)("value", ctx_r2.claimAppEmpResponseModelFromService.bpEmpList)("loading", ctx_r2.showProgressBar)("rowHover", true);
} }
function EmployerGridComponent_app_add_employer_30_Template(rf, ctx) { if (rf & 1) {
    const _r77 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "app-add-employer", 43);
    i0.ɵɵlistener("success", function EmployerGridComponent_app_add_employer_30_Template_app_add_employer_success_0_listener($event) { i0.ɵɵrestoreView(_r77); const ctx_r76 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r76.addEmployer($event)); })("basePeriodIndex", function EmployerGridComponent_app_add_employer_30_Template_app_add_employer_basePeriodIndex_0_listener($event) { i0.ɵɵrestoreView(_r77); const ctx_r78 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r78.deleteBpEmpl($event)); })("modelCancel", function EmployerGridComponent_app_add_employer_30_Template_app_add_employer_modelCancel_0_listener($event) { i0.ɵɵrestoreView(_r77); const ctx_r79 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r79.onModelCancel($event)); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵproperty("recordIndexToEdit", ctx_r3.indexToEdit)("isBasePeriodEmployer", ctx_r3.isBasePeriodEmployer)("isNewClaim", ctx_r3.isNewClaim)("dob", ctx_r3.claimantDob);
} }
function EmployerGridComponent_p_dialog_31_div_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r80 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate2(" ", i0.ɵɵpipeBind1(2, 2, "induction.confirm.employment.dba"), " ", ctx_r80.selectedEmployer.employerData.tradeName, "");
} }
function EmployerGridComponent_p_dialog_31_ng_template_20_Template(rf, ctx) { if (rf & 1) {
    const _r83 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "ion-button", 48);
    i0.ɵɵlistener("click", function EmployerGridComponent_p_dialog_31_ng_template_20_Template_ion_button_click_0_listener() { i0.ɵɵrestoreView(_r83); const ctx_r82 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r82.close()); });
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "ion-button", 49);
    i0.ɵɵlistener("click", function EmployerGridComponent_p_dialog_31_ng_template_20_Template_ion_button_click_3_listener() { i0.ɵɵrestoreView(_r83); const ctx_r84 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r84.removeBasePeriodEmployer()); });
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 2, "induction.employment.grid.popup.cancel"), " ");
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, "induction.employment.grid.popup.remove"), " ");
} }
const _c5 = () => ({ width: "45vw" });
const _c6 = () => ({ "1200px": "660px", "992px": "660px", "768px": "660px", "576px": "100vw" });
const _c7 = a0 => [a0];
function EmployerGridComponent_p_dialog_31_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "p-dialog", 44)(1, "h4", 45);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "ion-label");
    i0.ɵɵtext(5);
    i0.ɵɵtemplate(6, EmployerGridComponent_p_dialog_31_div_6_Template, 3, 4, "div", 29);
    i0.ɵɵelement(7, "br");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(8, "ion-label");
    i0.ɵɵelement(9, "div", 46);
    i0.ɵɵpipe(10, "trustHtml");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(11, "br");
    i0.ɵɵelementStart(12, "ion-label");
    i0.ɵɵtext(13);
    i0.ɵɵpipe(14, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(15, "br")(16, "br");
    i0.ɵɵelementStart(17, "ion-label");
    i0.ɵɵelement(18, "div", 2);
    i0.ɵɵpipe(19, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(20, EmployerGridComponent_p_dialog_31_ng_template_20_Template, 6, 6, "ng-template", 47);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r4 = i0.ɵɵnextContext();
    i0.ɵɵstyleMap(i0.ɵɵpureFunction0(22, _c5));
    i0.ɵɵproperty("visible", ctx_r4.showConfirmPopup)("modal", true)("breakpoints", i0.ɵɵpureFunction0(23, _c6))("baseZIndex", 5000)("draggable", false)("resizable", false);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 14, "induction.employment.grid.popup.heading"));
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1(" ", ctx_r4.selectedEmployer.employerData.displayName, " ");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r4.selectedEmployer.employerData.tradeName != null);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("innerHtml", i0.ɵɵpipeBind1(10, 16, ctx_r4.selectedEmployer.employerData.mailingAddressDisplay), i0.ɵɵsanitizeHtml);
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(14, 18, "induction.employment.grid.popup.failure.label"), " ");
    i0.ɵɵadvance(5);
    i0.ɵɵproperty("innerHtml", i0.ɵɵpureFunction1(24, _c7, i0.ɵɵpipeBind1(19, 20, "induction.employment.grid.popup.didnt.work.label")), i0.ɵɵsanitizeHtml);
} }
export class EmployerGridComponent {
    constructor(popup, logger, validationService, navController, util, ls, activatedRoute, claimsService, storage) {
        this.popup = popup;
        this.logger = logger;
        this.validationService = validationService;
        this.navController = navController;
        this.util = util;
        this.ls = ls;
        this.activatedRoute = activatedRoute;
        this.claimsService = claimsService;
        this.storage = storage;
        this.claimAppEmpResponseModelFromService = new ClaimAppEmpResponseModel();
        this.modelDisplay = new EventEmitter();
        this.onComplete = new EventEmitter();
        this.claimdetailModel = new ClaimAppEmployerDetailsModel();
        this.caimAppEmpResponseModel = new ClaimAppEmpResponseModel();
        this.isBasePeriodEmployer = false;
        this.isNewClaim = false;
        this.showConfirmPopup = false;
        this.showProgressBar = false;
        this.uuid = null;
        this.dischargeReasonOptionsAll = [];
        this.volQuitReasonOptionsAll = [];
        this.employmentStatusOptionsAll = [];
        this.payRateOptions = ComboOption.PAY_PERIOD;
        this.countryOptions = ComboOption.COUNTRY;
        this.workCountryOptions = ComboOption.WORK_COUNTRY;
        this.statesOptions = ComboOption.US_STATES;
        this.militaryServiceOptions = ComboOption.MILITARY_SERVICE;
        this.onChange = (value) => {
        };
        this.onTouch = () => {
        };
    }
    loadMasterData() {
        this.claimsService.loadMasterData();
        this.claimsService.getReasonSeparation().subscribe(value => {
            value.forEach(arr => this.employmentStatusOptionsAll.push(arr));
        });
        this.claimsService.getDischargeReasons().subscribe(value => {
            value.forEach(arr => this.dischargeReasonOptionsAll.push(arr));
        });
        this.claimsService.getQuitReasons().subscribe(value => {
            value.forEach(arr => this.volQuitReasonOptionsAll.push(arr));
        });
    }
    ngOnInit() {
        this.logger.debug('ng onit of employer grid');
        this.loadMasterData();
        this.cols = [
            { field: 'employer', header: 'Employer' },
            { field: 'jobTitle', header: 'Job Title' },
            { field: 'Pay', header: 'Pay' },
            { field: 'startEndDate', header: 'Start and End' },
            { field: 'separationReason', header: 'Separation Reason' },
            { field: '', header: '' }
        ];
        if (this.validationService.bpEmpLstFrmService) {
            this.validationService.bpEmpLstFrmService.subscribe(res => {
                if (res) {
                    this.claimAppEmpResponseModelFromService = res.valueOf();
                    if (this.claimAppEmpResponseModelFromService && this.claimAppEmpResponseModelFromService.isNewClaimApplication) {
                        this.isNewClaim = this.claimAppEmpResponseModelFromService.isNewClaimApplication.valueOf();
                        this.claimantDob = new Date(this.claimAppEmpResponseModelFromService.dateOfBirth.replace("-", "/").replace("-", "/"));
                    }
                }
            });
        }
    }
    async addNewEmpDetails() {
        this.display = true;
        this.isBasePeriodEmployer = false;
        this.modelDisplay.emit(true);
    }
    writeValue(value) {
        if (value) {
            this.validationService.bpEmpLstFrmService.next(value);
        }
        else if (this.validationService.bpEmpLstFrmService.getValue()) {
            this.validationService.bpEmpLstFrmService.next(this.validationService.bpEmpLstFrmService.getValue());
            this.onChange(this.validationService.bpEmpLstFrmService.getValue());
        }
        else {
            this.setupEmployer();
        }
    }
    registerOnChange(fn) {
        this.onChange = fn;
        this.validationService.bpEmpLstFrmService.subscribe(fn);
    }
    registerOnTouched(fn) {
        this.onTouch = fn;
    }
    async getIdentifier() {
        let uuid;
        let data = this.activatedRoute.snapshot.queryParamMap.get('identifier');
        this.logger.debug("data for identifier is : ", data);
        if (data) {
            uuid = data;
        }
        else {
            uuid = await this.storage.get(FbConstants.uuid);
        }
        return uuid;
    }
    async setupEmployer() {
        let model = new ClaimAppEmpRequestModel();
        if (!this.validationService.bpEmpLstFrmService.getValue()) {
            this.uuid = await this.getIdentifier();
            this.logger.debug('uuid is ====', this.uuid);
            let url = "";
            if (this.ls.isClaimant() === true) {
                url = "/claims-service/claim/claimant/app/bpemployers";
                let processtype = this.activatedRoute.snapshot.queryParamMap.get('processtype');
                if (processtype === 'aic-reopen') {
                    this.storage.remove(FbConstants.uuid);
                    //this.logger.debug('objData ====', objData);
                    model.flowFrom = "Aic-Reopen-flow";
                }
            }
            else {
                url = "/claims-service/claim/app/bpemployers";
                let processtype = this.activatedRoute.snapshot.queryParamMap.get('processtype');
                if (processtype === 'aic-reopen') {
                    model.flowFrom = "Aic-Reopen-flow";
                }
            }
            this.logger.debug('the uuid used in model is : ', this.uuid);
            if (model.flowFrom === 'Aic-Reopen-flow') {
                this.logger.debug("Inside aic reopen flow");
                this.fetchEmployersFromBackEnd(model, url);
            }
            else if (this.uuid) {
                this.logger.debug("Inside getting values based on uuid");
                model.uuid = this.uuid;
                this.fetchEmployersFromBackEnd(model, url);
            }
            else {
                this.logger.debug("Keep waiting....uuid not found..");
            }
        }
    }
    fetchEmployersFromBackEnd(model, url) {
        this.showProgressBar = true;
        this.validationService.post(url, model).subscribe(res => {
            if (res.bpEmpList.length > 0) {
                res.bpEmpList.forEach(emp => this.setChoiseModels(emp));
            }
            this.validationService.bpEmpLstFrmService.next(res);
            this.onComplete.emit(this.validationService.bpEmpLstFrmService.getValue());
            this.onChange(this.validationService.bpEmpLstFrmService.getValue());
            this.logger.debug('employer List from Service', this.validationService.bpEmpLstFrmService.getValue());
            this.showProgressBar = false;
        }, err => {
            let list = new ClaimAppEmpResponseModel();
            this.validationService.bpEmpLstFrmService.next(list);
            this.showProgressBar = false;
        });
    }
    deleteBpEmpl(event) {
        this.logger.debug('Delete method called ', event);
        this.claimAppEmpResponseModelFromService.bpEmpList.splice(event, 1);
    }
    deleteEmployer(elementIndex) {
        this.logger.debug('Delete method called for = ', elementIndex);
        this.isBasePeriodEmployer = false;
        //this.claimAppEmpResponseModelFromService.bpEmpList[elementIndex].empDeleted = "Y";
        this.claimAppEmpResponseModelFromService.bpEmpList.splice(elementIndex, 1);
        this.logger.debug('After delete list is = ', this.claimAppEmpResponseModelFromService);
    }
    deleteEmployerBasePeriod(elementIndex) {
        this.logger.debug('Delete method base period employer called for = ', elementIndex);
        this.validationService.bpEmpLstFrmService.getValue().bpEmpList[elementIndex].workFlag = "N";
        this.validationService.bpEmpLstFrmService.getValue().bpEmpList[elementIndex].empDeleted = "Y";
        this.logger.debug('After delete base period employer list is = ', this.claimAppEmpResponseModelFromService);
    }
    editEmployer(employer) {
        this.logger.debug('Edit method called', employer);
        this.indexToEdit = this.claimAppEmpResponseModelFromService.bpEmpList.indexOf(employer);
        this.logger.debug('Index To Edit = ', this.indexToEdit);
        this.display = true;
    }
    finish(employer) {
        this.logger.debug('Finish Employer called', employer);
        this.indexToEdit = this.claimAppEmpResponseModelFromService.bpEmpList.indexOf(employer);
        employer.workFlag = 'Y';
        this.isBasePeriodEmployer = true;
        this.display = true;
        this.modelDisplay.emit(true);
    }
    editBasePeriodEmployer(employer) {
        this.logger.debug('Edit BasePeriod Employer called for ', employer);
        this.indexToEdit = this.claimAppEmpResponseModelFromService.bpEmpList.indexOf(employer);
        this.display = true;
        this.isBasePeriodEmployer = true;
        this.logger.debug('Index To Edit = ', this.indexToEdit);
    }
    onModelCancel(cancel) {
        this.logger.debug('Cancel Method  ', cancel);
        this.display = cancel;
        this.basePerioddisplay = cancel;
        this.indexToEdit = null;
        this.isBasePeriodEmployer = false;
        this.logger.debug('after value change on employer grid ', this.display);
    }
    addEmployer(event) {
        this.logger.debug('Add Employer called from grid ', event, 'indexToEdit', this.indexToEdit, 'this.isBasePeriodEmployer', this.isBasePeriodEmployer);
        event.empDeleted = 'N';
        if (this.indexToEdit || this.indexToEdit == 0) {
            this.logger.debug('Inside if of add employer -- ', event);
            let empDataModel = new ClaimOnlyEmployerDataModel();
            let empProvidedWageModel = new EmployerWagesModel();
            if (this.isBasePeriodEmployer) {
                this.claimdetailModel = new ClaimAppEmployerDetailsModel();
                this.claimdetailModel = event;
                empDataModel = this.validationService.bpEmpLstFrmService.getValue().bpEmpList[this.indexToEdit].employerData;
                empProvidedWageModel = this.validationService.bpEmpLstFrmService.getValue().bpEmpList[this.indexToEdit].employerProvidedWages;
                event.bpEmployerFlag = '1';
                event.employerData = empDataModel;
                event.employerProvidedWages = empProvidedWageModel;
                this.logger.debug('resetting the value again =  ', event);
            }
            else {
                this.claimdetailModel = new ClaimAppEmployerDetailsModel();
                this.claimdetailModel = event;
                empDataModel = new ClaimOnlyEmployerDataModel();
                if (event.employerType === 'REG') {
                    empDataModel.displayName = event.employerName;
                    empDataModel.mailingAddressDisplay =
                        event.address['streetAddress'] + ' ' + event.address['city'] + '-' + (event.address['state'] ? event.address['state'].text : '') + '-' + (event.address['country'] ? event.address['country'].value : '');
                }
                else if (event.employerType === 'FED') {
                    empDataModel.displayName = event.fedEmployerName;
                    empDataModel.mailingAddressDisplay =
                        event.address['streetAddress'] + ' ' + event.address['city'] + '-' + (event.address['state'] ? event.address['state'].text : '') + '-' + (event.address['country'] ? event.address['country'].value : '');
                }
                else {
                    this.logger.debug("no address for this employer type");
                }
                empDataModel.employerType = event.employerType;
                event.employerData = empDataModel;
                empDataModel.employerId = event.employerId;
                empDataModel.mailAddressLine1 = event.address?.streetAddress;
                empDataModel.mailAddressLine2 = event.address?.optionalAddress;
                event.bpEmployerFlag = '0';
            }
            this.validationService.bpEmpLstFrmService.getValue().bpEmpList[this.indexToEdit] = event;
        }
        else {
            this.logger.debug('Inside else of add employer -- ', event);
            this.claimdetailModel = new ClaimAppEmployerDetailsModel();
            let empDataModel = new ClaimOnlyEmployerDataModel();
            this.claimdetailModel = event;
            empDataModel = new ClaimOnlyEmployerDataModel();
            if (event.employerType === 'REG') {
                empDataModel.displayName = event.employerName;
                empDataModel.mailingAddressDisplay =
                    event.address['streetAddress'] + ' ' + event.address['city'] + '-' + (event.address['state'] ? event.address['state'].text : '') + '-' + (event.address['country'] ? event.address['country'].value : '');
            }
            else if (event.employerType === 'FED') {
                empDataModel.displayName = event.fedEmployerName;
                empDataModel.mailingAddressDisplay =
                    event.address['streetAddress'] + ' ' + event.address['city'] + '-' + (event.address['state'] ? event.address['state'].text : '') + '-' + (event.address['country'] ? event.address['country'].value : '');
            }
            else {
                this.logger.debug("Inside else - no address for this employer type");
            }
            empDataModel.employerType = event.employerType;
            empDataModel.employerId = event.employerId;
            empDataModel.mailAddressLine1 = event.address?.streetAddress;
            empDataModel.mailAddressLine2 = event.address?.optionalAddress;
            if (this.isBasePeriodEmployer) {
                this.claimdetailModel.bpEmployerFlag = '1';
            }
            else {
                this.claimdetailModel.bpEmployerFlag = '0';
            }
            this.claimdetailModel.employerData = empDataModel;
            this.validationService.bpEmpLstFrmService.getValue().bpEmpList.push(this.claimdetailModel);
        }
        this.display = false;
        this.indexToEdit = null;
    }
    removeEmployment(selectedEmployer, index) {
        this.indexToEdit = index;
        this.selectedEmployer = selectedEmployer;
        this.showConfirmPopup = true;
    }
    removeBasePeriodEmployer() {
        this.deleteEmployerBasePeriod(this.indexToEdit);
        this.showConfirmPopup = false;
        this.selectedEmployer = null;
        this.indexToEdit = null;
    }
    restoreEmployment(selectedEmployer, index) {
        this.logger.debug('Delete method base period employer called for = ', index);
        let currentWorkFlagValue = this.validationService.bpEmpLstFrmService.getValue().bpEmpList[index].workFlag;
        this.validationService.bpEmpLstFrmService.getValue().bpEmpList[index].workFlag = currentWorkFlagValue ? (currentWorkFlagValue == "N" ? "Y" : "N") : null;
        this.validationService.bpEmpLstFrmService.getValue().bpEmpList[index].empDeleted = "N";
        this.logger.debug('After delete base period employer list is = ', this.claimAppEmpResponseModelFromService);
    }
    close() {
        this.indexToEdit = null;
        this.showConfirmPopup = false;
        this.selectedEmployer = null;
    }
    setChoiseModels(emp) {
        let sepReason = this.employmentStatusOptionsAll.filter(s => s.value == emp.reasonSeparation?.value);
        if (sepReason.length > 0) {
            emp.reasonSeparation = sepReason[0];
        }
        let dischargeReason = this.dischargeReasonOptionsAll.filter(s => s.value == emp.dischargeDetail?.value);
        if (dischargeReason.length > 0) {
            emp.dischargeDetail = dischargeReason[0];
        }
        let volQuit = this.volQuitReasonOptionsAll.filter(s => s.value == emp.volQuitDetails?.value);
        if (volQuit.length > 0) {
            emp.volQuitDetails = volQuit[0];
        }
        let payRateFrequency = this.payRateOptions.filter(s => s.value == emp.payRateFrequency?.value);
        if (payRateFrequency.length > 0) {
            emp.payRateFrequency = payRateFrequency[0];
        }
        let country = this.workCountryOptions.filter(s => s.value == emp.fedWorkCountry?.value);
        if (country.length > 0) {
            emp.fedWorkCountry = country[0];
        }
        let state = this.statesOptions.filter(s => s.value == emp.fedWorkState?.value);
        if (state.length > 0) {
            emp.fedWorkState = state[0];
        }
        let serviceBranch = this.militaryServiceOptions.filter(s => s.value == emp.serviceBranch?.value);
        if (serviceBranch.length > 0) {
            emp.serviceBranch = serviceBranch[0];
        }
        let workState = this.statesOptions.filter(s => s.value == emp.workState?.value?.trim());
        emp.workState = workState[0];
    }
    static { this.ɵfac = function EmployerGridComponent_Factory(t) { return new (t || EmployerGridComponent)(i0.ɵɵdirectiveInject(i1.PopoverController), i0.ɵɵdirectiveInject(i2.LoggerService), i0.ɵɵdirectiveInject(i3.ValidationService), i0.ɵɵdirectiveInject(i1.NavController), i0.ɵɵdirectiveInject(i4.UtilService), i0.ɵɵdirectiveInject(i5.LoginService), i0.ɵɵdirectiveInject(i6.ActivatedRoute), i0.ɵɵdirectiveInject(i7.ClaimService), i0.ɵɵdirectiveInject(i8.Storage)); }; }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: EmployerGridComponent, selectors: [["app-employer-grid"]], inputs: { form: "form", dynamicParam: "dynamicParam" }, outputs: { modelDisplay: "modelDisplay", onComplete: "onComplete" }, features: [i0.ɵɵProvidersFeature([{
                    provide: NG_VALUE_ACCESSOR,
                    useExisting: EmployerGridComponent,
                    multi: true
                }])], decls: 32, vars: 39, consts: [[2, "margin-left", "-5px", 3, "formGroup"], [3, "icon"], [3, "innerHtml"], [1, "mobile-action-view"], [1, "action-icon", "font-bold", 3, "icon"], ["style", "display: inline-block;", 4, "ngIf"], ["class", "mobile-action-view", 4, "ngIf"], ["styleClass", "p-datatable-striped app-datatable ion-padding-top", 3, "columns", "value", "loading", "rowHover", 4, "ngIf"], [3, "recordIndexToEdit", "isBasePeriodEmployer", "isNewClaim", "dob", "success", "basePeriodIndex", "modelCancel", 4, "ngIf"], ["appendTo", "body", "position", "top", "appendTo", "body", "closeOnEscape", "false", 3, "visible", "modal", "breakpoints", "style", "baseZIndex", "draggable", "resizable", 4, "ngIf"], [2, "display", "inline-block"], ["styleClass", "p-datatable-striped app-datatable ion-padding-top", 3, "columns", "value", "loading", "rowHover"], ["dt", ""], ["pTemplate", "header"], ["pTemplate", "body"], ["pTemplate", "summary"], ["colspan", "2", 1, "dataHeadings", 2, "width", "20%"], ["class", "ui-selectable-row", 3, "ngClass", 4, "ngIf"], [1, "ui-selectable-row", 3, "ngClass"], ["colspan", "2", "class", "dataHeadings", "style", "width:20%;", 4, "ngIf", "ngIfElse"], ["workState", ""], ["notOsaBpAndRegEmployer", ""], ["colspan", "2", "class", "dataHeadings", "style", "width:20%;", 4, "ngIf"], [2, "text-align", "center"], ["size", "small", "color", "success", "fill", "outline", "class", "action-button", "aria-label", "Add employer", 3, "click", 4, "ngIf"], ["size", "small", "color", "success", "fill", "outline", "class", "action-button", "aria-label", "Edit employer", 3, "click", 4, "ngIf"], ["size", "small", "color", "success", "fill", "outline", "class", "action-button", "aria-label", "Confirm employer", 3, "id", "click", 4, "ngIf"], ["size", "small", "color", "success", "fill", "outline", "class", "action-button", "aria-label", "Remove employer", "style", "padding-left: 5px;", 3, "id", "click", 4, "ngIf"], ["size", "small", "color", "success", "fill", "outline", "class", "action-button", "aria-label", "Restore", 3, "click", 4, "ngIf"], [4, "ngIf"], ["colspan", "4"], [1, "p-column-title"], [1, "displayName"], [1, "displayNameText", 2, "font-size", "12px", 3, "innerHtml"], ["size", "small", "color", "success", "fill", "outline", "aria-label", "Add employer", 1, "action-button", 3, "click"], [1, "action-icon", 3, "icon"], ["size", "small", "color", "success", "fill", "outline", "aria-label", "Edit employer", 1, "action-button", 3, "click"], ["size", "small", "color", "success", "fill", "outline", "aria-label", "Confirm employer", 1, "action-button", 3, "id", "click"], ["size", "small", "color", "success", "fill", "outline", "aria-label", "Remove employer", 1, "action-button", 2, "padding-left", "5px", 3, "id", "click"], ["size", "small", "color", "success", "fill", "outline", "aria-label", "Restore", 1, "action-button", 3, "click"], [1, "action-footer", 2, "width", "40%"], [1, "add-employer"], ["fill", "outline", "size", "small", "aria-label", "Add employer", 1, "action-button", 3, "id", "click"], [3, "recordIndexToEdit", "isBasePeriodEmployer", "isNewClaim", "dob", "success", "basePeriodIndex", "modelCancel"], ["appendTo", "body", "position", "top", "appendTo", "body", "closeOnEscape", "false", 3, "visible", "modal", "breakpoints", "baseZIndex", "draggable", "resizable"], [1, "heading"], [2, "font-size", "12px", 3, "innerHtml"], ["pTemplate", "footer"], ["shape", "round", "type", "submit", "fill", "outline", 3, "click"], ["shape", "round", "type", "submit", "fill", "solid", 3, "click"]], template: function EmployerGridComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div", 0)(1, "ion-row")(2, "ion-col");
            i0.ɵɵelement(3, "fa-icon", 1)(4, "span", 2);
            i0.ɵɵpipe(5, "trustHtml");
            i0.ɵɵpipe(6, "translate");
            i0.ɵɵpipe(7, "trustHtml");
            i0.ɵɵpipe(8, "translate");
            i0.ɵɵtext(9, ",\u00A0 ");
            i0.ɵɵelement(10, "br", 3)(11, "fa-icon", 4)(12, "span", 2);
            i0.ɵɵpipe(13, "trustHtml");
            i0.ɵɵpipe(14, "translate");
            i0.ɵɵtext(15, ",\u00A0 ");
            i0.ɵɵelement(16, "br", 3)(17, "fa-icon", 4)(18, "span", 2);
            i0.ɵɵpipe(19, "trustHtml");
            i0.ɵɵpipe(20, "translate");
            i0.ɵɵtext(21, ",\u00A0 ");
            i0.ɵɵelement(22, "br", 3);
            i0.ɵɵtemplate(23, EmployerGridComponent_div_23_Template, 6, 7, "div", 5)(24, EmployerGridComponent_br_24_Template, 1, 0, "br", 6);
            i0.ɵɵelement(25, "fa-icon", 4)(26, "span", 2);
            i0.ɵɵpipe(27, "trustHtml");
            i0.ɵɵpipe(28, "translate");
            i0.ɵɵelementEnd()();
            i0.ɵɵtemplate(29, EmployerGridComponent_p_table_29_Template, 5, 4, "p-table", 7)(30, EmployerGridComponent_app_add_employer_30_Template, 1, 4, "app-add-employer", 8)(31, EmployerGridComponent_p_dialog_31_Template, 21, 26, "p-dialog", 9);
            i0.ɵɵelementEnd();
        } if (rf & 2) {
            i0.ɵɵproperty("formGroup", ctx.form);
            i0.ɵɵadvance(3);
            i0.ɵɵproperty("icon", ctx.util.isState("MS") ? i0.ɵɵpureFunction0(34, _c0) : i0.ɵɵpureFunction0(35, _c1));
            i0.ɵɵadvance(1);
            i0.ɵɵproperty("innerHtml", ctx.util.isState("MS") ? i0.ɵɵpipeBind1(5, 14, i0.ɵɵpipeBind1(6, 16, "induction.employment.subheader.confirm.ms")) : i0.ɵɵpipeBind1(7, 18, i0.ɵɵpipeBind1(8, 20, "induction.employment.subheader.confirm")), i0.ɵɵsanitizeHtml);
            i0.ɵɵadvance(7);
            i0.ɵɵproperty("icon", i0.ɵɵpureFunction0(36, _c2));
            i0.ɵɵadvance(1);
            i0.ɵɵproperty("innerHtml", i0.ɵɵpipeBind1(13, 22, i0.ɵɵpipeBind1(14, 24, "induction.employment.subheader.delete")), i0.ɵɵsanitizeHtml);
            i0.ɵɵadvance(5);
            i0.ɵɵproperty("icon", i0.ɵɵpureFunction0(37, _c4));
            i0.ɵɵadvance(1);
            i0.ɵɵproperty("innerHtml", i0.ɵɵpipeBind1(19, 26, i0.ɵɵpipeBind1(20, 28, "induction.employment.subheader.add")), i0.ɵɵsanitizeHtml);
            i0.ɵɵadvance(5);
            i0.ɵɵproperty("ngIf", !ctx.util.isState("MS"));
            i0.ɵɵadvance(1);
            i0.ɵɵproperty("ngIf", !ctx.util.isState("MS"));
            i0.ɵɵadvance(1);
            i0.ɵɵproperty("icon", i0.ɵɵpureFunction0(38, _c3));
            i0.ɵɵadvance(1);
            i0.ɵɵproperty("innerHtml", i0.ɵɵpipeBind1(27, 30, i0.ɵɵpipeBind1(28, 32, "induction.employment.subheader.restore")), i0.ɵɵsanitizeHtml);
            i0.ɵɵadvance(3);
            i0.ɵɵproperty("ngIf", ctx.claimAppEmpResponseModelFromService);
            i0.ɵɵadvance(1);
            i0.ɵɵproperty("ngIf", ctx.display);
            i0.ɵɵadvance(1);
            i0.ɵɵproperty("ngIf", ctx.selectedEmployer);
        } }, dependencies: [i1.IonButton, i1.IonCol, i1.IonLabel, i1.IonRow, i9.NgClass, i9.NgIf, i10.PrimeTemplate, i11.NgControlStatusGroup, i11.FormGroupDirective, i12.Dialog, i13.Table, i14.FaIconComponent, i15.AddEmployerComponent, i9.CurrencyPipe, i9.DatePipe, i16.TranslatePipe, i17.TrustHtmlPipe], styles: [".add-employer[_ngcontent-%COMP%]{width:9.75%;text-align:right}.mobile-action-view[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%]     .p-datatable-worksearch .p-datatable-tbody>tr>td .p-column-title{display:none}[_nghost-%COMP%]     .p-datatable.p-datatable-worksearch .p-datatable-thead>tr>th, [_nghost-%COMP%]     .p-datatable.p-datatable-worksearch .p-datatable-tfoot>tr>td{color:var(--ion-color-primary);text-align:left;font-weight:700;padding:8px;width:-webkit-fill-available!important}[_nghost-%COMP%]     .p-datatable.p-datatable-worksearch .p-datatable-tbody>tr>td{font-size:16px;padding:3px;width:-webkit-fill-available!important}[_nghost-%COMP%]     .p-datatable.p-datatable-striped .p-datatable-tbody>tr:nth-child(2n){background:none}@media screen and (max-width: 767px){.mobile-action-view[_ngcontent-%COMP%]{display:block}}@media screen and (max-width: 40rem){.action-footer[_ngcontent-%COMP%]{width:300px!important}ion-col[_ngcontent-%COMP%]{text-align:left!important}.dataHeadings[_ngcontent-%COMP%]{width:500px!important}[_nghost-%COMP%]     .p-datatable.p-datatable-worksearch .p-datatable-thead>tr>th, [_nghost-%COMP%]     .p-datatable.p-datatable-worksearch .p-datatable-tfoot>tr>td{display:none!important}[_nghost-%COMP%]     .p-datatable.p-datatable-worksearch .p-datatable-tbody>tr>td{text-align:left!important;display:block;width:100%!important;float:left;clear:left;border:0 none}[_nghost-%COMP%]     .p-datatable.p-datatable-worksearch .p-datatable-tbody>tr>td .p-column-title{padding:.6rem;min-width:30%;display:inline-block;margin:-.4em 1em -.4em -.4rem;font-weight:700}[_nghost-%COMP%]     .p-datatable.p-datatable-worksearch .p-datatable-tbody>tr>td:last-child{border-bottom:1px solid var(--surface-d)}}@media screen and (max-width: 40rem){[_nghost-%COMP%]     .p-datatable.app-datatable .p-datatable-thead>tr>th, [_nghost-%COMP%]     .p-datatable.app-datatable .p-datatable-tfoot>tr>td{display:none!important}[_nghost-%COMP%]     .p-datatable.app-datatable .p-datatable-tbody>tr>td .p-column-title{padding:.6rem;min-width:0%!important;display:inline-block;margin:-.4em 1em -.4em -.4rem;font-weight:700}}@media (min-width: 767px) and (max-width: 1325px){.displayNameText[_ngcontent-%COMP%]{font-size:12px!important;width:max-content}}.strikethrough[_ngcontent-%COMP%]{text-decoration:line-through}"] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EmployerGridComponent, [{
        type: Component,
        args: [{ selector: 'app-employer-grid', providers: [{
                        provide: NG_VALUE_ACCESSOR,
                        useExisting: EmployerGridComponent,
                        multi: true
                    }], changeDetection: ChangeDetectionStrategy.Default, template: "<div [formGroup]=\"form\" style=\"margin-left: -5px;\">\r\n<ion-row>\r\n  <ion-col>    \r\n    <fa-icon [icon]=\"util.isState('MS') ? ['fal', 'edit'] : ['fal', 'check-circle']\"></fa-icon>\r\n    <span [innerHtml]=\"util.isState('MS') ? ('induction.employment.subheader.confirm.ms' | translate | trustHtml) : ('induction.employment.subheader.confirm' | translate | trustHtml)\"></span>,&nbsp;\r\n    <br class=\"mobile-action-view\">\r\n    <fa-icon [icon]=\"['fal', 'trash-alt']\" class=\"action-icon font-bold\"></fa-icon>\r\n    <span [innerHtml]=\"'induction.employment.subheader.delete' | translate | trustHtml\"></span>,&nbsp;\r\n    <br class=\"mobile-action-view\">\r\n    <fa-icon [icon]=\"['fal', 'plus']\" class=\"action-icon font-bold\"></fa-icon>\r\n    <span [innerHtml]=\"'induction.employment.subheader.add' | translate | trustHtml\"></span>,&nbsp;\r\n    <br class=\"mobile-action-view\">\r\n    <div *ngIf=\"!util.isState('MS')\" style=\"display: inline-block;\">\r\n    <fa-icon [icon]=\"['fal', 'edit']\" class=\"action-icon font-bold\"></fa-icon>\r\n    <span [innerHtml]=\"'induction.employment.subheader.edit' | translate | trustHtml\"></span>,&nbsp;\r\n    </div>\r\n    <br *ngIf=\"!util.isState('MS')\" class=\"mobile-action-view\">\r\n    <fa-icon [icon]=\"['fal', 'trash-restore-alt']\" class=\"action-icon font-bold\"></fa-icon>\r\n    <span [innerHtml]=\"'induction.employment.subheader.restore' | translate | trustHtml\"></span>\r\n  </ion-col>\r\n</ion-row>\r\n\r\n<p-table #dt [columns]=\"cols\" [value]=\"claimAppEmpResponseModelFromService.bpEmpList\" [loading]=\"showProgressBar\"\r\n [rowHover]=\"true\" *ngIf=\"claimAppEmpResponseModelFromService\" styleClass=\"p-datatable-striped app-datatable ion-padding-top\">\r\n  <ng-template pTemplate=\"header\" let-columns>\r\n    <tr>\r\n      <th colspan=\"2\" class=\"dataHeadings\" style=\"width:20%;\" >\r\n        {{\"induction.employment.table.employer.name\"|translate}}\r\n      </th>\r\n      <th>\r\n       </th>\r\n      <th>\r\n        {{\"induction.employment.table.job.title\"|translate}}\r\n       </th>\r\n       <th>\r\n        {{\"induction.employment.table.pay\"|translate}}\r\n       </th>\r\n       <th>\r\n        {{\"induction.employment.table.dates\"|translate}}\r\n       </th>\r\n       <th>\r\n        {{\"induction.employment.table.sep.reason\"|translate}}\r\n       </th>\r\n       \r\n    </tr>\r\n  </ng-template>\r\n  \r\n  <ng-template pTemplate=\"body\" let-employer let-rowIndex=\"rowIndex\">\r\n    <tr class=\"ui-selectable-row\" [ngClass]=\"employer.empDeleted=='Y' ? 'strikethrough' : null\" *ngIf=\"employer.displaySeasonalEmp === true\">\r\n      \r\n      <td *ngIf=\"employer.osaBpEmployerFlag === '1' && employer.employerType ==='REG' && employer.employerData.displayState != null; else workState\"  colspan=\"2\" class=\"dataHeadings\" style=\"width:20%;\" ><span class=\"p-column-title\">Employer</span><span class=\"displayName\">\r\n        {{employer.employerData.displayName}} - {{employer.employerData.displayState.text}}<br>\r\n      </span>\r\n      </td>\r\n      <ng-template #workState>\r\n        <td *ngIf=\"employer.osaBpEmployerFlag === '1' && employer.employerType ==='REG' && employer.workState != null; else notOsaBpAndRegEmployer\"  colspan=\"2\" class=\"dataHeadings\" style=\"width:20%;\" ><span class=\"p-column-title\">Employer</span><span class=\"displayName\">\r\n          {{employer.employerData.displayName}} - {{employer.workState.text}}<br>\r\n        </span>\r\n        </td>\r\n      </ng-template>\r\n      <ng-template #notOsaBpAndRegEmployer>\r\n        <td *ngIf=\"employer.employerData.displayName && employer.employerType!='MIL'\"  colspan=\"2\" class=\"dataHeadings\" style=\"width:20%;\" ><span class=\"p-column-title\">Employer</span><span class=\"displayName\">\r\n          {{employer.employerData.displayName}} <br>\r\n        </span><div style=\"font-size: 12px;\" class=\"displayNameText\" [innerHtml]=\"employer.employerData.mailingAddressDisplay | trustHtml\">\r\n        </div>\r\n        </td>         \r\n      </ng-template>\r\n        \r\n      <td *ngIf=\"!employer.employerData.displayName && employer.employerType!='MIL'\"  colspan=\"2\" class=\"dataHeadings\" style=\"width:20%;\" ><span class=\"p-column-title\">Employer</span><span>\r\n        </span>\r\n      </td>\r\n\r\n      <td *ngIf=\"employer.employerType==='MIL'\" colspan=\"2\" class=\"dataHeadings\" style=\"width:20%;\" ><span class=\"p-column-title\">Employer</span><span>\r\n          {{employer.serviceBranch.text}} <br>\r\n        </span>\r\n      </td>\r\n      <td style=\"text-align: center;\"> \r\n        <ion-button size=\"small\"  *ngIf=\"employer.bpEmployerFlag==='1' && employer.payRate && employer.startDate && employer.empDeleted!='Y'\" color=\"success\" fill=\"outline\" \r\n          (click)=\"editBasePeriodEmployer(employer);\" class=\"action-button\" aria-label=\"Add employer\">\r\n          <fa-icon [icon]=\"['fal', 'edit']\" class=\"action-icon\"></fa-icon>\r\n        </ion-button>\r\n\r\n        <ion-button size=\"small\" *ngIf=\"employer.bpEmployerFlag==='0'\" color=\"success\" fill=\"outline\" \r\n          (click)=\"editEmployer(employer);\" class=\"action-button\" aria-label=\"Edit employer\">\r\n          <fa-icon [icon]=\"['fal', 'edit']\" class=\"action-icon\"></fa-icon>\r\n        </ion-button>\r\n\r\n        <ion-button [id]=\"'btnConfirmEmployer-' + rowIndex\" size=\"small\" *ngIf=\"employer.bpEmployerFlag==='1' && !employer.payRate && !employer.startDate && employer.empDeleted!='Y'\" color=\"success\" fill=\"outline\" \r\n          (click)=\"finish(employer);\" class=\"action-button\" aria-label=\"Confirm employer\">\r\n          <fa-icon [icon]=\"util.isState('MS') ? ['fal', 'edit'] : ['fal', 'check-circle']\" class=\"action-icon\"></fa-icon>\r\n        </ion-button>\r\n\r\n        <ion-button [id]=\"'btnDeleteEmployer-' + rowIndex\" size=\"small\" *ngIf=\"employer.bpEmployerFlag==='0'\" color=\"success\" fill=\"outline\" \r\n          (click)=\"deleteEmployer(rowIndex);\" class=\"action-button\" aria-label=\"Remove employer\" style=\"padding-left: 5px;\">\r\n          <fa-icon [icon]=\"['fal', 'trash-alt']\" class=\"action-icon\"></fa-icon>\r\n        </ion-button>\r\n\r\n        <ion-button [id]=\"'btnRemoveEmployer-' + rowIndex\" size=\"small\" *ngIf=\"employer.bpEmployerFlag==='1' && employer.empDeleted!='Y'\" color=\"success\" fill=\"outline\" \r\n          (click)=\"removeEmployment(employer, rowIndex);\" class=\"action-button\" aria-label=\"Remove employer\" style=\"padding-left: 5px;\">\r\n          <fa-icon [icon]=\"['fal', 'trash-alt']\" class=\"action-icon\"></fa-icon>\r\n        </ion-button>\r\n\r\n        <ion-button size=\"small\" *ngIf=\"employer.bpEmployerFlag==='1' && employer.empDeleted=='Y'\" color=\"success\" fill=\"outline\" \r\n          (click)=\"restoreEmployment(employer, rowIndex);\" class=\"action-button\" aria-label=\"Restore\">\r\n          <fa-icon [icon]=\"['fal', 'trash-restore-alt']\" class=\"action-icon\"></fa-icon>\r\n        </ion-button>\r\n      </td>    \r\n      <td *ngIf=\"employer.jobTileOrPosition && !employer.fedJobTileOrPosition\"><span class=\"p-column-title\">Job Title</span>{{employer.jobTileOrPosition}}</td>\r\n\r\n      <td *ngIf=\"employer.fedJobTileOrPosition && !employer.jobTileOrPosition\"><span class=\"p-column-title\">Job Title</span>{{employer.fedJobTileOrPosition}}</td>\r\n\r\n      <td *ngIf=\"employer.employerType =='MIL'\"><span class=\"p-column-title\">Job Title</span></td>\r\n\r\n            \r\n      <td *ngIf=\"employer.employerType !='MIL' && employer.payRate && employer.payRateFrequency\"><span class=\"p-column-title\">Pay</span>{{employer.payRate | currency}}/{{employer.payRateFrequency.text}}</td>\r\n      <td *ngIf=\"employer.employerType =='MIL'\"><span class=\"p-column-title\">Pay</span></td>\r\n\r\n      \r\n      <td *ngIf=\"employer.employerType==='REG' && employer.startDate && employer.endDate\"><span class=\"p-column-title\">Start and End</span>\r\n        {{employer.startDate | date:'M/d/yyyy'}} - {{employer.endDate | date:'M/d/yyyy'}}\r\n      </td>\r\n      \r\n      <td *ngIf=\"employer.employerType==='FED' && employer.startDateFed && employer.endDateFed\"><span class=\"p-column-title\">Start and End</span>\r\n        {{employer.startDateFed | date:'M/d/yyyy'}} - {{employer.endDateFed | date:'M/d/yyyy'}}\r\n      </td>\r\n\r\n      <td *ngIf=\"employer.employerType==='MIL' && employer.startDateMil && employer.endDateMil\"><span class=\"p-column-title\">Start and End</span>\r\n        {{employer.startDateMil | date:'M/d/yyyy'}} - {{employer.endDateMil | date:'M/d/yyyy'}}\r\n      </td>\r\n\r\n\r\n      <td *ngIf=\"employer.employerType!='MIL' && employer.reasonSeparation\"><span class=\"p-column-title\">Separation Reason</span>{{employer.reasonSeparation.text}}\r\n      </td>\r\n\r\n      <td *ngIf=\"employer.employerType==='MIL'\"><span class=\"p-column-title\">Separation Reason</span>\r\n      </td>\r\n      \r\n      <td colspan=\"4\"></td>\r\n\r\n      \r\n      \r\n    </tr>\r\n  </ng-template>\r\n\r\n  <ng-template pTemplate=\"summary\" let-columns>\r\n    <table>\r\n      <tr>\r\n        <td [attr.colspan]=\"2\" style=\"width: 40%;\" class=\"action-footer\">\r\n          <div [innerHtml]=\"'induction.employment.footer.label' | translate | trustHtml\"></div>\r\n        </td>\r\n        <td class=\"add-employer\">\r\n          <ion-button fill=\"outline\" size=\"small\" class=\"action-button\" (click)=\"addNewEmpDetails()\" class=\"action-button\" aria-label=\"Add employer\" [id]=\"'btnAddEmployer'\">\r\n            <fa-icon [icon]=\"['fal', 'plus']\" class=\"action-icon\"></fa-icon>\r\n          </ion-button>\r\n        </td>\r\n        <td colspan=\"4\">&nbsp;</td>\r\n      </tr>\r\n    </table>\r\n  </ng-template>\r\n\r\n</p-table>\r\n  <app-add-employer *ngIf=\"display\" (success)=\"addEmployer($event)\"  [recordIndexToEdit]=\"indexToEdit\" \r\n    (basePeriodIndex)=\"deleteBpEmpl($event)\" [isBasePeriodEmployer]=\"isBasePeriodEmployer\" [isNewClaim]=\"isNewClaim\" \r\n    (modelCancel)=\"onModelCancel($event)\" [dob]=\"claimantDob\">\r\n  </app-add-employer>\r\n\r\n  <p-dialog [visible]=\"showConfirmPopup\" [modal]=\"true\" appendTo=\"body\" position=\"top\" [breakpoints]=\"{'1200px': '660px', '992px': '660px', '768px': '660px', '576px': '100vw'}\" [style]=\"{width: '45vw'}\"\r\n    [baseZIndex]=\"5000\" [draggable]=\"false\" [resizable]=\"false\" appendTo=\"body\" closeOnEscape=\"false\" *ngIf=\"selectedEmployer\">\r\n        <h4 class=\"heading\">{{'induction.employment.grid.popup.heading' | translate}}</h4>\r\n        <ion-label>\r\n          {{selectedEmployer.employerData.displayName}}\r\n          <div *ngIf=\"selectedEmployer.employerData.tradeName != null\">\r\n            {{\"induction.confirm.employment.dba\"|translate}} {{selectedEmployer.employerData.tradeName}}</div>\r\n          <br>\r\n        </ion-label>\r\n        <ion-label><div style=\"font-size: 12px;\" [innerHtml]=\"selectedEmployer.employerData.mailingAddressDisplay | trustHtml\"></div></ion-label><br/>\r\n        <ion-label>\r\n          {{'induction.employment.grid.popup.failure.label' | translate}}\r\n        </ion-label><br/><br/>\r\n        <ion-label>\r\n          <div [innerHtml]=\"['induction.employment.grid.popup.didnt.work.label' | translate]\"></div>\r\n        </ion-label>\r\n        <ng-template pTemplate=\"footer\">\r\n            <ion-button shape=\"round\" type=\"submit\" fill=\"outline\" (click)=\"close()\">\r\n              {{'induction.employment.grid.popup.cancel' | translate}}\r\n            </ion-button>\r\n            <ion-button shape=\"round\" type=\"submit\" fill=\"solid\" (click)=\"removeBasePeriodEmployer()\">\r\n              {{'induction.employment.grid.popup.remove' | translate}}\r\n            </ion-button>\r\n        </ng-template>\r\n    </p-dialog>\r\n</div>", styles: [".add-employer{width:9.75%;text-align:right}.mobile-action-view{display:none}:host ::ng-deep .p-datatable-worksearch .p-datatable-tbody>tr>td .p-column-title{display:none}:host ::ng-deep .p-datatable.p-datatable-worksearch .p-datatable-thead>tr>th,:host ::ng-deep .p-datatable.p-datatable-worksearch .p-datatable-tfoot>tr>td{color:var(--ion-color-primary);text-align:left;font-weight:700;padding:8px;width:-webkit-fill-available!important}:host ::ng-deep .p-datatable.p-datatable-worksearch .p-datatable-tbody>tr>td{font-size:16px;padding:3px;width:-webkit-fill-available!important}:host ::ng-deep .p-datatable.p-datatable-striped .p-datatable-tbody>tr:nth-child(2n){background:none}@media screen and (max-width: 767px){.mobile-action-view{display:block}}@media screen and (max-width: 40rem){.action-footer{width:300px!important}ion-col{text-align:left!important}.dataHeadings{width:500px!important}:host ::ng-deep .p-datatable.p-datatable-worksearch .p-datatable-thead>tr>th,:host ::ng-deep .p-datatable.p-datatable-worksearch .p-datatable-tfoot>tr>td{display:none!important}:host ::ng-deep .p-datatable.p-datatable-worksearch .p-datatable-tbody>tr>td{text-align:left!important;display:block;width:100%!important;float:left;clear:left;border:0 none}:host ::ng-deep .p-datatable.p-datatable-worksearch .p-datatable-tbody>tr>td .p-column-title{padding:.6rem;min-width:30%;display:inline-block;margin:-.4em 1em -.4em -.4rem;font-weight:700}:host ::ng-deep .p-datatable.p-datatable-worksearch .p-datatable-tbody>tr>td:last-child{border-bottom:1px solid var(--surface-d)}}@media screen and (max-width: 40rem){:host ::ng-deep .p-datatable.app-datatable .p-datatable-thead>tr>th,:host ::ng-deep .p-datatable.app-datatable .p-datatable-tfoot>tr>td{display:none!important}:host ::ng-deep .p-datatable.app-datatable .p-datatable-tbody>tr>td .p-column-title{padding:.6rem;min-width:0%!important;display:inline-block;margin:-.4em 1em -.4em -.4rem;font-weight:700}}@media (min-width: 767px) and (max-width: 1325px){.displayNameText{font-size:12px!important;width:max-content}}.strikethrough{text-decoration:line-through}\n"] }]
    }], () => [{ type: i1.PopoverController }, { type: i2.LoggerService }, { type: i3.ValidationService }, { type: i1.NavController }, { type: i4.UtilService }, { type: i5.LoginService }, { type: i6.ActivatedRoute }, { type: i7.ClaimService }, { type: i8.Storage }], { form: [{
            type: Input
        }], dynamicParam: [{
            type: Input
        }], modelDisplay: [{
            type: Output
        }], onComplete: [{
            type: Output
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EmployerGridComponent, { className: "EmployerGridComponent", filePath: "lib\\components\\employer-grid\\employer-grid.component.ts", lineNumber: 31 }); })();
//# sourceMappingURL=data:application/json;base64, 