(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([[2618],{

/***/ 12618:
/*!********************************************************************************************!*\
  !*** ./src/app/create-event/create-event-event-guests/create-event-event-guests.module.ts ***!
  \********************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "CreateEventEventGuestsPageModule": () => (/* binding */ CreateEventEventGuestsPageModule)
/* harmony export */ });
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/router */ 61380);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_angular_router__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var src_app_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/shared-module/shared-module.module */ 69270);
/* harmony import */ var _create_event_event_guests_page__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./create-event-event-guests.page */ 57542);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ 45449);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_3__);





const routes = [
    {
        path: '',
        component: _create_event_event_guests_page__WEBPACK_IMPORTED_MODULE_2__.CreateEventEventGuestsPage
    }
];
class CreateEventEventGuestsPageModule {
}
CreateEventEventGuestsPageModule.ɵfac = function CreateEventEventGuestsPageModule_Factory(t) { return new (t || CreateEventEventGuestsPageModule)(); };
CreateEventEventGuestsPageModule.ɵmod = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdefineNgModule"]({ type: CreateEventEventGuestsPageModule });
CreateEventEventGuestsPageModule.ɵinj = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdefineInjector"]({ imports: [src_app_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_1__.SharedModuleModule, _angular_router__WEBPACK_IMPORTED_MODULE_0__.RouterModule.forChild(routes)] });
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵsetNgModuleScope"](CreateEventEventGuestsPageModule, { declarations: [_create_event_event_guests_page__WEBPACK_IMPORTED_MODULE_2__.CreateEventEventGuestsPage], imports: [src_app_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_1__.SharedModuleModule, _angular_router__WEBPACK_IMPORTED_MODULE_0__.RouterModule] }); })();


/***/ }),

/***/ 57542:
/*!******************************************************************************************!*\
  !*** ./src/app/create-event/create-event-event-guests/create-event-event-guests.page.ts ***!
  \******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "CreateEventEventGuestsPage": () => (/* binding */ CreateEventEventGuestsPage)
/* harmony export */ });
/* harmony import */ var _Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 71670);
/* harmony import */ var _shared_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @shared/components */ 7667);
/* harmony import */ var _shared_components_create_guest_create_guest_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @shared/components/create-guest/create-guest.component */ 70713);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ 45449);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _shared_services__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @shared/services */ 17253);
/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @ionic/angular */ 93819);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/router */ 61380);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_angular_router__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _shared_services_permissions_android_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @shared/services/permissions-android.service */ 23925);
/* harmony import */ var _shared_services_modal_permissions_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @shared/services/modal-permissions.service */ 71003);
/* harmony import */ var _awesome_cordova_plugins_android_permissions_ngx__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @awesome-cordova-plugins/android-permissions/ngx */ 4824);
/* harmony import */ var _shared_services_device_contacts_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @shared/services/device-contacts.service */ 85129);
/* harmony import */ var _shared_services_state_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @shared/services/state.service */ 21284);
/* harmony import */ var _shared_services_focus_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @shared/services/focus.service */ 37763);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/common */ 90944);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_angular_common__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var _shared_components_avatar_avatar_component__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../shared/components/avatar/avatar.component */ 87871);
/* harmony import */ var _shared_components_header_header_component__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../shared/components/header/header.component */ 36290);
/* harmony import */ var _ngx_translate_core__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @ngx-translate/core */ 38699);


















function CreateEventEventGuestsPage_ng_container_15_Template(rf, ctx) {
  if (rf & 1) {
    const _r7 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵgetCurrentView"]();

    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](1, "div", 4)(2, "div", 10)(3, "button", 11);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵlistener"]("click", function CreateEventEventGuestsPage_ng_container_15_Template_button_click_3_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵrestoreView"](_r7);
      const ctx_r6 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵresetView"](ctx_r6.openAddUserModal());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](5, "translate");
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](6, "div", 4)(7, "div", 10)(8, "button", 11);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵlistener"]("click", function CreateEventEventGuestsPage_ng_container_15_Template_button_click_8_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵrestoreView"](_r7);
      const ctx_r8 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵresetView"](ctx_r8.openAddNewUserModal());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](9);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](10, "translate");
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementContainerEnd"]();
  }

  if (rf & 2) {
    const connectionsStatus_r5 = ctx.ngIf;
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("disabled", connectionsStatus_r5.status === "Offline");
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](5, 4, "PG_CREATE_GUESTS_STEP_BTN_COMPANY_SHEDULE"), " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("disabled", connectionsStatus_r5.status === "Offline");
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](10, 6, "PG_CREATE_GUESTS_STEP_BTN_REGISTER_NEW"), " ");
  }
}

function CreateEventEventGuestsPage_div_19_div_7_div_6_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](0, "div", 22);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]();
  }

  if (rf & 2) {
    const selectedUser_r10 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"]().$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtextInterpolate"](selectedUser_r10.company);
  }
}

function CreateEventEventGuestsPage_div_19_div_7_Template(rf, ctx) {
  if (rf & 1) {
    const _r14 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵgetCurrentView"]();

    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](0, "div", 16)(1, "div", 17);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵlistener"]("click", function CreateEventEventGuestsPage_div_19_div_7_Template_div_click_1_listener() {
      const restoredCtx = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵrestoreView"](_r14);
      const selectedUser_r10 = restoredCtx.$implicit;
      const ctx_r13 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"](2);
      return _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵresetView"](ctx_r13.toggleActions(selectedUser_r10));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelement"](2, "app-avatar", 18);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](3, "div", 19)(4, "div", 20);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](6, CreateEventEventGuestsPage_div_19_div_7_div_6_Template, 2, 1, "div", 21);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]()()();
  }

  if (rf & 2) {
    const selectedUser_r10 = ctx.$implicit;
    const ctx_r9 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"](2);
    let tmp_2_0;
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("firstName", selectedUser_r10.firstName)("lastName", selectedUser_r10.lastName)("thumbnailImage", (tmp_2_0 = (tmp_2_0 = selectedUser_r10 == null ? null : selectedUser_r10.image) !== null && tmp_2_0 !== undefined ? tmp_2_0 : selectedUser_r10 == null ? null : selectedUser_r10.thumbnailImage) !== null && tmp_2_0 !== undefined ? tmp_2_0 : null)("size", "md");
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtextInterpolate1"](" ", ctx_r9.helperService.normalizeName(selectedUser_r10.firstName, selectedUser_r10.lastName), " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("ngIf", selectedUser_r10.company);
  }
}

