import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core';
import { Validators } from '@angular/forms';
import { EmployerInfoModel } from '../../models/EmployerDetailSearchResult';
import { ComboOption } from '../../models/questionnaire/ComboModel';
import { AppValidators } from '../../validations/AppValidators';
import { BasePage } from '../../pages/BasePage';
import { WageCalculatorModel } from '../../models/WageCalculatorModel';
import * as i0 from "@angular/core";
import * as i1 from "../../services/util/util.service";
import * as i2 from "@angular/forms";
import * as i3 from "../../services/claims/claims.service";
import * as i4 from "@ionic/angular";
import * as i5 from "@angular/common";
import * as i6 from "primeng/inputtext";
import * as i7 from "primeng/inputmask";
import * as i8 from "primeng/calendar";
import * as i9 from "primeng/selectbutton";
import * as i10 from "primeng/inputnumber";
import * as i11 from "../error/error.component";
import * as i12 from "../overlay-info/overlay-info.component";
import * as i13 from "../search-employer/search-employer.component";
import * as i14 from "../dropdown/dropdown.component";
import * as i15 from "../wage-calculator/wage-calculator.component";
import * as i16 from "../../directives/strip-invisible-characters/strip-invisible-characters.directive";
import * as i17 from "@ngx-translate/core";
import * as i18 from "../../pipes/trust-html/trust-html.pipe";
const _c0 = ["empFormDirective"];
const _c1 = () => ({ required: "required" });
function WeeklyCertEmployerComponentQe_ion_row_3_div_47_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 8)(1, "label", 34);
    i0.ɵɵtext(2, "Do you know when you're returning to full-time work?");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(3, "p-selectButton", 35)(4, "app-error", 11);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext(2);
    const _r0 = i0.ɵɵreference(1);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("options", ctx_r3.yesNoOption)("formControl", ctx_r3.haveReturnToWorkDate);
    i0.ɵɵadvance(1);
    i0.ɵɵclassMap("app-grid");
    i0.ɵɵproperty("field", ctx_r3.haveReturnToWorkDate)("form", _r0)("errDef", i0.ɵɵpureFunction0(7, _c1));
} }
function WeeklyCertEmployerComponentQe_ion_row_3_div_48_Template(rf, ctx) { if (rf & 1) {
    const _r12 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 8)(1, "label", 36);
    i0.ɵɵtext(2, "When?");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "div", 37)(4, "p-calendar", 38);
    i0.ɵɵlistener("onInput", function WeeklyCertEmployerComponentQe_ion_row_3_div_48_Template_p_calendar_onInput_4_listener($event) { i0.ɵɵrestoreView(_r12); const ctx_r11 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r11.dateInput($event)); });
    i0.ɵɵelementEnd();
    i0.ɵɵelement(5, "app-overlay-info", 32);
    i0.ɵɵpipe(6, "trustHtml");
    i0.ɵɵpipe(7, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(8, "app-error", 11);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r4 = i0.ɵɵnextContext(2);
    const _r0 = i0.ɵɵreference(1);
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("showIcon", true)("formControl", ctx_r4.wcEmpLowRtwDate)("showOnFocus", false)("iconAriaLabel", "When?")("monthNavigator", true)("yearNavigator", true);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("overlayText", i0.ɵɵpipeBind1(6, 12, i0.ɵɵpipeBind1(7, 14, "weeklies.v2.employment.rtw.info.popup.2155")));
    i0.ɵɵadvance(3);
    i0.ɵɵclassMap("app-grid");
    i0.ɵɵproperty("field", ctx_r4.wcEmpLowRtwDate)("form", _r0)("errDef", i0.ɵɵpureFunction0(16, _c1));
} }
function WeeklyCertEmployerComponentQe_ion_row_3_div_49_Template(rf, ctx) { if (rf & 1) {
    const _r14 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 8)(1, "label", 39);
    i0.ɵɵtext(2, "Return to work date");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "p-calendar", 40);
    i0.ɵɵlistener("onInput", function WeeklyCertEmployerComponentQe_ion_row_3_div_49_Template_p_calendar_onInput_3_listener($event) { i0.ɵɵrestoreView(_r14); const ctx_r13 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r13.dateInput($event)); });
    i0.ɵɵelementEnd();
    i0.ɵɵelement(4, "app-error", 11);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r5 = i0.ɵɵnextContext(2);
    const _r0 = i0.ɵɵreference(1);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("showIcon", true)("formControl", ctx_r5.wcEmpRtwDate)("showOnFocus", false)("iconAriaLabel", "Return to work date")("monthNavigator", true)("yearNavigator", true);
    i0.ɵɵadvance(1);
    i0.ɵɵclassMap("app-grid");
    i0.ɵɵproperty("field", ctx_r5.wcEmpRtwDate)("form", _r0)("errDef", i0.ɵɵpureFunction0(11, _c1));
} }
function WeeklyCertEmployerComponentQe_ion_row_3_div_50_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 8)(1, "label", 41);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(4, "br")(5, "app-dropdown", 42)(6, "app-error", 11);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r6 = i0.ɵɵnextContext(2);
    const _r0 = i0.ɵɵreference(1);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 9, "induction.confirm.employment.reason.separation.discharge"));
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("options", ctx_r6.dischargeReasonOptionsAll)("formControl", ctx_r6.discharged)("autoDisplayFirst", false);
    i0.ɵɵadvance(1);
    i0.ɵɵclassMap("app-grid");
    i0.ɵɵproperty("field", ctx_r6.discharged)("form", _r0)("errDef", i0.ɵɵpureFunction0(11, _c1));
} }
function WeeklyCertEmployerComponentQe_ion_row_3_div_51_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 8)(1, "label", 43);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(4, "br")(5, "app-dropdown", 44)(6, "app-error", 11);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r7 = i0.ɵɵnextContext(2);
    const _r0 = i0.ɵɵreference(1);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 9, "induction.confirm.employment.reason.separation.quit"));
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("options", ctx_r7.volQuitReasonOptionsAll)("formControl", ctx_r7.voluntaryQuit)("autoDisplayFirst", false);
    i0.ɵɵadvance(1);
    i0.ɵɵclassMap("app-grid");
    i0.ɵɵproperty("field", ctx_r7.voluntaryQuit)("form", _r0)("errDef", i0.ɵɵpureFunction0(11, _c1));
} }
const _c2 = a1 => ({ required: "required", dateNotBetween: a1 });
function WeeklyCertEmployerComponentQe_ion_row_3_div_52_Template(rf, ctx) { if (rf & 1) {
    const _r16 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 8)(1, "label", 45);
    i0.ɵɵtext(2, "First day you worked");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "p-calendar", 46);
    i0.ɵɵlistener("onInput", function WeeklyCertEmployerComponentQe_ion_row_3_div_52_Template_p_calendar_onInput_3_listener($event) { i0.ɵɵrestoreView(_r16); const ctx_r15 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r15.dateInput($event)); });
    i0.ɵɵelementEnd();
    i0.ɵɵelement(4, "app-error", 11);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r8 = i0.ɵɵnextContext(2);
    const _r0 = i0.ɵɵreference(1);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("iconAriaLabel", "Start day worked")("showIcon", true)("formControl", ctx_r8.startDayWorked)("maxDate", ctx_r8.maxStartDate)("defaultDate", ctx_r8.sunDate)("selectOtherMonths", true)("monthNavigator", true)("yearNavigator", true);
    i0.ɵɵadvance(1);
    i0.ɵɵclassMap("app-grid");
    i0.ɵɵproperty("field", ctx_r8.startDayWorked)("form", _r0)("errDef", i0.ɵɵpureFunction1(13, _c2, "Date should be between " + ctx_r8.dynamicParam.sunday_date + " and " + ctx_r8.dynamicParam.saturday_date + "."));
} }
function WeeklyCertEmployerComponentQe_ion_row_3_div_53_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 8)(1, "label", 47);
    i0.ɵɵtext(2, "Job Title");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(3, "input", 48)(4, "app-error", 11);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r9 = i0.ɵɵnextContext(2);
    const _r0 = i0.ɵɵreference(1);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("formControl", ctx_r9.jobTitle);
    i0.ɵɵadvance(1);
    i0.ɵɵclassMap("app-grid");
    i0.ɵɵproperty("field", ctx_r9.jobTitle)("form", _r0)("errDef", i0.ɵɵpureFunction0(6, _c1));
} }
function WeeklyCertEmployerComponentQe_ion_row_3_div_59_Template(rf, ctx) { if (rf & 1) {
    const _r18 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div")(1, "app-wage-calculator", 49);
    i0.ɵɵlistener("grossEarningsChange", function WeeklyCertEmployerComponentQe_ion_row_3_div_59_Template_app_wage_calculator_grossEarningsChange_1_listener($event) { i0.ɵɵrestoreView(_r18); const ctx_r17 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r17.updateGrossEarnings($event)); })("totalHoursChange", function WeeklyCertEmployerComponentQe_ion_row_3_div_59_Template_app_wage_calculator_totalHoursChange_1_listener($event) { i0.ɵɵrestoreView(_r18); const ctx_r19 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r19.updateTotalHours($event)); })("saveClicked", function WeeklyCertEmployerComponentQe_ion_row_3_div_59_Template_app_wage_calculator_saveClicked_1_listener($event) { i0.ɵɵrestoreView(_r18); const ctx_r20 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r20.onDialogSave($event)); })("cancelClicked", function WeeklyCertEmployerComponentQe_ion_row_3_div_59_Template_app_wage_calculator_cancelClicked_1_listener() { i0.ɵɵrestoreView(_r18); const ctx_r21 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r21.onDialogCancel()); });
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r10 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("dynamicParam", ctx_r10.dynamicParam)("showCalculatorPopup", true)("wageCalculatorSavedData", ctx_r10.wageCalculatorData);
} }
const _c3 = "only letters, numbers, spaces, and . , & ' ( ) - # are allowed";
const _c4 = () => ({ required: "required", pattern: _c3 });
const _c5 = "only letters, numbers, spaces, commas, periods, apostrophes, hyphens, # and / allowed";
const _c6 = () => ({ required: "required", pattern: _c5 });
const _c7 = "city name can only contain letters, spaces, and hyphens";
const _c8 = () => ({ required: "required", pattern: _c7 });
const _c9 = () => ({ required: "required", invalidLength: "Zip code should be of 5 or 9 digits.", invalidNumber: "Zip code should only have numbers." });
const _c10 = "If hours and earnings are both 0, employment status cannot be working-part time.";
const _c11 = () => ({ required: "required", changeEmpStatus: _c10 });
const _c12 = "total hours must not be greater than 168 for the week";
const _c13 = () => ({ required: "required", hoursPerWeekExceeded: _c12 });
const _c14 = () => ({ required: "required", earningsNotZero: "Gross Earnings cannot be zero." });
function WeeklyCertEmployerComponentQe_ion_row_3_Template(rf, ctx) { if (rf & 1) {
    const _r23 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "ion-row")(1, "ion-col", 6)(2, "div", 7)(3, "div", 8)(4, "label", 9);
    i0.ɵɵtext(5, "Employer Name");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "app-search-employer", 10);
    i0.ɵɵlistener("onFound", function WeeklyCertEmployerComponentQe_ion_row_3_Template_app_search_employer_onFound_6_listener($event) { i0.ɵɵrestoreView(_r23); const ctx_r22 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r22.setEmployer($event)); });
    i0.ɵɵelementEnd();
    i0.ɵɵelement(7, "app-error", 11);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(8, "div", 8)(9, "label", 12);
    i0.ɵɵtext(10, "Street Address");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(11, "input", 13)(12, "app-error", 11);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(13, "div", 8)(14, "label", 14);
    i0.ɵɵtext(15, "City");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(16, "input", 15)(17, "app-error", 11);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(18, "div", 8)(19, "label", 16);
    i0.ɵɵtext(20, "State");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(21, "br")(22, "app-dropdown", 17)(23, "app-error", 11);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(24, "div", 8)(25, "label", 18);
    i0.ɵɵtext(26, "Zip Code");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(27, "input", 19)(28, "app-error", 11);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(29, "div", 8)(30, "label", 20);
    i0.ɵɵtext(31, "Last day you worked");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(32, "p-calendar", 21);
    i0.ɵɵlistener("onInput", function WeeklyCertEmployerComponentQe_ion_row_3_Template_p_calendar_onInput_32_listener($event) { i0.ɵɵrestoreView(_r23); const ctx_r24 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r24.dateInput($event)); });
    i0.ɵɵelementEnd();
    i0.ɵɵelement(33, "app-error", 11);
    i0.ɵɵelementEnd()()();
    i0.ɵɵelementStart(34, "ion-col", 6)(35, "div", 7)(36, "div", 8)(37, "label", 22);
    i0.ɵɵtext(38, "Phone No.");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(39, "p-inputMask", 23)(40, "app-error", 11);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(41, "div", 8)(42, "label", 24);
    i0.ɵɵtext(43, "What's your employment status with this employer?");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(44, "app-dropdown", 25)(45, "br")(46, "app-error", 11);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(47, WeeklyCertEmployerComponentQe_ion_row_3_div_47_Template, 5, 8, "div", 26)(48, WeeklyCertEmployerComponentQe_ion_row_3_div_48_Template, 9, 17, "div", 26)(49, WeeklyCertEmployerComponentQe_ion_row_3_div_49_Template, 5, 12, "div", 26)(50, WeeklyCertEmployerComponentQe_ion_row_3_div_50_Template, 7, 12, "div", 26)(51, WeeklyCertEmployerComponentQe_ion_row_3_div_51_Template, 7, 12, "div", 26)(52, WeeklyCertEmployerComponentQe_ion_row_3_div_52_Template, 5, 15, "div", 26)(53, WeeklyCertEmployerComponentQe_ion_row_3_div_53_Template, 5, 7, "div", 26);
    i0.ɵɵelementEnd();
    i0.ɵɵelement(54, "input", 27);
    i0.ɵɵelementStart(55, "div", 8)(56, "span", 28);
    i0.ɵɵlistener("click", function WeeklyCertEmployerComponentQe_ion_row_3_Template_span_click_56_listener($event) { i0.ɵɵrestoreView(_r23); const ctx_r25 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r25.setWageFlag($event)); });
    i0.ɵɵelementStart(57, "b");
    i0.ɵɵtext(58, "Earnings Calculator");
    i0.ɵɵelementEnd()();
    i0.ɵɵtemplate(59, WeeklyCertEmployerComponentQe_ion_row_3_div_59_Template, 2, 3, "div", 2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(60, "div", 8)(61, "label", 29);
    i0.ɵɵtext(62, "Hours worked");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(63, "br")(64, "p-inputNumber", 30)(65, "br")(66, "app-error", 11);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(67, "div", 8)(68, "label", 31);
    i0.ɵɵtext(69, "Total Gross Earnings");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(70, "app-overlay-info", 32);
    i0.ɵɵpipe(71, "trustHtml");
    i0.ɵɵpipe(72, "translate");
    i0.ɵɵelement(73, "br")(74, "p-inputNumber", 33)(75, "br")(76, "app-error", 11);
    i0.ɵɵelementEnd()()();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    const _r0 = i0.ɵɵreference(1);
    i0.ɵɵadvance(6);
    i0.ɵɵproperty("formControl", ctx_r1.wcEmpName)("empType", "REG");
    i0.ɵɵadvance(1);
    i0.ɵɵclassMap("app-grid");
    i0.ɵɵproperty("field", ctx_r1.wcEmpName)("form", _r0)("errDef", i0.ɵɵpureFunction0(89, _c4));
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("formControl", ctx_r1.wcEmpAddressLine1);
    i0.ɵɵadvance(1);
    i0.ɵɵclassMap("app-grid");
    i0.ɵɵproperty("field", ctx_r1.wcEmpAddressLine1)("form", _r0)("errDef", i0.ɵɵpureFunction0(90, _c6));
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("formControl", ctx_r1.wcEmpCity);
    i0.ɵɵadvance(1);
    i0.ɵɵclassMap("app-grid");
    i0.ɵɵproperty("field", ctx_r1.wcEmpCity)("form", _r0)("errDef", i0.ɵɵpureFunction0(91, _c8));
    i0.ɵɵadvance(5);
    i0.ɵɵproperty("options", ctx_r1.statesCombo)("formControl", ctx_r1.wcEmpState)("autoDisplayFirst", false);
    i0.ɵɵadvance(1);
    i0.ɵɵclassMap("app-grid");
    i0.ɵɵproperty("field", ctx_r1.wcEmpState)("form", _r0)("errDef", i0.ɵɵpureFunction0(92, _c1));
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("formControl", ctx_r1.wsZipCode);
    i0.ɵɵadvance(1);
    i0.ɵɵclassMap("app-grid");
    i0.ɵɵproperty("field", ctx_r1.wsZipCode)("form", _r0)("errDef", i0.ɵɵpureFunction0(93, _c9));
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("iconAriaLabel", "Last day worked")("showIcon", true)("formControl", ctx_r1.lastDayWorked)("minDate", ctx_r1.sunDate)("maxDate", ctx_r1.satDate)("defaultDate", ctx_r1.sunDate)("selectOtherMonths", true)("monthNavigator", true)("yearNavigator", true);
    i0.ɵɵadvance(1);
    i0.ɵɵclassMap("app-grid");
    i0.ɵɵproperty("field", ctx_r1.lastDayWorked)("form", _r0)("errDef", i0.ɵɵpureFunction1(94, _c2, "Date should be between " + ctx_r1.dynamicParam.sunday_date + " and " + ctx_r1.dynamicParam.saturday_date + "."));
    i0.ɵɵadvance(6);
    i0.ɵɵproperty("formControl", ctx_r1.wsPhoneNumber);
    i0.ɵɵadvance(1);
    i0.ɵɵclassMap("app-grid");
    i0.ɵɵproperty("field", ctx_r1.wsPhoneNumber)("form", _r0)("errDef", i0.ɵɵpureFunction0(96, _c1));
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("options", ctx_r1.employmentStatusOptionsAll)("formControl", ctx_r1.wcEmpStatus)("autoDisplayFirst", false);
    i0.ɵɵadvance(2);
    i0.ɵɵclassMap("app-grid");
    i0.ɵɵproperty("field", ctx_r1.wcEmpStatus)("form", _r0)("errDef", i0.ɵɵpureFunction0(97, _c11));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r1.wcEmpStatus.value == "LWLO");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r1.wcEmpStatus.value == "LWLO" && ctx_r1.haveReturnToWorkDate.value == "Y");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r1.wcEmpStatus.value == "RTWF");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r1.wcEmpStatus.value == "DCFI");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r1.wcEmpStatus.value == "VOLQ");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r1.isMS() ? false : ctx_r1.wcEmpStatus.value == "VOLQ" || ctx_r1.wcEmpStatus.value == "SUSP" || ctx_r1.wcEmpStatus.value == "DCFI");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r1.isMS() ? false : ctx_r1.wcEmpStatus.value == "VOLQ" || ctx_r1.wcEmpStatus.value == "SUSP" || ctx_r1.wcEmpStatus.value == "DCFI" || ctx_r1.wcEmpStatus.value == "STLO");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("formControl", ctx_r1.hidEmpId);
    i0.ɵɵadvance(5);
    i0.ɵɵproperty("ngIf", ctx_r1.wageDialog);
    i0.ɵɵadvance(5);
    i0.ɵɵproperty("formControl", ctx_r1.wcEmpHoursWorked)("minFractionDigits", 1)("maxFractionDigits", 2);
    i0.ɵɵadvance(2);
    i0.ɵɵclassMap("app-grid");
    i0.ɵɵproperty("field", ctx_r1.wcEmpHoursWorked)("form", _r0)("errDef", i0.ɵɵpureFunction0(98, _c13));
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("overlayText", i0.ɵɵpipeBind1(71, 85, i0.ɵɵpipeBind1(72, 87, "weeklies.v2.employment.rtw.info.popup.1000")));
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("formControl", ctx_r1.wsEmpAmtEarned);
    i0.ɵɵadvance(2);
    i0.ɵɵclassMap("app-grid");
    i0.ɵɵproperty("field", ctx_r1.wsEmpAmtEarned)("form", _r0)("errDef", i0.ɵɵpureFunction0(99, _c14));
} }
function WeeklyCertEmployerComponentQe_ion_row_4_div_21_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 8)(1, "label", 34);
    i0.ɵɵtext(2, "Do you know when you're returning to full-time work?");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(3, "p-selectButton", 35)(4, "app-error", 11);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r26 = i0.ɵɵnextContext(2);
    const _r0 = i0.ɵɵreference(1);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("options", ctx_r26.yesNoOption)("formControl", ctx_r26.haveReturnToWorkDate);
    i0.ɵɵadvance(1);
    i0.ɵɵclassMap("app-grid");
    i0.ɵɵproperty("field", ctx_r26.haveReturnToWorkDate)("form", _r0)("errDef", i0.ɵɵpureFunction0(7, _c1));
} }
function WeeklyCertEmployerComponentQe_ion_row_4_div_22_Template(rf, ctx) { if (rf & 1) {
    const _r35 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 8)(1, "label", 36);
    i0.ɵɵtext(2, "When?");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "div", 37)(4, "p-calendar", 38);
    i0.ɵɵlistener("onInput", function WeeklyCertEmployerComponentQe_ion_row_4_div_22_Template_p_calendar_onInput_4_listener($event) { i0.ɵɵrestoreView(_r35); const ctx_r34 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r34.dateInput($event)); });
    i0.ɵɵelementEnd();
    i0.ɵɵelement(5, "app-overlay-info", 32);
    i0.ɵɵpipe(6, "trustHtml");
    i0.ɵɵpipe(7, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(8, "app-error", 11);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r27 = i0.ɵɵnextContext(2);
    const _r0 = i0.ɵɵreference(1);
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("showIcon", true)("formControl", ctx_r27.wcEmpLowRtwDate)("showOnFocus", false)("iconAriaLabel", "When?")("monthNavigator", true)("yearNavigator", true);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("overlayText", i0.ɵɵpipeBind1(6, 12, i0.ɵɵpipeBind1(7, 14, "weeklies.v2.employment.rtw.info.popup.2050")));
    i0.ɵɵadvance(3);
    i0.ɵɵclassMap("app-grid");
    i0.ɵɵproperty("field", ctx_r27.wcEmpLowRtwDate)("form", _r0)("errDef", i0.ɵɵpureFunction0(16, _c1));
} }
function WeeklyCertEmployerComponentQe_ion_row_4_div_23_Template(rf, ctx) { if (rf & 1) {
    const _r37 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 8)(1, "label", 39);
    i0.ɵɵtext(2, "Return to work date");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "p-calendar", 40);
    i0.ɵɵlistener("onInput", function WeeklyCertEmployerComponentQe_ion_row_4_div_23_Template_p_calendar_onInput_3_listener($event) { i0.ɵɵrestoreView(_r37); const ctx_r36 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r36.dateInput($event)); });
    i0.ɵɵelementEnd();
    i0.ɵɵelement(4, "app-error", 11);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r28 = i0.ɵɵnextContext(2);
    const _r0 = i0.ɵɵreference(1);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("showIcon", true)("formControl", ctx_r28.wcEmpRtwDate)("showOnFocus", false)("iconAriaLabel", "Return to work date")("monthNavigator", true)("yearNavigator", true);
    i0.ɵɵadvance(1);
    i0.ɵɵclassMap("app-grid");
    i0.ɵɵproperty("field", ctx_r28.wcEmpRtwDate)("form", _r0)("errDef", i0.ɵɵpureFunction0(11, _c1));
} }
function WeeklyCertEmployerComponentQe_ion_row_4_div_24_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 8)(1, "label", 41);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(4, "br")(5, "app-dropdown", 53)(6, "app-error", 11);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r29 = i0.ɵɵnextContext(2);
    const _r0 = i0.ɵɵreference(1);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 9, "induction.confirm.employment.reason.separation.discharge"));
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("options", ctx_r29.dischargeReasonOptionsAll)("formControl", ctx_r29.discharged)("autoDisplayFirst", false);
    i0.ɵɵadvance(1);
    i0.ɵɵclassMap("app-grid");
    i0.ɵɵproperty("field", ctx_r29.discharged)("form", _r0)("errDef", i0.ɵɵpureFunction0(11, _c1));
} }
function WeeklyCertEmployerComponentQe_ion_row_4_div_25_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 8)(1, "label", 43);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(4, "br")(5, "app-dropdown", 54)(6, "app-error", 11);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r30 = i0.ɵɵnextContext(2);
    const _r0 = i0.ɵɵreference(1);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 9, "induction.confirm.employment.reason.separation.quit"));
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("options", ctx_r30.volQuitReasonOptionsAll)("formControl", ctx_r30.voluntaryQuit)("autoDisplayFirst", false);
    i0.ɵɵadvance(1);
    i0.ɵɵclassMap("app-grid");
    i0.ɵɵproperty("field", ctx_r30.voluntaryQuit)("form", _r0)("errDef", i0.ɵɵpureFunction0(11, _c1));
} }
function WeeklyCertEmployerComponentQe_ion_row_4_div_26_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 8)(1, "label", 47);
    i0.ɵɵtext(2, "Job Title");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(3, "input", 55)(4, "app-error", 11);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r31 = i0.ɵɵnextContext(2);
    const _r0 = i0.ɵɵreference(1);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("formControl", ctx_r31.jobTitle);
    i0.ɵɵadvance(1);
    i0.ɵɵclassMap("app-grid");
    i0.ɵɵproperty("field", ctx_r31.jobTitle)("form", _r0)("errDef", i0.ɵɵpureFunction0(6, _c1));
} }
function WeeklyCertEmployerComponentQe_ion_row_4_div_27_Template(rf, ctx) { if (rf & 1) {
    const _r39 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 8)(1, "label", 45);
    i0.ɵɵtext(2, "First day you worked");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "p-calendar", 46);
    i0.ɵɵlistener("onInput", function WeeklyCertEmployerComponentQe_ion_row_4_div_27_Template_p_calendar_onInput_3_listener($event) { i0.ɵɵrestoreView(_r39); const ctx_r38 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r38.dateInput($event)); });
    i0.ɵɵelementEnd();
    i0.ɵɵelement(4, "app-error", 11);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r32 = i0.ɵɵnextContext(2);
    const _r0 = i0.ɵɵreference(1);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("iconAriaLabel", "Start day worked")("showIcon", true)("formControl", ctx_r32.startDayWorked)("maxDate", ctx_r32.maxStartDate)("defaultDate", ctx_r32.sunDate)("selectOtherMonths", true)("monthNavigator", true)("yearNavigator", true);
    i0.ɵɵadvance(1);
    i0.ɵɵclassMap("app-grid");
    i0.ɵɵproperty("field", ctx_r32.startDayWorked)("form", _r0)("errDef", i0.ɵɵpureFunction1(13, _c2, "Date should be between " + ctx_r32.dynamicParam.sunday_date + " and " + ctx_r32.dynamicParam.saturday_date + "."));
} }
function WeeklyCertEmployerComponentQe_ion_row_4_div_37_Template(rf, ctx) { if (rf & 1) {
    const _r41 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div")(1, "app-wage-calculator", 49);
    i0.ɵɵlistener("grossEarningsChange", function WeeklyCertEmployerComponentQe_ion_row_4_div_37_Template_app_wage_calculator_grossEarningsChange_1_listener($event) { i0.ɵɵrestoreView(_r41); const ctx_r40 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r40.updateGrossEarnings($event)); })("totalHoursChange", function WeeklyCertEmployerComponentQe_ion_row_4_div_37_Template_app_wage_calculator_totalHoursChange_1_listener($event) { i0.ɵɵrestoreView(_r41); const ctx_r42 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r42.updateTotalHours($event)); })("saveClicked", function WeeklyCertEmployerComponentQe_ion_row_4_div_37_Template_app_wage_calculator_saveClicked_1_listener($event) { i0.ɵɵrestoreView(_r41); const ctx_r43 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r43.onDialogSave($event)); })("cancelClicked", function WeeklyCertEmployerComponentQe_ion_row_4_div_37_Template_app_wage_calculator_cancelClicked_1_listener() { i0.ɵɵrestoreView(_r41); const ctx_r44 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r44.onDialogCancel()); });
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r33 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("dynamicParam", ctx_r33.dynamicParam)("showCalculatorPopup", true)("wageCalculatorSavedData", ctx_r33.wageCalculatorData);
} }
function WeeklyCertEmployerComponentQe_ion_row_4_Template(rf, ctx) { if (rf & 1) {
    const _r46 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "ion-row")(1, "ion-col", 6)(2, "div", 7)(3, "div", 8)(4, "b");
    i0.ɵɵtext(5);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(6, "section", 50);
    i0.ɵɵelement(7, "input", 27)(8, "input", 27)(9, "input", 27)(10, "input", 27)(11, "input", 27)(12, "input", 27)(13, "input", 27)(14, "input", 27);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(15, "div", 8)(16, "label", 24);
    i0.ɵɵtext(17, "What's your employment status with this employer?");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(18, "app-dropdown", 51)(19, "br")(20, "app-error", 11);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(21, WeeklyCertEmployerComponentQe_ion_row_4_div_21_Template, 5, 8, "div", 26)(22, WeeklyCertEmployerComponentQe_ion_row_4_div_22_Template, 9, 17, "div", 26)(23, WeeklyCertEmployerComponentQe_ion_row_4_div_23_Template, 5, 12, "div", 26)(24, WeeklyCertEmployerComponentQe_ion_row_4_div_24_Template, 7, 12, "div", 26)(25, WeeklyCertEmployerComponentQe_ion_row_4_div_25_Template, 7, 12, "div", 26)(26, WeeklyCertEmployerComponentQe_ion_row_4_div_26_Template, 5, 7, "div", 26)(27, WeeklyCertEmployerComponentQe_ion_row_4_div_27_Template, 5, 15, "div", 26);
    i0.ɵɵelementStart(28, "div", 8)(29, "label", 20);
    i0.ɵɵtext(30, "Last day you worked");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(31, "p-calendar", 52);
    i0.ɵɵlistener("onInput", function WeeklyCertEmployerComponentQe_ion_row_4_Template_p_calendar_onInput_31_listener($event) { i0.ɵɵrestoreView(_r46); const ctx_r45 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r45.dateInput($event)); });
    i0.ɵɵelementEnd();
    i0.ɵɵelement(32, "app-error", 11);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(33, "div", 8)(34, "span", 28);
    i0.ɵɵlistener("click", function WeeklyCertEmployerComponentQe_ion_row_4_Template_span_click_34_listener($event) { i0.ɵɵrestoreView(_r46); const ctx_r47 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r47.setWageFlag($event)); });
    i0.ɵɵelementStart(35, "b");
    i0.ɵɵtext(36, "Earnings Calculator");
    i0.ɵɵelementEnd()();
    i0.ɵɵtemplate(37, WeeklyCertEmployerComponentQe_ion_row_4_div_37_Template, 2, 3, "div", 2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(38, "div", 8)(39, "label", 29);
    i0.ɵɵtext(40, "Hours worked");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(41, "p-inputNumber", 30)(42, "app-error", 11);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(43, "div", 8)(44, "label", 31);
    i0.ɵɵtext(45, "Total Gross Earnings");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(46, "app-overlay-info", 32);
    i0.ɵɵpipe(47, "trustHtml");
    i0.ɵɵpipe(48, "translate");
    i0.ɵɵelement(49, "p-inputNumber", 33)(50, "app-error", 11);
    i0.ɵɵelementEnd()()()();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    const _r0 = i0.ɵɵreference(1);
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(ctx_r2.wcEmpName.value);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("formControl", ctx_r2.wcEmpName);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("formControl", ctx_r2.wcEmpAddressLine1);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("formControl", ctx_r2.wcEmpCity);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("formControl", ctx_r2.wcEmpState);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("formControl", ctx_r2.wsZipCode);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("formControl", ctx_r2.wsPhoneNumber);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("formControl", ctx_r2.hidEmpId);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("formControl", ctx_r2.isPartTimeEmployer);
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("options", ctx_r2.employmentStatusOptionsAll)("formControl", ctx_r2.wcEmpStatus)("autoDisplayFirst", false);
    i0.ɵɵadvance(2);
    i0.ɵɵclassMap("app-grid");
    i0.ɵɵproperty("field", ctx_r2.wcEmpStatus)("form", _r0)("errDef", i0.ɵɵpureFunction0(58, _c11));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r2.wcEmpStatus.value == "LWLO");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r2.wcEmpStatus.value == "LWLO" && ctx_r2.haveReturnToWorkDate.value == "Y");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r2.wcEmpStatus.value == "RTWF");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r2.wcEmpStatus.value == "DCFI");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r2.wcEmpStatus.value == "VOLQ");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r2.wcEmpStatus.value == "VOLQ" || ctx_r2.wcEmpStatus.value == "SUSP" || ctx_r2.wcEmpStatus.value == "DCFI" || ctx_r2.wcEmpStatus.value == "STLO");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r2.wcEmpStatus.value == "VOLQ" || ctx_r2.wcEmpStatus.value == "SUSP" || ctx_r2.wcEmpStatus.value == "DCFI");
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("iconAriaLabel", "Last day worked")("showIcon", true)("formControl", ctx_r2.lastDayWorked)("minDate", ctx_r2.sunDate)("maxDate", ctx_r2.satDate)("defaultDate", ctx_r2.sunDate)("selectOtherMonths", true)("monthNavigator", true)("yearNavigator", true);
    i0.ɵɵadvance(1);
    i0.ɵɵclassMap("app-grid");
    i0.ɵɵproperty("field", ctx_r2.lastDayWorked)("form", _r0)("errDef", i0.ɵɵpureFunction1(59, _c2, "Date should be between " + ctx_r2.dynamicParam.sunday_date + " and " + ctx_r2.dynamicParam.saturday_date + "."));
    i0.ɵɵadvance(5);
    i0.ɵɵproperty("ngIf", ctx_r2.wageDialog);
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("formControl", ctx_r2.wcEmpHoursWorked)("minFractionDigits", 1)("maxFractionDigits", 2);
    i0.ɵɵadvance(1);
    i0.ɵɵclassMap("app-grid");
    i0.ɵɵproperty("field", ctx_r2.wcEmpHoursWorked)("form", _r0)("errDef", i0.ɵɵpureFunction0(61, _c13));
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("overlayText", i0.ɵɵpipeBind1(47, 54, i0.ɵɵpipeBind1(48, 56, "weeklies.v2.employment.rtw.info.popup.1000")));
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("formControl", ctx_r2.wsEmpAmtEarned);
    i0.ɵɵadvance(1);
    i0.ɵɵclassMap("app-grid");
    i0.ɵɵproperty("field", ctx_r2.wsEmpAmtEarned)("form", _r0)("errDef", i0.ɵɵpureFunction0(62, _c14));
} }
export class WeeklyCertEmployerComponentQe extends BasePage {
    constructor(util, formBuilder, cs) {
        super();
        this.util = util;
        this.formBuilder = formBuilder;
        this.cs = cs;
        this.success = new EventEmitter();
        this.onClose = new EventEmitter();
        this.empToEdit = new EmployerInfoModel();
        this.yesNoOption = ComboOption.YES_NO;
        this.statesCombo = ComboOption.US_STATES;
        this.isEditMode = false;
        this.dischargeReasonOptionsAll = [];
        this.volQuitReasonOptionsAll = [];
        this.employmentStatusOptionsAll = [];
        this.wageCalculatorData = new WageCalculatorModel();
    }
    ngOnInit() {
        this.loadMasterData();
        this.satDate = this.util.getEnteredDateFromString(this.dynamicParam.saturday_date);
        this.sunDate = this.util.getEnteredDateFromString(this.dynamicParam.sunday_date);
        this.initilizeEmployerInforForm();
        this.isEditMode = !!this.empToEdit;
        this.wcEmpHoursWorked.valueChanges.subscribe(val => {
            if (val) {
                if (val > 168) {
                    this.wcEmpHoursWorked.setErrors({ hoursPerWeekExceeded: true });
                }
            }
        });
    }
    loadMasterData() {
        this.cs.loadMasterData();
        this.cs.getReasonSeparation().subscribe(value => {
            value.forEach(arr => this.employmentStatusOptionsAll.push(arr));
        });
        this.cs.getDischargeReasons().subscribe(value => {
            value.forEach(arr => this.dischargeReasonOptionsAll.push(arr));
        });
        this.cs.getQuitReasons().subscribe(value => {
            value.forEach(arr => this.volQuitReasonOptionsAll.push(arr));
        });
    }
    add() {
        //this.setValidationForHoursAndWagesOnActivityType();
        if (this.empForm.valid) {
            this.empForm.value.isPartTimeEmployerEdited = true;
            this.success.emit(this.empForm.value);
            this.isEditMode = false;
        }
    }
    save() {
        //this.setValidationForHoursAndWagesOnActivityType();
        if (this.empForm.valid) {
            this.empForm.value.isPartTimeEmployerEdited = true;
            this.success.emit(this.empForm.value);
            this.initilizeEmployerInforForm();
            this.isEditMode = true;
        }
    }
    close() {
        this.onClose.emit();
    }
    initilizeEmployerInforForm() {
        let empInfo = this.empToEdit ? this.empToEdit : new EmployerInfoModel();
        this.empForm = this.formBuilder.group({
            'lastDayWorked': [empInfo.lastDayWorked != null ? this.getDate(empInfo.lastDayWorked) : '', Validators.compose([Validators.required, AppValidators.isBetweenDate(this.sunDate, this.satDate)])],
            'employerName': [empInfo.employerName, [Validators.required, Validators.pattern(/^[A-Za-z0-9\s\.,&'()#-]+$/)]],
            'line1': [empInfo.line1, [Validators.required, Validators.pattern(/^[0-9A-Za-z\s,'\-\.#\/]+$/)]],
            'line2': [empInfo.line2],
            'city': [empInfo.city, Validators.compose([Validators.required, Validators.pattern(/^(?!-)[A-Za-z -]*$/)])],
            'state': [empInfo.state != undefined ? empInfo.state : this.util.getState(), Validators.required],
            'grossEarning': [empInfo.grossEarning, Validators.compose([Validators.required])],
            'reasonSeparation': [empInfo.reasonSeparation != undefined ? empInfo.reasonSeparation : '', Validators.required],
            'haveReturnToWorkDate': [empInfo.haveReturnToWorkDate],
            'returnToWorkDate': [empInfo.returnToWorkDate],
            'voluntaryQuit': [empInfo.voluntaryQuit],
            'discharged': [empInfo.discharged],
            'hoursWorkedInWeek': [empInfo.hoursWorkedInWeek, Validators.compose([Validators.required])],
            'zip': [empInfo.zip != undefined ? empInfo.zip : '', Validators.compose([Validators.required, AppValidators.isValidZipCode])],
            'employerPhone': [empInfo.employerPhone != undefined ? empInfo.employerPhone : '', Validators.compose([Validators.required])],
            'employerId': [empInfo.employerId],
            'tempWcEmployerId': [empInfo.tempWcEmployerId ? empInfo.tempWcEmployerId : new Date().getTime()],
            'potentialIssueId': [empInfo.potentialIssueId ? empInfo.potentialIssueId : null],
            'isPartTimeEmployer': [empInfo.isPartTimeEmployer ? empInfo.isPartTimeEmployer : null],
            'jobTitle': [empInfo.jobTitle, Validators.maxLength(50)],
            'startDayWorked': [empInfo.startDayWorked]
        });
        this.lastDayWorked.valueChanges.subscribe(val => {
            if (val) {
                this.maxStartDate = new Date(val);
                if (this.startDayWorked.value) {
                    let startDate = new Date(this.startDayWorked.value);
                    if (startDate > this.maxStartDate) {
                        this.startDayWorked.patchValue(null);
                        this.startDayWorked.updateValueAndValidity();
                    }
                }
            }
        });
        this.wcEmpStatus.valueChanges.subscribe(val => {
            this.setValidationBasedOnEmploymentStatus(val);
        });
        if (empInfo.reasonSeparation) {
            this.setValidationBasedOnEmploymentStatus(empInfo.reasonSeparation);
        }
        if (this.lastDayWorked.value) {
            this.maxStartDate = new Date(this.lastDayWorked.value);
        }
    }
    updateGrossEarnings(grossEarnings) {
        if (grossEarnings === 0) {
            this.empForm.controls['grossEarning'].reset();
        }
        else {
            this.empForm.patchValue({ grossEarning: grossEarnings });
        }
    }
    updateTotalHours(totalHours) {
        if (totalHours === 0) {
            this.empForm.controls['hoursWorkedInWeek'].reset();
        }
        else {
            this.empForm.patchValue({ hoursWorkedInWeek: totalHours });
        }
    }
    get haveReturnToWorkDate() {
        return this.empForm.controls['haveReturnToWorkDate'];
    }
    get voluntaryQuit() {
        return this.empForm.controls['voluntaryQuit'];
    }
    get discharged() {
        return this.empForm.controls['discharged'];
    }
    get lastDayWorked() {
        return this.empForm.controls['lastDayWorked'];
    }
    get wcEmpName() {
        return this.empForm.controls['employerName'];
    }
    get wcEmpAddressLine1() {
        return this.empForm.controls['line1'];
    }
    get wcEmpAddressLine2() {
        return this.empForm.controls['line2'];
    }
    get wcEmpCity() {
        return this.empForm.controls['city'];
    }
    get wcEmpState() {
        return this.empForm.controls['state'];
    }
    get wsEmpAmtEarned() {
        return this.empForm.controls['grossEarning'];
    }
    get wcEmpStatus() {
        return this.empForm.controls['reasonSeparation'];
    }
    get wcEmpLowRtwDate() {
        return this.empForm.controls['returnToWorkDate'];
    }
    get wcEmpRtwDate() {
        return this.empForm.controls['returnToWorkDate'];
    }
    get wcEmpWorkedForMoreEmployer() {
        return this.empForm.controls['wcEmpWorkedForMoreEmployer'];
    }
    get wcEmpHoursWorked() {
        return this.empForm.controls['hoursWorkedInWeek'];
    }
    get wsZipCode() {
        return this.empForm.controls['zip'];
    }
    get wsPhoneNumber() {
        return this.empForm.controls['employerPhone'];
    }
    get hidEmpId() {
        return this.empForm.controls['employerId'];
    }
    get isPartTimeEmployer() {
        return this.empForm.controls['isPartTimeEmployer'];
    }
    get jobTitle() {
        return this.empForm.controls['jobTitle'];
    }
    get startDayWorked() {
        return this.empForm.controls['startDayWorked'];
    }
    setValidationForHoursAndWagesOnActivityType() {
        if (this.empToEdit?.isPartTimeEmployer) {
            if ((this.wsEmpAmtEarned.value === 0.0 || this.wsEmpAmtEarned.value === 0)
                && (this.wcEmpHoursWorked.value === 0.0 || this.wcEmpHoursWorked.value === 0)
                && this.wcEmpStatus.value === 'WRPT') {
                this.util.clearValidation(this.wsEmpAmtEarned);
                this.wcEmpStatus.setErrors({ 'changeEmpStatus': true });
            }
            else if ((this.wsEmpAmtEarned.value === 0.0 || this.wsEmpAmtEarned.value === 0)
                && (this.wcEmpHoursWorked.value > 0.0 || this.wcEmpHoursWorked.value > 0)
                && this.wcEmpStatus.value === 'WRPT') {
                this.util.clearValidation(this.wcEmpStatus);
                this.wsEmpAmtEarned.setErrors({ 'earningsNotZero': true });
            }
            else if ((this.wsEmpAmtEarned.value === 0.0 || this.wsEmpAmtEarned.value === 0)
                && (this.wcEmpHoursWorked.value > 0.0 || this.wcEmpHoursWorked.value > 0 ||
                    this.wcEmpHoursWorked.value === 0.0 || this.wcEmpHoursWorked.value === 0)
                && this.wcEmpStatus.value !== 'WRPT') {
                this.util.clearValidation(this.wcEmpStatus);
                this.wsEmpAmtEarned.setErrors({ 'earningsNotZero': true });
            }
        }
        else {
            if ((this.wsEmpAmtEarned.value === 0.0 || this.wsEmpAmtEarned.value === 0)
                && (this.wcEmpHoursWorked.value === 0.0 || this.wcEmpHoursWorked.value === 0)
                && this.wcEmpStatus.value === 'WRPT') {
                this.util.clearValidation(this.wsEmpAmtEarned);
                this.wcEmpStatus.setErrors({ 'changeEmpStatus': true });
            }
            if ((this.wsEmpAmtEarned.value === 0.0 || this.wsEmpAmtEarned.value === 0)
                && (this.wcEmpHoursWorked.value > 0.0 || this.wcEmpHoursWorked.value > 0)
                && this.wcEmpStatus.value === 'WRPT') {
                this.util.clearValidation(this.wcEmpStatus);
                this.wsEmpAmtEarned.setErrors({ 'earningsNotZero': true });
            }
        }
    }
    setValidationBasedOnEmploymentStatus(val) {
        if (val && val == 'RTWF') {
            this.util.setRequiredValidator(this.wcEmpLowRtwDate);
        }
        else {
            this.util.clearValidation(this.wcEmpLowRtwDate);
        }
        if (val && val == 'LWLO') {
            this.jobTitle.clearValidators;
            this.util.setRequiredValidator(this.haveReturnToWorkDate);
        }
        else {
            this.util.clearValidation(this.haveReturnToWorkDate);
        }
        if (val && val == 'DCFI') {
            this.util.setRequiredValidator(this.discharged);
            if (!this.isMS()) {
                this.util.setRequiredValidator(this.jobTitle);
                this.util.setRequiredValidator(this.startDayWorked);
            }
        }
        else {
            this.util.clearValidation(this.jobTitle);
            this.util.clearValidation(this.startDayWorked);
            this.util.clearValidation(this.discharged);
        }
        if (val && val == 'VOLQ') {
            this.util.setRequiredValidator(this.voluntaryQuit);
            if (!this.isMS()) {
                this.util.setRequiredValidator(this.jobTitle);
                this.util.setRequiredValidator(this.startDayWorked);
            }
        }
        else {
            this.util.clearValidation(this.jobTitle);
            this.util.clearValidation(this.startDayWorked);
            this.util.clearValidation(this.voluntaryQuit);
        }
        if (val && val == 'SUSP' && !this.isMS()) {
            this.util.setRequiredValidator(this.jobTitle);
            this.util.setRequiredValidator(this.startDayWorked);
        }
        else {
            this.util.clearValidation(this.jobTitle);
            this.util.clearValidation(this.startDayWorked);
        }
        if (val && val == 'STLO' && !this.isMS()) {
            this.util.setRequiredValidator(this.jobTitle);
        }
        else {
            this.util.clearValidation(this.jobTitle);
        }
    }
    setEmployer(employer) {
        this.wcEmpName.setValue(employer.employerName);
        this.wcEmpAddressLine1.setValue(employer.addressLine1);
        this.wcEmpAddressLine2.setValue(employer.addressLine2);
        this.wcEmpCity.setValue(employer.city);
        this.wcEmpState.setValue(employer.state.value);
        this.wsZipCode.setValue(employer.zip);
        this.hidEmpId.setValue(employer.employerId);
    }
    dateInput(event) {
        let currentValue = event.srcElement.value;
        if (currentValue) {
            if (currentValue.length == 2 && currentValue.charAt(2) != '/') {
                event.target.value = currentValue + "/";
            }
            if (currentValue.length == 5 && currentValue.charAt(5) != '/') {
                event.target.value = currentValue + "/";
            }
        }
    }
    getDate(wsDate) {
        if (!(wsDate instanceof Date)) {
            return this.util.getEnteredDate(wsDate);
        }
        return wsDate;
    }
    setWageFlag(event) {
        event.preventDefault();
        this.wageDialog = true;
    }
    onDialogSave(wageCalculatorSavedData) {
        this.wageCalculatorData = wageCalculatorSavedData;
        this.wageDialog = false;
    }
    onDialogCancel() {
        this.wageDialog = false;
    }
    static { this.ɵfac = function WeeklyCertEmployerComponentQe_Factory(t) { return new (t || WeeklyCertEmployerComponentQe)(i0.ɵɵdirectiveInject(i1.UtilService), i0.ɵɵdirectiveInject(i2.UntypedFormBuilder), i0.ɵɵdirectiveInject(i3.ClaimService)); }; }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WeeklyCertEmployerComponentQe, selectors: [["app-weekly-cert-employer-qe"]], viewQuery: function WeeklyCertEmployerComponentQe_Query(rf, ctx) { if (rf & 1) {
            i0.ɵɵviewQuery(_c0, 5);
        } if (rf & 2) {
            let _t;
            i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.empFormDirective = _t.first);
        } }, inputs: { empToEdit: "empToEdit", dynamicParam: "dynamicParam" }, outputs: { success: "success", onClose: "onClose" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 11, vars: 4, consts: [[3, "formGroup"], ["empFormDirective", "ngForm"], [4, "ngIf"], [1, "ion-text-right"], ["shape", "round", "fill", "outline", "type", "reset", 3, "click"], ["shape", "round", "type", "submit", 3, "click"], ["size", "12", "sizeSm", "12", "sizeXs", "12", "sizeMd", "6", "sizeLg", "6", "sizeXl", "6", 1, "ion-padding"], [1, "p-fluid", "formgrid"], [1, "field"], ["for", "wcEmpName"], ["id", "wcEmployerName", 3, "formControl", "empType", "onFound"], [3, "field", "form", "errDef"], ["for", "wcEmpAddressLine1"], ["id", "wcEmpAddressLine1", "type", "input", "pInputText", "", "appStripInvisibleChars", "", 3, "formControl"], ["for", "wcEmpCity"], ["id", "wcEmpCity", "type", "input", "pInputText", "", "appStripInvisibleChars", "", 3, "formControl"], ["for", "wcEmpState"], ["inputId", "wcEmpState", "optionLabel", "text", "optionValue", "value", "appendTo", "body", "inputId", "wcEmpState", 3, "options", "formControl", "autoDisplayFirst"], ["for", "wsZipCode"], ["id", "wsZipCode", "type", "input", "pInputText", "", "minlength", "5", "maxlength", "9", "appStripInvisibleChars", "", 3, "formControl"], ["for", "lastDayWorked"], ["inputId", "lastDayWorked", "appendTo", "body", "placeholder", "mm/dd/yyyy", "dateFormat", "mm/dd/yy", "yearRange", "1901:2050", 3, "iconAriaLabel", "showIcon", "formControl", "minDate", "maxDate", "defaultDate", "selectOtherMonths", "monthNavigator", "yearNavigator", "onInput"], ["for", "wsPhoneNumber"], ["inputId", "wsPhoneNumber", "mask", "(999) 999-9999", "unmask", "true", 3, "formControl"], ["for", "wcEmpStatus"], ["inputId", "wcEmpStatus", "optionLabel", "text", "optionValue", "value", "appendTo", "body", "inputId", "wcEmpStatus1", 3, "options", "formControl", "autoDisplayFirst"], ["class", "field", 4, "ngIf"], ["type", "hidden", 3, "formControl"], [1, "underline-blue", 2, "cursor", "pointer", 3, "click"], ["for", "wcEmpHoursWorked"], ["inputId", "wcEmpHoursWorked", "maxlength", "10", "mode", "decimal", 3, "formControl", "minFractionDigits", "maxFractionDigits"], ["for", "wsEmpAmtEarned"], [2, "padding-left", "8px", "padding-top", "3px", 3, "overlayText"], ["inputId", "wsEmpAmtEarned", "mode", "currency", "currency", "USD", "locale", "en-US", "maxlength", "10", "placeholder", "$0.00", 3, "formControl"], ["for", "haveReturnToWorkDate"], ["optionLabel", "text", "optionValue", "value", 3, "options", "formControl"], ["for", "wcEmpLowRtwDate"], [2, "display", "flex"], ["inputId", "wcEmpLowRtwDate", "appendTo", "body", "placeholder", "mm/dd/yyyy", "yearRange", "1901:2050", 3, "showIcon", "formControl", "showOnFocus", "iconAriaLabel", "monthNavigator", "yearNavigator", "onInput"], ["for", "wcEmpRtwDate"], ["inputId", "wcEmpRtwDate", "appendTo", "body", "placeholder", "mm/dd/yyyy", "optionValue", "value", "yearRange", "1901:2050", 3, "showIcon", "formControl", "showOnFocus", "iconAriaLabel", "monthNavigator", "yearNavigator", "onInput"], ["for", "dischargeDetail"], ["optionLabel", "text", "appendTo", "body", "optionValue", "value", "inputId", "discharged1", 3, "options", "formControl", "autoDisplayFirst"], ["for", "volQuitDetails"], ["optionLabel", "text", "appendTo", "body", "optionValue", "value", "inputId", "voluntaryQuit1", 3, "options", "formControl", "autoDisplayFirst"], ["for", "startDayWorked"], ["inputId", "startDayWorked", "appendTo", "body", "placeholder", "mm/dd/yyyy", "yearRange", "1901:2050", 3, "iconAriaLabel", "showIcon", "formControl", "maxDate", "defaultDate", "selectOtherMonths", "monthNavigator", "yearNavigator", "onInput"], ["for", "jobTitle"], ["id", "jobTitle", "type", "input", "pInputText", "", "required", "", "appStripInvisibleChars", "", 3, "formControl"], [3, "dynamicParam", "showCalculatorPopup", "wageCalculatorSavedData", "grossEarningsChange", "totalHoursChange", "saveClicked", "cancelClicked"], ["hidden", ""], ["inputId", "wcEmpStatus", "optionLabel", "text", "optionValue", "value", "appendTo", "body", "inputId", "wcEmpStatus2", 3, "options", "formControl", "autoDisplayFirst"], ["inputId", "lastDayWorked", "appendTo", "body", "dateFormat", "mm/dd/yy", "placeholder", "mm/dd/yyyy", "yearRange", "1901:2050", 3, "iconAriaLabel", "showIcon", "formControl", "minDate", "maxDate", "defaultDate", "selectOtherMonths", "monthNavigator", "yearNavigator", "onInput"], ["optionLabel", "text", "appendTo", "body", "optionValue", "value", "inputId", "discharged2", 3, "options", "formControl", "autoDisplayFirst"], ["optionLabel", "text", "appendTo", "body", "optionValue", "value", "inputId", "voluntaryQuit2", 3, "options", "formControl", "autoDisplayFirst"], ["id", "jobTitle", "type", "input", "pInputText", "", "appStripInvisibleChars", "", 3, "formControl"]], template: function WeeklyCertEmployerComponentQe_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "form", 0, 1)(2, "ion-grid");
            i0.ɵɵtemplate(3, WeeklyCertEmployerComponentQe_ion_row_3_Template, 77, 100, "ion-row", 2)(4, WeeklyCertEmployerComponentQe_ion_row_4_Template, 51, 63, "ion-row", 2);
            i0.ɵɵelementStart(5, "ion-row")(6, "ion-col", 3)(7, "ion-button", 4);
            i0.ɵɵlistener("click", function WeeklyCertEmployerComponentQe_Template_ion_button_click_7_listener() { return ctx.close(); });
            i0.ɵɵtext(8, "Clear");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(9, "ion-button", 5);
            i0.ɵɵlistener("click", function WeeklyCertEmployerComponentQe_Template_ion_button_click_9_listener() { return ctx.isEditMode ? ctx.save() : ctx.add(); });
            i0.ɵɵtext(10);
            i0.ɵɵelementEnd()()()()();
        } if (rf & 2) {
            i0.ɵɵproperty("formGroup", ctx.empForm);
            i0.ɵɵadvance(3);
            i0.ɵɵproperty("ngIf", !(ctx.empToEdit == null ? null : ctx.empToEdit.isPartTimeEmployer));
            i0.ɵɵadvance(1);
            i0.ɵɵproperty("ngIf", ctx.empToEdit == null ? null : ctx.empToEdit.isPartTimeEmployer);
            i0.ɵɵadvance(6);
            i0.ɵɵtextInterpolate1(" ", ctx.isEditMode ? "Save" : "Add", " ");
        } }, dependencies: [i4.IonButton, i4.IonCol, i4.IonGrid, i4.IonRow, i5.NgIf, i2.ɵNgNoValidate, i2.DefaultValueAccessor, i2.NgControlStatus, i2.NgControlStatusGroup, i2.RequiredValidator, i2.MinLengthValidator, i2.MaxLengthValidator, i2.FormControlDirective, i2.FormGroupDirective, i6.InputText, i7.InputMask, i8.Calendar, i9.SelectButton, i10.InputNumber, i11.ErrorComponent, i12.OverlayInfoComponent, i13.SearchEmployerComponent, i14.Dropdown, i15.WageCalculatorComponent, i16.StripInvisibleCharsDirective, i17.TranslatePipe, i18.TrustHtmlPipe], styles: ["[_nghost-%COMP%]     .p-fluid .p-buttonset{display:inline-flex!important}.underline-blue[_ngcontent-%COMP%]{color:#4478aa;text-decoration:underline}"] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WeeklyCertEmployerComponentQe, [{
        type: Component,
        args: [{ selector: 'app-weekly-cert-employer-qe', template: "<form [formGroup]=\"empForm\" #empFormDirective=\"ngForm\">\r\n  <ion-grid>\r\n    <ion-row *ngIf=\"!empToEdit?.isPartTimeEmployer\">\r\n      <ion-col class=\"ion-padding\" size=\"12\" sizeSm=\"12\" sizeXs=\"12\" sizeMd=\"6\" sizeLg=\"6\" sizeXl=\"6\">\r\n        <div class=\"p-fluid formgrid\">\r\n          \r\n          <div class=\"field\">\r\n            <label for=\"wcEmpName\">Employer Name</label>\r\n            <app-search-employer id=\"wcEmployerName\" [formControl]=\"wcEmpName\" (onFound)=\"setEmployer($event)\"\r\n              [empType]=\"'REG'\"></app-search-employer>\r\n            <app-error [class]=\"'app-grid'\" [field]='wcEmpName' [form]=\"empFormDirective\" [errDef]=\"{ \r\n                required: 'required', pattern: 'only letters, numbers, spaces, and . , & \\' ( ) - # are allowed'\r\n              }\"></app-error>\r\n          </div>\r\n\r\n          <div class=\"field\">\r\n            <label for=\"wcEmpAddressLine1\">Street Address</label>\r\n            <input id=\"wcEmpAddressLine1\" type=\"input\" pInputText [formControl]=\"wcEmpAddressLine1\" appStripInvisibleChars/>\r\n            <app-error [class]=\"'app-grid'\" [field]='wcEmpAddressLine1' [form]=\"empFormDirective\" [errDef]=\"{ \r\n                required: 'required', pattern: 'only letters, numbers, spaces, commas, periods, apostrophes, hyphens, # and / allowed'\r\n              }\"></app-error>\r\n          </div>\r\n\r\n          <div class=\"field\">\r\n            <label for=\"wcEmpCity\">City</label>\r\n            <input id=\"wcEmpCity\" type=\"input\" pInputText [formControl]=\"wcEmpCity\" appStripInvisibleChars/>\r\n            <app-error [class]=\"'app-grid'\" [field]='wcEmpCity' [form]=\"empFormDirective\" [errDef]=\"{ \r\n                required: 'required', pattern: 'city name can only contain letters, spaces, and hyphens'\r\n              }\"></app-error>\r\n          </div>\r\n           \r\n            <div class=\"field\">\r\n              <label for=\"wcEmpState\">State</label><br>\r\n              <app-dropdown inputId=\"wcEmpState\" [options]=\"statesCombo\" optionLabel=\"text\" optionValue=\"value\"\r\n                appendTo=\"body\" [formControl]=\"wcEmpState\" [autoDisplayFirst]=\"false\" inputId=\"wcEmpState\"></app-dropdown>\r\n              <app-error [class]=\"'app-grid'\" [field]='wcEmpState' [form]=\"empFormDirective\" [errDef]=\"{ \r\n                      required: 'required'\r\n                    }\"></app-error>\r\n            </div>\r\n          \r\n            <div class=\"field\">\r\n              <label for=\"wsZipCode\">Zip Code</label>\r\n              <input id=\"wsZipCode\" type=\"input\" pInputText [formControl]=\"wsZipCode\" minlength=\"5\" maxlength=\"9\" appStripInvisibleChars/>\r\n              <app-error [class]=\"'app-grid'\" [field]='wsZipCode' [form]=\"empFormDirective\" [errDef]=\"{ \r\n                      required: 'required',\r\n                      invalidLength: 'Zip code should be of 5 or 9 digits.',\r\n                      invalidNumber: 'Zip code should only have numbers.'\r\n                    }\"></app-error>\r\n            </div>\r\n          \r\n\r\n          <div class=\"field\">\r\n            <label for=\"lastDayWorked\">Last day you worked</label>\r\n            <p-calendar [iconAriaLabel]=\"'Last day worked'\" [showIcon]=\"true\" inputId=\"lastDayWorked\" appendTo=\"body\"\r\n              [formControl]=\"lastDayWorked\" [minDate]=\"sunDate\" [maxDate]=\"satDate\"\r\n              [defaultDate]=\"sunDate\" [selectOtherMonths]=\"true\" placeholder=\"mm/dd/yyyy\" dateFormat=\"mm/dd/yy\"\r\n              [monthNavigator]=\"true\" [yearNavigator]=\"true\" yearRange=\"1901:2050\" (onInput)=\"dateInput($event)\"></p-calendar>\r\n            <app-error [class]=\"'app-grid'\" [field]='lastDayWorked' [form]=\"empFormDirective\" [errDef]=\"{ \r\n                required: 'required',\r\n                dateNotBetween: 'Date should be between ' + dynamicParam.sunday_date + ' and ' + dynamicParam.saturday_date + '.'\r\n              }\"></app-error>\r\n          </div>\r\n        </div>\r\n      </ion-col>\r\n      <ion-col class=\"ion-padding\" size=\"12\" sizeSm=\"12\" sizeXs=\"12\" sizeMd=\"6\" sizeLg=\"6\" sizeXl=\"6\">\r\n        <div class=\"p-fluid formgrid\">\r\n\r\n          \r\n\r\n          <div class=\"field\">\r\n            <label for=\"wsPhoneNumber\">Phone No.</label>\r\n            <p-inputMask inputId=\"wsPhoneNumber\" [formControl]=\"wsPhoneNumber\" mask=\"(999) 999-9999\"\r\n              unmask=\"true\"></p-inputMask>\r\n            <app-error [class]=\"'app-grid'\" [field]='wsPhoneNumber' [form]=\"empFormDirective\" [errDef]=\"{ \r\n                required: 'required'\r\n              }\"></app-error>\r\n          </div>\r\n\r\n          <div class=\"field\">\r\n            <label for=\"wcEmpStatus\">What's your employment status with this employer?</label>\r\n            <app-dropdown inputId=\"wcEmpStatus\" [options]=\"employmentStatusOptionsAll\" optionLabel=\"text\"\r\n              optionValue=\"value\" appendTo=\"body\" [formControl]=\"wcEmpStatus\" [autoDisplayFirst]=\"false\"\r\n              inputId=\"wcEmpStatus1\"></app-dropdown><br />\r\n            <app-error [class]=\"'app-grid'\" [field]='wcEmpStatus' [form]=\"empFormDirective\" [errDef]=\"{ \r\n                required: 'required', changeEmpStatus: 'If hours and earnings are both 0, employment status cannot be working-part time.' \r\n              }\"></app-error>\r\n          </div>\r\n\r\n          <div class=\"field\" *ngIf=\"wcEmpStatus.value == 'LWLO'\">\r\n            <label for=\"haveReturnToWorkDate\">Do you know when you're returning to full-time work?</label>\r\n            <p-selectButton [options]=\"yesNoOption\" [formControl]=\"haveReturnToWorkDate\" optionLabel=\"text\"\r\n              optionValue=\"value\"></p-selectButton>\r\n            <app-error [class]=\"'app-grid'\" [field]='haveReturnToWorkDate' [form]=\"empFormDirective\" [errDef]=\"{ \r\n                required: 'required'\r\n              }\"></app-error>\r\n          </div>\r\n          <div class=\"field\" *ngIf=\"wcEmpStatus.value == 'LWLO' && haveReturnToWorkDate.value == 'Y'\">\r\n            <label for=\"wcEmpLowRtwDate\">When?</label>\r\n            <div style=\"display: flex;\">\r\n              <p-calendar [showIcon]=\"true\" inputId=\"wcEmpLowRtwDate\" appendTo=\"body\" [formControl]=\"wcEmpLowRtwDate\"\r\n                placeholder=\"mm/dd/yyyy\" [showOnFocus]=\"false\" (onInput)=\"dateInput($event)\"\r\n                [iconAriaLabel]=\"'When?'\" [monthNavigator]=\"true\" [yearNavigator]=\"true\" yearRange=\"1901:2050\"></p-calendar>\r\n              <app-overlay-info [overlayText]=\"'weeklies.v2.employment.rtw.info.popup.2155' | translate | trustHtml\"\r\n                style=\"padding-left: 8px; padding-top:3px\"></app-overlay-info>\r\n            </div>\r\n            <app-error [class]=\"'app-grid'\" [field]='wcEmpLowRtwDate' [form]=\"empFormDirective\" [errDef]=\"{ \r\n                required: 'required'\r\n              }\"></app-error>\r\n          </div>\r\n\r\n          <div class=\"field\" *ngIf=\"wcEmpStatus.value == 'RTWF'\">\r\n            <label for=\"wcEmpRtwDate\">Return to work date</label>\r\n            <p-calendar [showIcon]=\"true\" inputId=\"wcEmpRtwDate\" appendTo=\"body\" [formControl]=\"wcEmpRtwDate\"\r\n              placeholder=\"mm/dd/yyyy\" [showOnFocus]=\"false\" (onInput)=\"dateInput($event)\" optionValue=\"value\"\r\n              [iconAriaLabel]=\"'Return to work date'\" [monthNavigator]=\"true\" [yearNavigator]=\"true\" yearRange=\"1901:2050\"></p-calendar>\r\n            <app-error [class]=\"'app-grid'\" [field]='wcEmpRtwDate' [form]=\"empFormDirective\" [errDef]=\"{ \r\n                required: 'required'\r\n              }\"></app-error>\r\n          </div>\r\n\r\n          <div class=\"field\" *ngIf=\"wcEmpStatus.value == 'DCFI'\">\r\n            <label\r\n              for=\"dischargeDetail\">{{\"induction.confirm.employment.reason.separation.discharge\"|translate}}</label><br>\r\n            <app-dropdown [options]=\"dischargeReasonOptionsAll\" [formControl]=\"discharged\" optionLabel=\"text\"\r\n              appendTo=\"body\" [autoDisplayFirst]=\"false\" optionValue=\"value\" inputId=\"discharged1\"></app-dropdown>\r\n            <app-error [class]=\"'app-grid'\" [field]='discharged' [form]=\"empFormDirective\" [errDef]=\"{ \r\n                required: 'required'\r\n              }\"></app-error>\r\n          </div>\r\n\r\n          <div class=\"field\" *ngIf=\"wcEmpStatus.value == 'VOLQ'\">\r\n            <label for=\"volQuitDetails\">{{\"induction.confirm.employment.reason.separation.quit\"|translate}}</label><br>\r\n            <app-dropdown [options]=\"volQuitReasonOptionsAll\" [formControl]=\"voluntaryQuit\" optionLabel=\"text\"\r\n              appendTo=\"body\" [autoDisplayFirst]=\"false\" optionValue=\"value\" inputId=\"voluntaryQuit1\"></app-dropdown>\r\n            <app-error [class]=\"'app-grid'\" [field]='voluntaryQuit' [form]=\"empFormDirective\" [errDef]=\"{ \r\n                required: 'required'\r\n              }\"></app-error>\r\n          </div>\r\n\r\n          <div class=\"field\" *ngIf=\"isMS() ? false : (wcEmpStatus.value == 'VOLQ' || wcEmpStatus.value =='SUSP' || wcEmpStatus.value =='DCFI')\">\r\n            <label for=\"startDayWorked\">First day you worked</label>\r\n            <p-calendar [iconAriaLabel]=\"'Start day worked'\" [showIcon]=\"true\" inputId=\"startDayWorked\" appendTo=\"body\"\r\n              [formControl]=\"startDayWorked\" [maxDate]=\"maxStartDate\"\r\n              [defaultDate]=\"sunDate\" [selectOtherMonths]=\"true\" placeholder=\"mm/dd/yyyy\" \r\n              [monthNavigator]=\"true\" [yearNavigator]=\"true\" yearRange=\"1901:2050\" (onInput)=\"dateInput($event)\"></p-calendar>\r\n            <app-error [class]=\"'app-grid'\" [field]='startDayWorked' [form]=\"empFormDirective\" [errDef]=\"{ \r\n                required: 'required',\r\n                dateNotBetween: 'Date should be between ' + dynamicParam.sunday_date + ' and ' + dynamicParam.saturday_date + '.'\r\n              }\"></app-error>\r\n          </div>\r\n\r\n          <div class=\"field\" *ngIf=\"isMS() ? false : (wcEmpStatus.value == 'VOLQ' || wcEmpStatus.value =='SUSP' || wcEmpStatus.value =='DCFI' || wcEmpStatus.value =='STLO')\">\r\n            <label for=\"jobTitle\">Job Title</label>\r\n            <input id=\"jobTitle\" type=\"input\" pInputText [formControl]=\"jobTitle\" required appStripInvisibleChars/>\r\n            <app-error [class]=\"'app-grid'\" [field]='jobTitle' [form]=\"empFormDirective\" [errDef]=\"{ \r\n                required: 'required'\r\n              }\"></app-error>\r\n          </div>\r\n        </div>\r\n        <input type=\"hidden\" [formControl]=\"hidEmpId\" />\r\n\r\n        <div class=\"field\">\r\n        <span (click)=\"setWageFlag($event)\" class=\"underline-blue\" style=\"cursor:pointer;\">\r\n          <b>Earnings Calculator</b>\r\n          </span>\r\n          <div *ngIf=\"wageDialog\">\r\n            <app-wage-calculator [dynamicParam]=\"dynamicParam\" [showCalculatorPopup]=\"true\" \r\n            (grossEarningsChange)=\"updateGrossEarnings($event)\" (totalHoursChange)=\"updateTotalHours($event)\"\r\n            (saveClicked)=\"onDialogSave($event)\" (cancelClicked)=\"onDialogCancel()\" [wageCalculatorSavedData]=\"wageCalculatorData\"></app-wage-calculator>\r\n          </div>\r\n        </div>\r\n\r\n        <div class=\"field\">\r\n          <label for=\"wcEmpHoursWorked\">Hours worked</label><br/>\r\n          <p-inputNumber inputId=\"wcEmpHoursWorked\" [formControl]=\"wcEmpHoursWorked\" maxlength=\"10\"\r\n          mode=\"decimal\" [minFractionDigits]=\"1\" [maxFractionDigits]=\"2\"></p-inputNumber><br>\r\n          <app-error [class]=\"'app-grid'\" [field]='wcEmpHoursWorked' [form]=\"empFormDirective\" [errDef]=\"{ \r\n              required: 'required', hoursPerWeekExceeded: 'total hours must not be greater than 168 for the week'\r\n            }\"></app-error>\r\n        </div>\r\n\r\n        <div class=\"field\">\r\n          <label for=\"wsEmpAmtEarned\">Total Gross Earnings</label>\r\n          <app-overlay-info [overlayText]=\"'weeklies.v2.employment.rtw.info.popup.1000' | translate | trustHtml\"\r\n            style=\"padding-left: 8px; padding-top:3px\"></app-overlay-info><br/>\r\n          <p-inputNumber inputId=\"wsEmpAmtEarned\" mode=\"currency\" currency=\"USD\" locale=\"en-US\"\r\n            [formControl]=\"wsEmpAmtEarned\" maxlength=\"10\" placeholder=\"$0.00\"></p-inputNumber><br>\r\n          <app-error [class]=\"'app-grid'\" [field]='wsEmpAmtEarned' [form]=\"empFormDirective\" [errDef]=\"{ \r\n              required: 'required', earningsNotZero: 'Gross Earnings cannot be zero.'\r\n            }\"></app-error>\r\n        </div>\r\n      </ion-col>\r\n    </ion-row>\r\n    <ion-row *ngIf=\"empToEdit?.isPartTimeEmployer\">\r\n      <ion-col class=\"ion-padding\" size=\"12\" sizeSm=\"12\" sizeXs=\"12\" sizeMd=\"6\" sizeLg=\"6\" sizeXl=\"6\">\r\n        <div class=\"p-fluid formgrid\">\r\n          <div class=\"field\">\r\n            <b>{{wcEmpName.value}}</b>\r\n          </div>\r\n          <section hidden>\r\n            <input type=\"hidden\" [formControl]=\"wcEmpName\" />\r\n            <input type=\"hidden\" [formControl]=\"wcEmpAddressLine1\" />\r\n            <input type=\"hidden\" [formControl]=\"wcEmpCity\" />\r\n            <input type=\"hidden\" [formControl]=\"wcEmpState\" />\r\n            <input type=\"hidden\" [formControl]=\"wsZipCode\" />\r\n            <input type=\"hidden\" [formControl]=\"wsPhoneNumber\" />\r\n            <input type=\"hidden\" [formControl]=\"hidEmpId\" />\r\n            <input type=\"hidden\" [formControl]=\"isPartTimeEmployer\" />\r\n          </section>\r\n          <div class=\"field\">\r\n            <label for=\"wcEmpStatus\">What's your employment status with this employer?</label>\r\n            <app-dropdown inputId=\"wcEmpStatus\" [options]=\"employmentStatusOptionsAll\" optionLabel=\"text\"\r\n              optionValue=\"value\" appendTo=\"body\" [formControl]=\"wcEmpStatus\" [autoDisplayFirst]=\"false\"\r\n              inputId=\"wcEmpStatus2\"></app-dropdown><br />\r\n            <app-error [class]=\"'app-grid'\" [field]='wcEmpStatus' [form]=\"empFormDirective\" [errDef]=\"{ \r\n                  required: 'required', changeEmpStatus: 'If hours and earnings are both 0, employment status cannot be working-part time.'\r\n                }\"></app-error>\r\n          </div>\r\n\r\n          <div class=\"field\" *ngIf=\"wcEmpStatus.value == 'LWLO'\">\r\n            <label for=\"haveReturnToWorkDate\">Do you know when you're returning to full-time work?</label>\r\n            <p-selectButton [options]=\"yesNoOption\" [formControl]=\"haveReturnToWorkDate\" optionLabel=\"text\"\r\n              optionValue=\"value\"></p-selectButton>\r\n            <app-error [class]=\"'app-grid'\" [field]='haveReturnToWorkDate' [form]=\"empFormDirective\" [errDef]=\"{ \r\n                  required: 'required'\r\n                }\"></app-error>\r\n          </div>\r\n          <div class=\"field\" *ngIf=\"wcEmpStatus.value == 'LWLO' && haveReturnToWorkDate.value == 'Y'\">\r\n            <label for=\"wcEmpLowRtwDate\">When?</label>\r\n            <div style=\"display: flex;\">\r\n              <p-calendar [showIcon]=\"true\" inputId=\"wcEmpLowRtwDate\" appendTo=\"body\" [formControl]=\"wcEmpLowRtwDate\"\r\n                placeholder=\"mm/dd/yyyy\" [showOnFocus]=\"false\" (onInput)=\"dateInput($event)\"\r\n                [iconAriaLabel]=\"'When?'\" [monthNavigator]=\"true\" [yearNavigator]=\"true\" yearRange=\"1901:2050\"></p-calendar>\r\n              <app-overlay-info [overlayText]=\"'weeklies.v2.employment.rtw.info.popup.2050' | translate | trustHtml\"\r\n                style=\"padding-left: 8px; padding-top:3px\"></app-overlay-info>\r\n            </div>\r\n            <app-error [class]=\"'app-grid'\" [field]='wcEmpLowRtwDate' [form]=\"empFormDirective\" [errDef]=\"{ \r\n                  required: 'required'\r\n                }\"></app-error>\r\n          </div>\r\n\r\n          <div class=\"field\" *ngIf=\"wcEmpStatus.value == 'RTWF'\">\r\n            <label for=\"wcEmpRtwDate\">Return to work date</label>\r\n            <p-calendar [showIcon]=\"true\" inputId=\"wcEmpRtwDate\" appendTo=\"body\" [formControl]=\"wcEmpRtwDate\"\r\n              placeholder=\"mm/dd/yyyy\" [showOnFocus]=\"false\" (onInput)=\"dateInput($event)\" optionValue=\"value\"\r\n              [iconAriaLabel]=\"'Return to work date'\" [monthNavigator]=\"true\" [yearNavigator]=\"true\" yearRange=\"1901:2050\"></p-calendar>\r\n            <app-error [class]=\"'app-grid'\" [field]='wcEmpRtwDate' [form]=\"empFormDirective\" [errDef]=\"{ \r\n                  required: 'required'\r\n                }\"></app-error>\r\n          </div>\r\n\r\n          <div class=\"field\" *ngIf=\"wcEmpStatus.value == 'DCFI'\">\r\n            <label\r\n              for=\"dischargeDetail\">{{\"induction.confirm.employment.reason.separation.discharge\"|translate}}</label><br>\r\n            <app-dropdown [options]=\"dischargeReasonOptionsAll\" [formControl]=\"discharged\" optionLabel=\"text\"\r\n              appendTo=\"body\" [autoDisplayFirst]=\"false\" optionValue=\"value\" inputId=\"discharged2\"></app-dropdown>\r\n            <app-error [class]=\"'app-grid'\" [field]='discharged' [form]=\"empFormDirective\" [errDef]=\"{ \r\n                  required: 'required'\r\n                }\"></app-error>\r\n          </div>\r\n\r\n          <div class=\"field\" *ngIf=\"wcEmpStatus.value == 'VOLQ'\">\r\n            <label for=\"volQuitDetails\">{{\"induction.confirm.employment.reason.separation.quit\"|translate}}</label><br>\r\n            <app-dropdown [options]=\"volQuitReasonOptionsAll\" [formControl]=\"voluntaryQuit\" optionLabel=\"text\"\r\n              appendTo=\"body\" [autoDisplayFirst]=\"false\" optionValue=\"value\" inputId=\"voluntaryQuit2\"></app-dropdown>\r\n            <app-error [class]=\"'app-grid'\" [field]='voluntaryQuit' [form]=\"empFormDirective\" [errDef]=\"{ \r\n                  required: 'required'\r\n                }\"></app-error>\r\n          </div>\r\n\r\n\r\n          <div class=\"field\" *ngIf=\"wcEmpStatus.value == 'VOLQ' || wcEmpStatus.value =='SUSP' || wcEmpStatus.value =='DCFI' || wcEmpStatus.value =='STLO'\">\r\n            <label for=\"jobTitle\">Job Title</label>\r\n            <input id=\"jobTitle\" type=\"input\" pInputText [formControl]=\"jobTitle\" appStripInvisibleChars/>\r\n            <app-error [class]=\"'app-grid'\" [field]='jobTitle' [form]=\"empFormDirective\" [errDef]=\"{ \r\n                  required: 'required'\r\n                }\"></app-error>\r\n          </div>\r\n\r\n          <div class=\"field\" *ngIf=\"wcEmpStatus.value == 'VOLQ' || wcEmpStatus.value =='SUSP' || wcEmpStatus.value =='DCFI'\">\r\n            <label for=\"startDayWorked\">First day you worked</label>\r\n            <p-calendar [iconAriaLabel]=\"'Start day worked'\" [showIcon]=\"true\" inputId=\"startDayWorked\" appendTo=\"body\"\r\n              [formControl]=\"startDayWorked\" [maxDate]=\"maxStartDate\"\r\n              [defaultDate]=\"sunDate\" [selectOtherMonths]=\"true\" placeholder=\"mm/dd/yyyy\" [monthNavigator]=\"true\" [yearNavigator]=\"true\" yearRange=\"1901:2050\" (onInput)=\"dateInput($event)\"></p-calendar>\r\n            <app-error [class]=\"'app-grid'\" [field]='startDayWorked' [form]=\"empFormDirective\" [errDef]=\"{ \r\n                required: 'required',\r\n                dateNotBetween: 'Date should be between ' + dynamicParam.sunday_date + ' and ' + dynamicParam.saturday_date + '.'\r\n              }\"></app-error>\r\n          </div>\r\n\r\n          <div class=\"field\">\r\n            <label for=\"lastDayWorked\">Last day you worked</label>\r\n            <p-calendar [iconAriaLabel]=\"'Last day worked'\" [showIcon]=\"true\" inputId=\"lastDayWorked\" appendTo=\"body\"\r\n              [formControl]=\"lastDayWorked\" [minDate]=\"sunDate\" [maxDate]=\"satDate\" dateFormat=\"mm/dd/yy\"\r\n              [defaultDate]=\"sunDate\" [selectOtherMonths]=\"true\" placeholder=\"mm/dd/yyyy\" \r\n              [monthNavigator]=\"true\" [yearNavigator]=\"true\" yearRange=\"1901:2050\" (onInput)=\"dateInput($event)\"></p-calendar>\r\n            <app-error [class]=\"'app-grid'\" [field]='lastDayWorked' [form]=\"empFormDirective\" [errDef]=\"{ \r\n                  required: 'required',\r\n                  dateNotBetween: 'Date should be between ' + dynamicParam.sunday_date + ' and ' + dynamicParam.saturday_date + '.'\r\n                }\"></app-error>\r\n          </div>\r\n          \r\n          <div class=\"field\">\r\n            <span (click)=\"setWageFlag($event)\" class=\"underline-blue\" style=\"cursor:pointer;\">\r\n              <b>Earnings Calculator</b>\r\n            </span>\r\n            <div *ngIf=\"wageDialog\">\r\n              <app-wage-calculator [dynamicParam]=\"dynamicParam\" [showCalculatorPopup]=\"true\"\r\n                (grossEarningsChange)=\"updateGrossEarnings($event)\" (totalHoursChange)=\"updateTotalHours($event)\"\r\n                (saveClicked)=\"onDialogSave($event)\" (cancelClicked)=\"onDialogCancel()\"\r\n                [wageCalculatorSavedData]=\"wageCalculatorData\"></app-wage-calculator>\r\n            </div>\r\n          </div>\r\n\r\n          <div class=\"field\">\r\n            <label for=\"wcEmpHoursWorked\">Hours worked</label>\r\n            <p-inputNumber inputId=\"wcEmpHoursWorked\" [formControl]=\"wcEmpHoursWorked\" maxlength=\"10\"\r\n            mode=\"decimal\" [minFractionDigits]=\"1\" [maxFractionDigits]=\"2\"></p-inputNumber>\r\n            <app-error [class]=\"'app-grid'\" [field]='wcEmpHoursWorked' [form]=\"empFormDirective\" [errDef]=\"{ \r\n                  required: 'required', hoursPerWeekExceeded: 'total hours must not be greater than 168 for the week'\r\n                }\"></app-error>\r\n          </div>\r\n\r\n          <div class=\"field\">\r\n            <label for=\"wsEmpAmtEarned\">Total Gross Earnings</label>\r\n            <app-overlay-info [overlayText]=\"'weeklies.v2.employment.rtw.info.popup.1000' | translate | trustHtml\"\r\n              style=\"padding-left: 8px; padding-top:3px\"></app-overlay-info>\r\n            <p-inputNumber inputId=\"wsEmpAmtEarned\" mode=\"currency\" currency=\"USD\" locale=\"en-US\"\r\n              [formControl]=\"wsEmpAmtEarned\" maxlength=\"10\" placeholder=\"$0.00\"></p-inputNumber>\r\n            <app-error [class]=\"'app-grid'\" [field]='wsEmpAmtEarned' [form]=\"empFormDirective\" [errDef]=\"{ \r\n                  required: 'required', earningsNotZero: 'Gross Earnings cannot be zero.'\r\n                }\"></app-error>\r\n          </div>\r\n        </div>\r\n      </ion-col>\r\n    </ion-row>\r\n    <ion-row>\r\n      <ion-col class=\"ion-text-right\">\r\n        <ion-button shape=\"round\" fill=\"outline\" (click)=\"close()\" type=\"reset\">Clear</ion-button>\r\n        <ion-button shape=\"round\" (click)=\"isEditMode ? save() : add()\" type=\"submit\">\r\n          {{ isEditMode ? 'Save' : 'Add' }}\r\n        </ion-button>\r\n      </ion-col>\r\n    </ion-row>\r\n  </ion-grid>\r\n</form>", styles: [":host ::ng-deep .p-fluid .p-buttonset{display:inline-flex!important}.underline-blue{color:#4478aa;text-decoration:underline}\n"] }]
    }], () => [{ type: i1.UtilService }, { type: i2.UntypedFormBuilder }, { type: i3.ClaimService }], { empFormDirective: [{
            type: ViewChild,
            args: ['empFormDirective', { static: false }]
        }], success: [{
            type: Output
        }], onClose: [{
            type: Output
        }], empToEdit: [{
            type: Input
        }], dynamicParam: [{
            type: Input
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WeeklyCertEmployerComponentQe, { className: "WeeklyCertEmployerComponentQe", filePath: "lib\\components\\weekly-cert-employer\\weekly-cert-employer.component.ts", lineNumber: 17 }); })();
//# sourceMappingURL=data:application/json;base64, 