function CreateEventEventGuestsPage_div_19_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](0, "div", 12)(1, "div", 13);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](3, "translate");
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](4, "div", 14);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](6, "translate");
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](7, CreateEventEventGuestsPage_div_19_div_7_Template, 7, 6, "div", 15);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]();
  }

  if (rf & 2) {
    const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtextInterpolate"](_angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](3, 3, "PG_CREATE_GUESTS_STEP_TEXT_GUESTS"));
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtextInterpolate"](_angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](6, 5, "PG_CREATE_GUESTS_STEP_TEXT_TAP_ITEM_EDIT"));
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("ngForOf", ctx_r1.selectedUsers);
  }
}

function CreateEventEventGuestsPage_ion_row_20_Template(rf, ctx) {
  if (rf & 1) {
    const _r16 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵgetCurrentView"]();

    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](0, "ion-row")(1, "ion-col", 23)(2, "div", 24)(3, "button", 25);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵlistener"]("click", function CreateEventEventGuestsPage_ion_row_20_Template_button_click_3_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵrestoreView"](_r16);
      const ctx_r15 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵresetView"](ctx_r15.goToNextStep());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](5, "translate");
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]()()()();
  }

  if (rf & 2) {
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](5, 1, "PG_CREATE_GUESTS_STEP_BTN_NOT_ADD_GUEST"), " ");
  }
}

function CreateEventEventGuestsPage_div_23_button_4_Template(rf, ctx) {
  if (rf & 1) {
    const _r19 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵgetCurrentView"]();

    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](0, "button", 28);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵlistener"]("click", function CreateEventEventGuestsPage_div_23_button_4_Template_button_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵrestoreView"](_r19);
      const ctx_r18 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"](2);
      return _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵresetView"](ctx_r18.goToNextStep());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](2, "translate");
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]();
  }

  if (rf & 2) {
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](2, 1, "BTN_NEXT"), " ");
  }
}

function CreateEventEventGuestsPage_div_23_Template(rf, ctx) {
  if (rf & 1) {
    const _r21 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵgetCurrentView"]();

    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](0, "div", 24)(1, "button", 26);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵlistener"]("click", function CreateEventEventGuestsPage_div_23_Template_button_click_1_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵrestoreView"](_r21);
      const ctx_r20 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵresetView"](ctx_r20.goOneStepBack());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](3, "translate");
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](4, CreateEventEventGuestsPage_div_23_button_4_Template, 3, 3, "button", 27);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]();
  }

  if (rf & 2) {
    const ctx_r3 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](3, 2, "BTN_BACK"), " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("ngIf", !!ctx_r3.selectedUsers.length);
  }
}

function CreateEventEventGuestsPage_div_24_button_4_Template(rf, ctx) {
  if (rf & 1) {
    const _r24 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵgetCurrentView"]();

    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](0, "button", 28);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵlistener"]("click", function CreateEventEventGuestsPage_div_24_button_4_Template_button_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵrestoreView"](_r24);
      const ctx_r23 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"](2);
      return _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵresetView"](ctx_r23.goToNextStep());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](2, "translate");
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]();
  }

  if (rf & 2) {
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](2, 1, "BTN_NEXT"), " ");
  }
}

function CreateEventEventGuestsPage_div_24_Template(rf, ctx) {
  if (rf & 1) {
    const _r26 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵgetCurrentView"]();

    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](0, "div", 24)(1, "button", 26);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵlistener"]("click", function CreateEventEventGuestsPage_div_24_Template_button_click_1_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵrestoreView"](_r26);
      const ctx_r25 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵresetView"](ctx_r25.goOneStepBack());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](3, "translate");
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](4, CreateEventEventGuestsPage_div_24_button_4_Template, 3, 3, "button", 27);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]();
  }

  if (rf & 2) {
    const ctx_r4 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](3, 2, "BTN_BACK"), " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("ngIf", !!ctx_r4.selectedUsers.length);
  }
}

class CreateEventEventGuestsPage {
  constructor(createEventService, navigationService, modalController, helperService, commonService, logService, loadingService, actionSheetController, activatedRoute, router, permissionsAndroidService, modalPermissionsService, androidPermissions, platform, deviceContactsService, translateConfigService, stateService, focusService, notificator, userPhotoService) {
    var _this = this;

    this.createEventService = createEventService;
    this.navigationService = navigationService;
    this.modalController = modalController;
    this.helperService = helperService;
    this.commonService = commonService;
    this.logService = logService;
    this.loadingService = loadingService;
    this.actionSheetController = actionSheetController;
    this.activatedRoute = activatedRoute;
    this.router = router;
    this.permissionsAndroidService = permissionsAndroidService;
    this.modalPermissionsService = modalPermissionsService;
    this.androidPermissions = androidPermissions;
    this.platform = platform;
    this.deviceContactsService = deviceContactsService;
    this.translateConfigService = translateConfigService;
    this.stateService = stateService;
    this.focusService = focusService;
    this.notificator = notificator;
    this.userPhotoService = userPhotoService;
    this.selectedUsers = [];
    this.isLimitedProfile = false;
    this.existPendings = false;
    this.approveEventReview = '';
    this.event = null;
    this.selectedInvitesForCancel = [];

    this.navigateToQRCode = () => {
      this.navigationService.root(['/home']);
    };

    this.navigateToPendingLiberations = () => {
      this.navigationService.forward(['/push-notifications']);
    };

    this.addUserToSelectedUsers = user => {
      const checkIsMaxGuestsInvited = this.checkIsMaxGuestsInvited();

      if (!checkIsMaxGuestsInvited) {
        return;
      }

      console.log('addUserToSelectedUsers:', user);
      const foundUser = this.selectedUsers.find(selectedUser => selectedUser.id === user.id);

      if (!foundUser) {
        this.selectedUsers.push(user);
      } else {
        this.selectedUsers = this.selectedUsers.map(selectedUser => {
          if (selectedUser.id === foundUser.id) {
            selectedUser = user;
          }

          return selectedUser;
        });
      }
    };

    this.removeUserFromSelectedUsers = user => {
      if (!user.status || user.status === 'WAITING_FOR_CHECKIN') {
        this.selectedUsers = this.selectedUsers.filter(selectedUser => selectedUser.id !== user.id);
      }

      if (this.existIdEvent) {
        this.addInvitesToCancel(user);
      }
    };

    this.openAddUserModal = /*#__PURE__*/(0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      const checkIsMaxGuestsInvited = _this.checkIsMaxGuestsInvited();

      if (!checkIsMaxGuestsInvited) {
        return;
      }

      const modal = yield _this.modalController.create({
        component: _shared_components__WEBPACK_IMPORTED_MODULE_1__.SelectorForGuestsToAddToEventComponent,
        componentProps: {
          contact: null,
          isNewContact: false
        }
      });
      modal.onDidDismiss().then(_this.onModalDismissCallback);
      yield modal.present();
    });
    this.openAddNewUserModal = /*#__PURE__*/(0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      const checkIsMaxGuestsInvited = _this.checkIsMaxGuestsInvited();

      if (!checkIsMaxGuestsInvited) {
        return;
      }

      const modal = yield _this.modalController.create({
        component: _shared_components_create_guest_create_guest_component__WEBPACK_IMPORTED_MODULE_2__.CreateGuestComponent,
        componentProps: {
          isNewContact: true
        }
      });
      modal.onDidDismiss().then(_this.onModalDismissCallback);
      yield modal.present();
    });

    this.onModalDismissCallback = detail => {
      if (detail && detail.data) {
        this.addUserToSelectedUsers(detail.data);
      }
    };

    this.goOneStepBack = () => {
      if (this.isLimitedProfile) {
        this.navigationService.back(['/events']);
      } else {
        this.createEventService.setGuests(this.selectedUsers);
        this.navigationService.back(['/create-event-event-hosts']);
      }
    };

    this.goToNextStep = () => {
      this.createEventService.setGuests(this.selectedUsers);

      if (this.existIdEvent) {
        this.createEventService.setInvitesToDelete(this.selectedInvitesForCancel);
      }

      if (this.isLimitedProfile) {
        this.goToEventResume();
      } else {
        if (this.canBeEdited() || this.approveEventReview) {
          this.navigationService.forward(['/create-event-event-options']);
        } else {
          this.goToEventResume();
        }
      }
    };

    this.goToEventResume = () => {
      let floor = null;
      let group = null;

      if (this.isLimitedProfile && this.event?.id) {
        floor = this.event?.floor;
        group = this.event?.group;
      } else {
        floor = this.createEventService.getSelectedFloor();
        group = this.createEventService.getSelectedGroup();
      }

      const event = {
        id: this.createEventService.getId(),
        title: this.createEventService.getTitle(),
        startAt: this.createEventService.getStartDate(),
        endAt: this.createEventService.getEndDate(),
        floor,
        group,
        hosts: this.createEventService.getHosts(),
        guests: this.createEventService.getGuests(),
        multiCheckin: this.createEventService.getMultiCheckIn(),
        allowCompanion: this.createEventService.getCompanionAllowed(),
        needAuthorization: this.createEventService.getNeedAuthorization(),
        checkinStartAt: this.createEventService.getCheckInStartAt(),
        bookeis: this.createEventService.getBookings(),
        bookeisToCancel: this.existIdEvent ? this.createEventService.getBookeisToCancel() : [],
        invitesToDelete: this.existIdEvent ? this.createEventService.getInvitesToDelete() : [],
        periods: this.createEventService.getPeriods() ?? [],
        recurrenceDates: this.createEventService.getRecurrenceDates() ?? [],
        recurrent: this.createEventService.getRecurrent() ?? false
      };
      const navigationExtras = {
        state: {
          event,
          isLimitedProfile: this.isLimitedProfile
        }
      };
      this.navigationService.forward(['/create-event-event-resume'], navigationExtras);
    };

    this.canBeEdited = () => !this.createEventService.getGuests().find(g => g.status && g.status !== 'WAITING_FOR_CHECKIN');

    this.toggleActions = /*#__PURE__*/function () {
      var _ref3 = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (selectedUser) {
        const actionSheet = yield _this.actionSheetController.create({
          header: _this.translateConfigService.translate('ACTION_SHEET_HEADER'),
          cssClass: '',
          buttons: [{
            text: _this.translateConfigService.translate('ACTION_SHEET_BTN_REMOVE'),
            role: 'destructive',
            icon: 'trash',
            handler: () => {
              _this.removeUserFromSelectedUsers(selectedUser);
            }
          }, {
            text: _this.translateConfigService.translate('ACTION_SHEET_BTN_EDIT'),
            icon: 'create',
            handler: () => {
              _this.onGuestClick(selectedUser);
            }
          }, {
            text: _this.translateConfigService.translate('ACTION_SHEET_BTN_BACK'),
            icon: 'arrow-back',
            role: 'cancel',
            handler: () => {}
          }]
        });
        yield actionSheet.present();
      });

      return function (_x) {
        return _ref3.apply(this, arguments);
      };
    }();

    this.onGuestClick = /*#__PURE__*/function () {
      var _ref4 = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (guest) {
        console.log('guest:', guest);
        const modal = yield _this.modalController.create({
          component: _shared_components_create_guest_create_guest_component__WEBPACK_IMPORTED_MODULE_2__.CreateGuestComponent,
          componentProps: {
            contact: guest
          }
        });
        modal.onDidDismiss().then(_this.onModalDismissCallback);
        yield modal.present();
      });

      return function (_x2) {
        return _ref4.apply(this, arguments);
      };
    }();

    this.selectFromUserContacts = /*#__PURE__*/(0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      const checkIsMaxGuestsInvited = _this.checkIsMaxGuestsInvited();

      if (!checkIsMaxGuestsInvited) {
        return;
      }

      const allPermission = yield _this.handlePermissionConctats();

      if (!allPermission) {
        _this.modalPermissionsService.openModal({
          permission: 'CONTACT'
        }).then(value => {
          if (value) {
            _this.deviceContactsService.pickContact().then(_this.handleSelectFromUserContactsSuccessResponse).catch(_this.handleSelectFromUserContactsErrorResponse);
          } else {
            _this.logService.logError('permissionModal::handleSelectFromUserContactsErrorResponsePageCreateEventGuestContacts', '', 'modal-permission-rejected');

            return;
          }
        });
      } else {
        _this.deviceContactsService.pickContact().then(_this.handleSelectFromUserContactsSuccessResponse).catch(_this.handleSelectFromUserContactsErrorResponse);
      }
    });

    this.handleSelectFromUserContactsSuccessResponse = response => {
      console.log('handleSelectFromUserContactsSuccessResponse');
      console.log('response: are you here?', response);
      const contact = response.contact;
      this.verifyIfNeedsPhoneNumberSelectionModal(contact);
    };

    this.handleSelectFromUserContactsErrorResponse = error => {
      console.log('handleSelectFromUserContactsErrorResponse');
      console.log('error:', error);
      this.logService.logError('contacts::handleSelectFromUserContactsErrorResponse', '', error);
    };

    this.verifyIfNeedsPhoneNumberSelectionModal = contact => {
      const phoneNumber = contact.phones;

      if (phoneNumber && phoneNumber.length) {
        if (phoneNumber.length > 1) {
          // this.handlePhoneSelectionModal(contact);
          this.phoneNumberSelectionModalOnPhoneNumberSelectionCallback(contact, phoneNumber[0]);
        } else {
          this.phoneNumberSelectionModalOnPhoneNumberSelectionCallback(contact, phoneNumber[0]);
        }
      } else {
        this.phoneNumberSelectionModalOnPhoneNumberSelectionCallback(contact, null);
      }
    };

    this.phoneNumberSelectionModalOnPhoneNumberSelectionCallback = (contact, selectedPhoneNumber) => {
      const data = {
        phone: this.getPhoneNumberFromSelectedContact(selectedPhoneNumber)
      };
      this.verifyIfAlreadyExistsInUserPersonalAgenda(data).then(user => {
        if (user) {
          this.verifyIfUserNeedsToUpdateEmailModal(contact, user);
        } else {
          this.verifyIfNeedsEmailSelectionModal(contact, selectedPhoneNumber);
        }
      });
    };

    this.verifyIfAlreadyExistsInUserPersonalAgenda = data => {
      this.loadingService.show(this.translateConfigService.translate('PG_CREATE_HOSTS_STEP_LOADING'), 'contact-loading-data');
      data = { ...data,
        phoneNumber: data.phone
      };
      return new Promise(resolve => {
        this.createEventService.getPrivateGuestByPhoneNumber(data).then(response => {
          this.loadingService.hide(null, 'contact-loading-data');
          console.log('response:', response);
          resolve(response);
        }).catch(error => {
          this.loadingService.hide(null, 'contact-loading-data');
          console.log('error:', error);
          resolve(false);
        });
      });
    };

    this.verifyIfUserNeedsToUpdateEmailModal = (contact, user) => {
      const emails = contact.emails;

      if (emails && emails.length) {
        if (emails.length > 1) {
          this.handleEmailUpdateSelectionModal(contact, user);
        } else {
          this.addUserToSelectedUsers(user);
        }
      } else {
        this.addUserToSelectedUsers(user);
      }
    };

    this.verifyIfNeedsEmailSelectionModal = (contact, selectedPhoneNumber) => {
      const emails = contact.emails;

      if (emails && emails.length) {
        if (emails.length > 1) {
          this.handleEmailSelectionModal(contact, selectedPhoneNumber);
        } else {
          this.emailSelectionModalOnEmailSelectionCallback(contact, emails[0], selectedPhoneNumber);
        }
      } else {
        this.emailSelectionModalOnEmailSelectionCallback(contact, null, selectedPhoneNumber);
      }
    };

    this.handleEmailSelectionModal = /*#__PURE__*/function () {
      var _ref6 = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (contact, selectedPhoneNumber) {
        const modal = yield _this.modalController.create({
          component: _shared_components__WEBPACK_IMPORTED_MODULE_1__.SelectContactEmailToUseComponent,
          componentProps: {
            contact
          }
        });
        modal.onDidDismiss().then(response => {
          if (response.data) {
            _this.emailSelectionModalOnEmailSelectionCallback(contact, response.data, selectedPhoneNumber);
          } else {
            _this.emailSelectionModalOnBackCallback();
          }
        });
        yield modal.present();
      });

      return function (_x3, _x4) {
        return _ref6.apply(this, arguments);
      };
    }();

    this.handleEmailUpdateSelectionModal = /*#__PURE__*/function () {
      var _ref7 = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (contact, user) {
        const modal = yield _this.modalController.create({
          component: _shared_components__WEBPACK_IMPORTED_MODULE_1__.SelectContactEmailToUseComponent,
          componentProps: {
            contact
          }
        });
        modal.onDidDismiss().then(response => {
          if (response.data) {
            _this.emailUpdateSelectionModalOnEmailSelectionCallback(user, response.data);
          } else {
            _this.emailSelectionModalOnBackCallback();
          }
        });
        yield modal.present();
      });

      return function (_x5, _x6) {
        return _ref7.apply(this, arguments);
      };
    }();

    this.emailUpdateSelectionModalOnEmailSelectionCallback = (user, selectedEmail) => {
      const email = this.getEmailFromSelectedEmail(selectedEmail);

      if (user.email === email) {
        this.addUserToSelectedUsers(user);
      } else {
        user.email = email;
        this.onUpdateGuest(user);
      }
    };

    this.emailSelectionModalOnEmailSelectionCallback = (contact, selectedEmail, selectedPhoneNumber) => {
      const email = this.getEmailFromSelectedEmail(selectedEmail);
      const phone = this.getPhoneNumberFromSelectedContact(selectedPhoneNumber);
      const firstName = this.getFirstNameFromSelectedContact(contact);
      const lastName = this.getLastNameFromSelectedContact(contact);
      const splitfirstName = firstName.split(' ').length > 0 ? firstName.split(' ')[0] : firstName;
      const splitlastName = firstName.split(' ').length > 0 ? firstName.split(' ').slice(1).join(' ') : lastName;
      const data = {
        email,
        firstName: splitfirstName,
        lastName: `${lastName ? lastName : ''} ${splitlastName}`,
        phone
      };

      if (!(firstName && lastName && phone)) {
        this.onOpenModalToAddMissingInfo(data, contact);
      } else {
        /*
        Como o campo telefone é opcional e estáva quebrando o fluxo quando o numero não possui DDI
        acabou que toda vez que o numero estáva incompleto o modal para atualizar o contato era chamado.
        Foi reduzido de 12 para 9 vai conseguir seguir o fluxo sem problemas..
        */
        if (phone.length < 9) {
          this.onOpenModalToAddMissingInfo(data, contact);
        } else {
          this.onAutoCreateGuest(data);
        }
      }
    };

    this.handlePhoneSelectionModal = /*#__PURE__*/function () {
      var _ref8 = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (contact) {
        const modal = yield _this.modalController.create({
          component: _shared_components__WEBPACK_IMPORTED_MODULE_1__.SelectContactPhoneNumberToUseComponent,
          componentProps: {
            contact
          }
        });
        modal.onDidDismiss().then(response => {
          if (response.data) {
            _this.phoneNumberSelectionModalOnPhoneNumberSelectionCallback(contact, response.data);
          } else {
            _this.emailSelectionModalOnBackCallback(); // TODO Fazer um callback especifico

          }
        });
        yield modal.present();
      });

      return function (_x7) {
        return _ref8.apply(this, arguments);
      };
    }();

    this.emailSelectionModalOnBackCallback = () => {
      console.log('emailSelectionModalOnBackCallback');
    };

    this.onOpenModalToAddMissingInfo = /*#__PURE__*/function () {
      var _ref9 = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (guest, contact) {
        const modal = yield _this.modalController.create({
          component: _shared_components_create_guest_create_guest_component__WEBPACK_IMPORTED_MODULE_2__.CreateGuestComponent,
          componentProps: {
            contact: guest,
            type: 'personal'
          }
        });
        modal.onDidDismiss().then(detail => {
          _this.onModalDismissCallback(detail);
        });
        yield modal.present();
      });

      return function (_x8, _x9) {
        return _ref9.apply(this, arguments);
      };
    }();

    this.onAutoCreateGuest = data => {
      this.loadingService.show(this.translateConfigService.translate('PG_CREATE_HOSTS_STEP_LOADING'), 'contact-loading-data-again');
      data = { ...data,
        phoneNumber: data.phone
      };
      this.createEventService.createPrivateGuest(data).then(this.handleCreateGuestSuccessResponse).catch(this.handleCreateGuestErrorResponse);
    };

    this.onUpdateGuest = guest => {
      this.createEventService.updatePrivateGuest(guest).then(this.handleUpdateGuestSuccessResponse).catch(this.handleUpdateGuestErrorResponse);
    };

    this.handleUpdateGuestSuccessResponse = response => {
      console.log('handleUpdateGuestSuccessResponse');
      console.log('response:', response);
      this.addUserToSelectedUsers(response);
    };

    this.handleUpdateGuestErrorResponse = error => {
      console.log('handleUpdateGuestErrorResponse');
      console.log('error:', error);
      this.logService.logError('http::handleUpdateGuestErrorResponse', '', error);
    };

    this.handleCreateGuestSuccessResponse = response => {
      console.log('handleCreateGuestSuccessResponse');
      this.loadingService.hide(null, 'contact-loading-data-again').then(() => {
        this.addUserToSelectedUsers(response);
      });
    };

    this.handleCreateGuestErrorResponse = error => {
      console.log('handleCreateGuestErrorResponse');
      console.log('error:', error);
      this.loadingService.hide(null, 'contact-loading-data-again');
      this.logService.logError('http::handleCreateGuestErrorResponse', '', error);
    };

    this.getEmailFromSelectedEmail = selectedEmail => selectedEmail && selectedEmail.address ? this.commonService.clearString(selectedEmail.address) : null;

    this.getFirstNameFromSelectedContact = contact => contact && contact.name && contact.name.given ? this.commonService.clearString(contact.name.given) : '';

    this.getLastNameFromSelectedContact = contact => contact && contact.name && contact.name.family ? this.commonService.clearString(contact.name.family) : '';

    this.getPhoneNumberFromSelectedContact = selectedPhoneNumber => {
      const phone = selectedPhoneNumber && selectedPhoneNumber.number ? this.commonService.clearString(selectedPhoneNumber.number) : '';
      return phone.replace(/\D+/g, '');
    };

    this.approveEventReview = this.isApproveEventReview();
    this.existIdEvent = !this.createEventService.getIsNew();
    this.activatedRoute.queryParams.subscribe(params => {
      const stateNavigation = this.router.getCurrentNavigation()?.extras?.state;

      if (stateNavigation) {
        this.isLimitedProfile = stateNavigation.isLimitedProfile ? stateNavigation.isLimitedProfile : false;
        this.event = stateNavigation?.event;
      }
    });
  }

  ionViewWillEnter() {
    this.focusService.applyFocusQuerySelector('create_event_guests', 3500);
  }

  ngOnInit() {
    this.showActions = null;
    let selectedUsers = this.createEventService.getGuests();
    selectedUsers = selectedUsers ? selectedUsers : [];
    this.selectedUsers = selectedUsers;
    this.userPhotoService.enrichUsersWithPhotos(this.selectedUsers);
    this.maxInvites = this.createEventService.getMaxInvites();

    if (this.existIdEvent) {
      let selectedInvitesForCancel = this.createEventService.getInvitesToDelete();
      selectedInvitesForCancel = selectedInvitesForCancel ? selectedInvitesForCancel : [];
      this.selectedInvitesForCancel = selectedInvitesForCancel;
    }
  }

  ionViewDidEnter() {}

  ionViewDidLeave() {}

  addInvitesToCancel(value) {
    const {
      inviteId
    } = value;
    const verifyForRepetition = this.verifyForRepetition(value);

    if (!verifyForRepetition && inviteId) {
      this.selectedInvitesForCancel.push(inviteId);
    }
  }

  verifyForRepetition(value) {
    return this.selectedInvitesForCancel.find(inviteId => inviteId === value.inviteId);
  }

  handlePermissionConctats() {
    var _this2 = this;

    return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      const hasPermissionContact = _this2.platform.is('cordova') ? yield _this2.permissionsAndroidService.hasPermission('READ_CONTACTS') : {
        hasPermission: false
      };

      if (hasPermissionContact.hasPermission) {
        return true;
      } else {
        return false;
      }
    })();
  }

  isApproveEventReview() {
    return this.createEventService.getApproveEventReview();
  }

  checkIsMaxGuestsInvited() {
    if (!this.maxInvites) {
      return true;
    }

    if (this.selectedUsers.length >= this.maxInvites) {
      this.toastShowMaxGuestsInvited();
      return false;
    }

    return true;
  }

  toastShowMaxGuestsInvited() {
    const count = this.maxInvites;
    const message = this.translateConfigService.translate('TOAST_MAX_GUESTS_INVITED', {
      count
    });
    const title = this.translateConfigService.translate('TOAST_MAX_GUESTS_INVITED_TITLE');
    this.createEventService.setApproveEventReview(true);
    const notification = {
      message,
      type: 'error',
      title,
      timeout: 8000
    };
    this.notificator.notify(notification);
  }

}

CreateEventEventGuestsPage.ɵfac = function CreateEventEventGuestsPage_Factory(t) {
  return new (t || CreateEventEventGuestsPage)(_angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_4__.CreateEventService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_4__.NavigationService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_ionic_angular__WEBPACK_IMPORTED_MODULE_15__.ModalController), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_4__.HelperService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_4__.CommonService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_4__.LogService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_4__.LoadingService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_ionic_angular__WEBPACK_IMPORTED_MODULE_15__.ActionSheetController), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_angular_router__WEBPACK_IMPORTED_MODULE_5__.ActivatedRoute), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_angular_router__WEBPACK_IMPORTED_MODULE_5__.Router), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services_permissions_android_service__WEBPACK_IMPORTED_MODULE_6__.PermissionsAndroidService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services_modal_permissions_service__WEBPACK_IMPORTED_MODULE_7__.ModalPermissionsService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_awesome_cordova_plugins_android_permissions_ngx__WEBPACK_IMPORTED_MODULE_8__.AndroidPermissions), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_ionic_angular__WEBPACK_IMPORTED_MODULE_15__.Platform), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services_device_contacts_service__WEBPACK_IMPORTED_MODULE_9__.DeviceContactsService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_4__.TranslateConfigService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services_state_service__WEBPACK_IMPORTED_MODULE_10__.StateService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services_focus_service__WEBPACK_IMPORTED_MODULE_11__.FocusService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_4__.NotificatorService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_4__.UserPhotoService));
};

CreateEventEventGuestsPage.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdefineComponent"]({
  type: CreateEventEventGuestsPage,
  selectors: [["app-create-event-event-guests"]],
  decls: 25,
  vars: 19,
  consts: [["defaultHref", "create-event-event-hosts", 3, "title", "showBadge", "refresh", "menuToggle"], [1, "centralized-content"], [1, "page-title"], ["id", "create_event_guests", "tabindex", "1", 1, "sub-title"], [1, "add-from"], [1, "add-user"], [3, "click"], [4, "ngIf"], ["class", "results", 4, "ngIf"], ["class", "button-holder", 4, "ngIf"], [1, "add-user", 2, "margin-top", "10px"], [3, "disabled", "click"], [1, "results"], [1, "title"], [1, "sub-title"], ["class", "result", 4, "ngFor", "ngForOf"], [1, "result"], [1, "main", 3, "click"], [3, "firstName", "lastName", "thumbnailImage", "size"], [1, "user-info"], [1, "full-name"], ["class", "company", 4, "ngIf"], [1, "company"], [1, "ion-margin-vertical"], [1, "button-holder"], ["type", "button", 3, "click"], ["type", "button", 1, "back", 3, "click"], ["type", "submit", 3, "click", 4, "ngIf"], ["type", "submit", 3, "click"]],
  template: function CreateEventEventGuestsPage_Template(rf, ctx) {
    if (rf & 1) {
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelement"](0, "app-header", 0);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](1, "translate");
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](2, "ion-content")(3, "div", 1)(4, "div", 2)(5, "div", 3);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](6);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](7, "translate");
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]()();
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](8, "ion-row")(9, "ion-col")(10, "div", 4)(11, "div", 5)(12, "button", 6);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵlistener"]("click", function CreateEventEventGuestsPage_Template_button_click_12_listener() {
        return ctx.selectFromUserContacts();
      });
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](13);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](14, "translate");
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]()()();
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](15, CreateEventEventGuestsPage_ng_container_15_Template, 11, 8, "ng-container", 7);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](16, "async");
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]()();
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](17, "ion-row")(18, "ion-col");
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](19, CreateEventEventGuestsPage_div_19_Template, 8, 7, "div", 8);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]()();
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](20, CreateEventEventGuestsPage_ion_row_20_Template, 6, 3, "ion-row", 7);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](21, "ion-row")(22, "ion-col");
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](23, CreateEventEventGuestsPage_div_23_Template, 5, 4, "div", 9);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](24, CreateEventEventGuestsPage_div_24_Template, 5, 4, "div", 9);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]()()()();
    }

    if (rf & 2) {
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("title", _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](1, 11, "PG_CREATE_GUESTS_STEP_HEADER_TITLE"))("showBadge", true)("refresh", false)("menuToggle", false);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](6);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](7, 13, "PG_CREATE_GUESTS_STEP_TEXT_SUBTITLE"), " ");
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](7);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](14, 15, "PG_CREATE_GUESTS_STEP_BTN_PHONE_SHEDULE"), " ");
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](2);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("ngIf", _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](16, 17, ctx.stateService.getState()));
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](4);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("ngIf", !!ctx.selectedUsers.length);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](1);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("ngIf", !ctx.selectedUsers.length);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](3);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("ngIf", ctx.isLimitedProfile === false);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](1);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("ngIf", ctx.isLimitedProfile === true);
    }
  },
  dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_12__.NgForOf, _angular_common__WEBPACK_IMPORTED_MODULE_12__.NgIf, _ionic_angular__WEBPACK_IMPORTED_MODULE_15__.IonCol, _ionic_angular__WEBPACK_IMPORTED_MODULE_15__.IonContent, _ionic_angular__WEBPACK_IMPORTED_MODULE_15__.IonRow, _shared_components_avatar_avatar_component__WEBPACK_IMPORTED_MODULE_13__.AvatarComponent, _shared_components_header_header_component__WEBPACK_IMPORTED_MODULE_14__.HeaderComponent, _angular_common__WEBPACK_IMPORTED_MODULE_12__.AsyncPipe, _ngx_translate_core__WEBPACK_IMPORTED_MODULE_16__.TranslatePipe],
  styles: ["ion-content[_ngcontent-%COMP%] {\n  --background: #f1f1f1;\n}\n\nion-toolbar[_ngcontent-%COMP%] {\n  font-family: \"Nunito\", sans-serif;\n}\n\nion-toolbar[_ngcontent-%COMP%]   ion-img[_ngcontent-%COMP%] {\n  height: 25px;\n  width: 25px;\n}\n\nion-toolbar[_ngcontent-%COMP%]   ion-title[_ngcontent-%COMP%] {\n  letter-spacing: 1px;\n}\n\nion-toolbar[_ngcontent-%COMP%]   ion-button[_ngcontent-%COMP%]   fa-icon[_ngcontent-%COMP%] {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  height: 24px;\n  padding: 0;\n  width: 24px;\n  margin: 0;\n  font-size: 19px;\n  color: #656768;\n}\n\nion-toolbar[_ngcontent-%COMP%]   ion-button.hover[_ngcontent-%COMP%] {\n  background: #fff;\n}\n\n.centralized-content[_ngcontent-%COMP%] {\n  height: calc(100vh - 56px);\n  display: flex;\n  justify-content: flex-start;\n  flex-direction: column;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .page-title[_ngcontent-%COMP%] {\n  margin-top: 30px;\n  margin-bottom: 26px;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .page-title[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%] {\n  font-size: initial !important;\n  font-weight: bold;\n  text-align: center;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .page-title[_ngcontent-%COMP%]   .sub-title[_ngcontent-%COMP%] {\n  text-align: center;\n  color: #656768;\n  font-size: 0.9em;\n  margin-top: 4px;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .input-holder[_ngcontent-%COMP%] {\n  margin-top: 8px;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .add-from[_ngcontent-%COMP%] {\n  display: flex;\n  width: 80%;\n  margin: 0 10%;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .add-from[_ngcontent-%COMP%]   .add-user[_ngcontent-%COMP%] {\n  display: flex;\n  align-content: center;\n  justify-content: center;\n  flex: 1;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .add-from[_ngcontent-%COMP%]   .add-user[_ngcontent-%COMP%]   button[_ngcontent-%COMP%] {\n  padding: 0.75em 1.5em;\n  border-radius: 4px;\n  background-color: #0ec254;\n  color: #fff;\n  font-size: 1em;\n  width: calc(100% - 4px);\n  margin-left: 4px;\n  transition: background-color 0.1s ease-out;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .add-from[_ngcontent-%COMP%]   .add-user[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:active {\n  background-color: #fff;\n  color: #0ec254;\n  transition: background-color 0.1s ease-out;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .add-from[_ngcontent-%COMP%]   .add-user[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:focus {\n  outline: none;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .add-from[_ngcontent-%COMP%]   .add-user-from-contacts[_ngcontent-%COMP%] {\n  display: flex;\n  align-content: center;\n  justify-content: center;\n  flex: 1;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .add-from[_ngcontent-%COMP%]   .add-user-from-contacts[_ngcontent-%COMP%]   button[_ngcontent-%COMP%] {\n  padding: 0.75em 1.5em;\n  border-radius: 4px;\n  background-color: #0ec254;\n  color: #fff;\n  font-size: 1em;\n  width: calc(100% - 4px);\n  margin-right: 4px;\n  min-height: 100px;\n  transition: background-color 0.1s ease-out;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .add-from[_ngcontent-%COMP%]   .add-user-from-contacts[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:active {\n  background-color: #fff;\n  color: #0ec254;\n  transition: background-color 0.1s ease-out;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .add-from[_ngcontent-%COMP%]   .add-user-from-contacts[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:focus {\n  outline: none;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .dont-add-just-go[_ngcontent-%COMP%] {\n  display: flex;\n  align-content: center;\n  justify-content: center;\n  margin-top: 8px;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .dont-add-just-go[_ngcontent-%COMP%]   .skip[_ngcontent-%COMP%] {\n  display: flex;\n  align-content: center;\n  justify-content: center;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .dont-add-just-go[_ngcontent-%COMP%]   .skip[_ngcontent-%COMP%]   button[_ngcontent-%COMP%] {\n  padding: 0.75em 1.5em;\n  border-radius: 4px;\n  background-color: #0ec254;\n  color: #fff;\n  font-size: 1em;\n  width: 80%;\n  min-height: 100px;\n  transition: background-color 0.1s ease-out;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .dont-add-just-go[_ngcontent-%COMP%]   .skip[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:active {\n  background-color: #fff;\n  color: #0ec254;\n  transition: background-color 0.1s ease-out;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .dont-add-just-go[_ngcontent-%COMP%]   .skip[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:focus {\n  outline: none;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .results[_ngcontent-%COMP%] {\n  margin-top: 1.5em;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .results[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%] {\n  font-size: initial !important;\n  width: 80%;\n  margin: 0 10% 6px;\n  font-weight: bold;\n  text-align: center;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .results[_ngcontent-%COMP%]   .sub-title[_ngcontent-%COMP%] {\n  width: 80%;\n  margin: 0 10% 11px;\n  font-size: 0.9em;\n  background-color: #eee;\n  padding: 4px 6px;\n  border-radius: 2px;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .results[_ngcontent-%COMP%]   .result[_ngcontent-%COMP%] {\n  width: 80%;\n  margin: 0 10% 4px;\n  border: 1px solid #eee;\n  border-radius: 4px;\n  padding: 8px 12px;\n  display: flex;\n  justify-content: space-between;\n  flex-direction: column;\n  background-color: #fff;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .results[_ngcontent-%COMP%]   .result[_ngcontent-%COMP%]   .main[_ngcontent-%COMP%] {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  gap: 10px;\n  width: 100%;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .results[_ngcontent-%COMP%]   .result[_ngcontent-%COMP%]   .main[_ngcontent-%COMP%]   app-avatar[_ngcontent-%COMP%] {\n  flex-shrink: 0;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .results[_ngcontent-%COMP%]   .result[_ngcontent-%COMP%]   .main[_ngcontent-%COMP%]   .user-info[_ngcontent-%COMP%] {\n  flex: 1;\n  min-width: 0;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .results[_ngcontent-%COMP%]   .result[_ngcontent-%COMP%]   .main[_ngcontent-%COMP%]   .user-info[_ngcontent-%COMP%]   .company[_ngcontent-%COMP%] {\n  color: #aaa;\n  font-size: 0.8em;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .results[_ngcontent-%COMP%]   .result[_ngcontent-%COMP%]   .main[_ngcontent-%COMP%]   .open-actions[_ngcontent-%COMP%] {\n  width: 32px;\n  height: 32px;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  border-radius: 32px;\n  border: 1px solid #eee;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .results[_ngcontent-%COMP%]   .result[_ngcontent-%COMP%]   .actions[_ngcontent-%COMP%] {\n  display: none;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .results[_ngcontent-%COMP%]   .result[_ngcontent-%COMP%]   .actions.show[_ngcontent-%COMP%] {\n  display: block;\n  margin-top: 4px;\n  border-top: 1px solid #eee;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .results[_ngcontent-%COMP%]   .result[_ngcontent-%COMP%]   .actions.show[_ngcontent-%COMP%]   .edit-action[_ngcontent-%COMP%], .centralized-content[_ngcontent-%COMP%]   .results[_ngcontent-%COMP%]   .result[_ngcontent-%COMP%]   .actions.show[_ngcontent-%COMP%]   .cant-edit[_ngcontent-%COMP%] {\n  margin-top: 4px;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .button-holder[_ngcontent-%COMP%] {\n  justify-content: space-evenly;\n}\n\n.pulsate-fwd[_ngcontent-%COMP%] {\n  animation: pulsate-fwd 0.5s ease-in-out infinite both;\n  outline: none;\n}\n\n@keyframes pulsate-fwd {\n  0% {\n    transform: scale(1);\n  }\n  50% {\n    transform: scale(1.5);\n  }\n  100% {\n    transform: scale(1);\n  }\n}\n/*# sourceMappingURL=data:application/json;base64,[encoded data, 9400 characters] */"]
});

/***/ }),

/***/ 37763:
/*!**************************************************!*\
  !*** ./src/app/shared/services/focus.service.ts ***!
  \**************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "FocusService": () => (/* binding */ FocusService)
/* harmony export */ });
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/router */ 61380);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_angular_router__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/operators */ 59151);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 45449);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_1__);




class FocusService {
    constructor(router) {
        this.router = router;
    }
    focusInRouterNavigate() {
        this.router.events.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_2__.filter)(event => event instanceof _angular_router__WEBPACK_IMPORTED_MODULE_0__.NavigationEnd)).subscribe(() => {
            const mainHeader = document.querySelector('#focusHeader');
            if (mainHeader) {
                mainHeader?.focus();
            }
        });
    }
    /**
     *
     * @param selector ID preference selector exemple: this.applyFocusQuerySelector('myselectorid', 300)
     * not necessary # .
     * @param time
     */
    applyFocusQuerySelector(selector, time) {
        setTimeout(() => {
            const nextTag = document.querySelector(`#${selector}`);
            nextTag?.focus();
        }, time);
    }
}
FocusService.ɵfac = function FocusService_Factory(t) { return new (t || FocusService)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_router__WEBPACK_IMPORTED_MODULE_0__.Router)); };
FocusService.ɵprov = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ token: FocusService, factory: FocusService.ɵfac, providedIn: 'root' });


/***/ })

}])
//# sourceMappingURL=2618.js.map