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

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

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "CreateEventEventBookeiPageModule": () => (/* binding */ CreateEventEventBookeiPageModule)
/* 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_bookei_page__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./create-event-event-bookei.page */ 41338);
/* 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_bookei_page__WEBPACK_IMPORTED_MODULE_2__.CreateEventEventBookeiPage
    }
];
class CreateEventEventBookeiPageModule {
}
CreateEventEventBookeiPageModule.ɵfac = function CreateEventEventBookeiPageModule_Factory(t) { return new (t || CreateEventEventBookeiPageModule)(); };
CreateEventEventBookeiPageModule.ɵmod = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdefineNgModule"]({ type: CreateEventEventBookeiPageModule });
CreateEventEventBookeiPageModule.ɵ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"](CreateEventEventBookeiPageModule, { declarations: [_create_event_event_bookei_page__WEBPACK_IMPORTED_MODULE_2__.CreateEventEventBookeiPage], imports: [src_app_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_1__.SharedModuleModule, _angular_router__WEBPACK_IMPORTED_MODULE_0__.RouterModule] }); })();


/***/ }),

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

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "CreateEventEventBookeiPage": () => (/* binding */ CreateEventEventBookeiPage)
/* 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_modais__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @shared/components/modais */ 90340);
/* 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_12__ = __webpack_require__(/*! @ionic/angular */ 93819);
/* harmony import */ var _shared_services_bookei_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @shared/services/bookei.service */ 55832);
/* harmony import */ var _shared_services_state_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @shared/services/state.service */ 21284);
/* harmony import */ var _shared_services_focus_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @shared/services/focus.service */ 37763);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/common */ 90944);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_angular_common__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var _shared_components_header_header_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../shared/components/header/header.component */ 36290);
/* harmony import */ var _shared_components_card_booking_card_booking_component__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../shared/components/card-booking/card-booking.component */ 64245);
/* harmony import */ var _shared_components_button_custom_button_custom_component__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../shared/components/button-custom/button-custom.component */ 37792);
/* harmony import */ var _ngx_translate_core__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @ngx-translate/core */ 38699);















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

    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](1, "div", 13);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](2, "translate");
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](3, "ion-fab-button", 14);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵlistener"]("click", function CreateEventEventBookeiPage_ng_container_9_Template_ion_fab_button_click_3_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵrestoreView"](_r6);
      const ctx_r5 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵresetView"](ctx_r5.openAddModal());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelement"](4, "ion-icon", 15);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementContainerEnd"]();
  }

  if (rf & 2) {
    const connectionsStatus_r4 = ctx.ngIf;
    const ctx_r0 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵattribute"]("aria-label", _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](2, 2, "ACCESSIBILITY.ARIA_LABELS.ADD"));
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("disabled", !ctx_r0.settings && !ctx_r0.requestFinish || connectionsStatus_r4.status === "Offline" || ctx_r0.disableBtn);
  }
}

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

    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](0, "app-card-booking-component", 17);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵlistener"]("onSelected", function CreateEventEventBookeiPage_ng_container_12_app_card_booking_component_1_Template_app_card_booking_component_onSelected_0_listener() {
      const restoredCtx = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵrestoreView"](_r10);
      const booking_r8 = restoredCtx.$implicit;
      const ctx_r9 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"](2);
      return _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵresetView"](ctx_r9.toggleActions(booking_r8));
    })("onDelete", function CreateEventEventBookeiPage_ng_container_12_app_card_booking_component_1_Template_app_card_booking_component_onDelete_0_listener($event) {
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵrestoreView"](_r10);
      const ctx_r11 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"](2);
      return _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵresetView"](ctx_r11.canDelete($event));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]();
  }

  if (rf & 2) {
    const booking_r8 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("booking", booking_r8);
  }
}

function CreateEventEventBookeiPage_ng_container_12_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](1, CreateEventEventBookeiPage_ng_container_12_app_card_booking_component_1_Template, 1, 1, "app-card-booking-component", 16);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementContainerEnd"]();
  }

  if (rf & 2) {
    const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("ngForOf", ctx_r1.selectedBooking);
  }
}

function CreateEventEventBookeiPage_ng_template_13_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](0, "div", 18)(1, "span", 19);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](3, "translate");
    _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]()();
  }

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

class CreateEventEventBookeiPage {
  constructor(createEventService, navigationService, modalController, actionSheetController, deviceInfoService, bookeiService, profileManagerService, authService, logService, translateConfigService, stateService, focusService) {
    var _this = this;

    this.createEventService = createEventService;
    this.navigationService = navigationService;
    this.modalController = modalController;
    this.actionSheetController = actionSheetController;
    this.deviceInfoService = deviceInfoService;
    this.bookeiService = bookeiService;
    this.profileManagerService = profileManagerService;
    this.authService = authService;
    this.logService = logService;
    this.translateConfigService = translateConfigService;
    this.stateService = stateService;
    this.focusService = focusService;
    this.selectedBooking = [];
    this.existPendings = false;

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

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

    this.addRoons = value => {
      const assetId = value.assetId || value.id;
      const name = value.name || value.assetName;
      const data = {
        assetId,
        name,
        ...value
      };

      if (!this.verifyForRepetition(data)) {
        this.selectedBooking.push(data);
      }
    };

    this.removeBookingFromSelectedReservations = value => {
      this.selectedBooking = this.selectedBooking.filter(selected => selected.assetId !== value.assetId);

      if (this.existIdEvent) {
        this.addBookingToCancel(value);
      }
    };

    this.verifyForRepetition = value => this.selectedBooking.find(selected => selected.assetId === value.assetId);

    this.addBookingToCancel = value => {
      const assetId = value.assetId || value.id;
      const name = value.name || value.assetName;
      const data = {
        assetId,
        name,
        ...value
      };

      if (!this.verifyForRepetition(data)) {
        this.selectedBookingsForCancel.push(data);
      }
    };

    this.openAddModal = /*#__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* () {
      if (!_this.settings && _this.requestFinish) {
        _this.loaderSettings();
      }

      const modal = yield _this.modalController.create({
        component: _this.isBookeiAvaliable ? _shared_components__WEBPACK_IMPORTED_MODULE_1__.SelectorForBookingsToAddToEventComponent : _shared_components_modais__WEBPACK_IMPORTED_MODULE_2__.ModalNoBookeiFeatureComponent,
        componentProps: {
          props: {
            isBookei: _this.isBookeiAvaliable,
            bookeis: _this.selectedBooking ? _this.selectedBooking : null,
            initialRequest: true
          }
        }
      });
      modal.onDidDismiss().then(_this.onModalDismissCallback);
      yield modal.present();
    });

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

    this.goOneStepBack = () => {
      this.createEventService.setBookings(this.selectedBooking);

      if (this.existIdEvent) {
        const bookingsToCancel = this.selectedBookingsForCancel;
        this.createEventService.setBookeisToCancel(bookingsToCancel);
      }

      if (this.canBeEdited() || this.onResumeEventInturred()) {
        this.navigationService.back(['/create-event-event-start-date-time']);
      } else {
        this.navigationService.forward(['/events']);
      }
    };

    this.goToNextStep = () => {
      const bookings = this.selectedBooking;

      if (this.existIdEvent) {
        const bookingsToCancel = this.selectedBookingsForCancel;
        this.createEventService.setBookeisToCancel(bookingsToCancel);
      }

      this.createEventService.setBookings(bookings);

      if (this.createEventService.getAction() === 'approve-event-review' && !this.approveEventReview) {
        this.goToEventResumeStep();
      } else {
        this.goToAddHosts();
      }
    };

    this.goToAddGuestsStep = () => {
      this.navigationService.forward(['/create-event-event-guests']);
    };

    this.goToAddHosts = () => {
      this.navigationService.forward(['/create-event-event-hosts']);
    };

    this.goToEventResumeStep = () => {
      const event = {
        id: this.createEventService.getId(),
        title: this.createEventService.getTitle(),
        startAt: this.createEventService.getStartDate(),
        endAt: this.createEventService.getEndDate(),
        floor: this.createEventService.getSelectedFloor(),
        group: this.createEventService.getSelectedGroup(),
        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() : []
      };
      const navigationExtras = {
        state: {
          event,
          isLimitedProfile: false
        }
      };
      this.navigationService.forward(['/create-event-event-resume'], navigationExtras);
    };

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

    this.canDelete = selectedBooking => {
      this.removeBookingFromSelectedReservations(selectedBooking);
    };

    this.toggleActions = /*#__PURE__*/function () {
      var _ref2 = (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* (selectedBooking) {
        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.removeBookingFromSelectedReservations(selectedBooking);
            }
          }, {
            text: _this.translateConfigService.translate('ACTION_SHEET_BTN_BACK'),
            icon: 'arrow-back',
            role: 'cancel',
            handler: () => {}
          }]
        });
        yield actionSheet.present();
      });

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

    this.handleErrorGetSettings = response => {};

    this.handeSuccessGetSettings = response => {
      this.settings = response[0];
      this.isBookeiAvaliable = !!response[0]?.bookeiInstance;
      this.createEventService.setMaxInvites(response[0].maxInvites ?? 0);
      this.requestFinish = true;
    };

    this.approveEventReview = this.isApproveEventReview();
    this.heightDeviceSize = deviceInfoService.getDeviceHeight();
    this.existIdEvent = !this.createEventService.getIsNew();
  }

  ngOnInit() {
    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* () {
      let selectedBooking = _this2.createEventService.getBookings();

      selectedBooking = selectedBooking ? selectedBooking : [];
      _this2.selectedBooking = selectedBooking;

      if (_this2.existIdEvent) {
        let selectedBookingsForCancel = _this2.createEventService.getBookeisToCancel();

        selectedBookingsForCancel = selectedBookingsForCancel ? selectedBookingsForCancel : [];
        _this2.selectedBookingsForCancel = selectedBookingsForCancel;
        _this2.disableBtn = _this2.createEventService.disableFields(); // KA_APP-704
      }
    })();
  }

  ionViewDidEnter() {
    this.loaderSettings();
  }

  isApproveEventReview() {
    return this.createEventService.getApproveEventReview() ? true : false;
  }

  loaderSettings() {
    var _this3 = 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 {
        accessToken,
        profile
      } = yield _this3.tokenProfile();

      if (accessToken && profile) {
        _this3.getSettings(profile.company.instanceName, accessToken).then(_this3.handeSuccessGetSettings).catch(_this3.handleErrorGetSettings).finally( /*#__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* () {
          _this3.focusService.applyFocusQuerySelector('create_bookei_step', 3000);
        }));
      } else {
        const error = {
          getTokenPortalProfile: !accessToken ? 'not found getTokenPortalProfile' : '',
          profile: !profile ? 'not found getProfilePortalProfile' : ''
        };

        _this3.handleErrorLoaderSettings(error);
      }
    })();
  }
  /**
   *
   * @param instanceName
   * @param accessToken portal
   * @returns
   */


  getSettings(instanceName, accessToken) {
    return new Promise((resolve, reject) => {
      this.bookeiService.getSettings(instanceName, accessToken).subscribe(resolve, reject);
    });
  }

  tokenProfile() {
    return new Promise((resolve, reject) => {
      const profile = this.getProfileCurrent;
      this.authService.getToken().then(token => {
        this.bookeiService.getTokenPortalProfile(profile, token).then(result => {
          resolve({
            accessToken: result && result.access_token ? result.access_token : null,
            profile: profile ? profile : null
          });
        }).catch(error => {
          this.logService.logError('bookei::tokenProfile::getTokenPortalProfile', '', error);
          reject(error);
        });
      }).catch(error => {
        this.logService.logError('bookei::tokenProfile::authService.getToken', '', error);
        reject(error);
      });
    });
  }

  get getProfileCurrent() {
    const profile = this.profileManagerService.getProfile();
    return profile;
  }

  handleErrorLoaderSettings(error) {
    this.logService.logError('method::loaderSettings', '', error);
  }

  onResumeEventInturred() {
    return !!this.createEventService.getTitle();
  }

}

CreateEventEventBookeiPage.ɵfac = function CreateEventEventBookeiPage_Factory(t) {
  return new (t || CreateEventEventBookeiPage)(_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_12__.ModalController), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_ionic_angular__WEBPACK_IMPORTED_MODULE_12__.ActionSheetController), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_4__.DeviceInfoService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services_bookei_service__WEBPACK_IMPORTED_MODULE_5__.BookeiService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_4__.ProfileManagerService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_4__.AuthService), _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__.TranslateConfigService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services_state_service__WEBPACK_IMPORTED_MODULE_6__.StateService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services_focus_service__WEBPACK_IMPORTED_MODULE_7__.FocusService));
};

CreateEventEventBookeiPage.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdefineComponent"]({
  type: CreateEventEventBookeiPage,
  selectors: [["app-create-event-event-bookei"]],
  decls: 20,
  vars: 20,
  consts: [["defaultHref", "create-event-event-name-step", 3, "title", "showBadge", "refresh", "menuToggle"], [3, "ionScroll"], [1, "centralized-content"], [1, "ion-no-padding", "top-row"], ["tabindex", "1", "id", "create_bookei_step", 1, "title", 3, "innerHTML"], [1, "ion-no-padding", "ion-justify-content-end"], [4, "ngIf"], [1, "card--"], [4, "ngIf", "ngIfElse"], ["notResult", ""], [1, "button-holder"], ["type", "button", 1, "back", 3, "name", "action"], ["type", "submit", 3, "name", "action"], [1, "fab"], ["size", "small", 3, "disabled", "click"], ["aria-hidden", "true", "name", "add"], [3, "booking", "onSelected", "onDelete", 4, "ngFor", "ngForOf"], [3, "booking", "onSelected", "onDelete"], [1, "not-result"], [1, "text"]],
  template: function CreateEventEventBookeiPage_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", 1);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵlistener"]("ionScroll", function CreateEventEventBookeiPage_Template_ion_content_ionScroll_2_listener() {
        return true;
      });
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](3, "div", 2)(4, "ion-row", 3)(5, "ion-col");
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelement"](6, "div", 4);
      _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-col", 5);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](9, CreateEventEventBookeiPage_ng_container_9_Template, 5, 4, "ng-container", 6);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](10, "async");
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]()();
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](11, "div", 7);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](12, CreateEventEventBookeiPage_ng_container_12_Template, 2, 1, "ng-container", 8);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](13, CreateEventEventBookeiPage_ng_template_13_Template, 4, 3, "ng-template", null, 9, _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplateRefExtractor"]);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]();
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](15, "div", 10)(16, "app-button-custom-component", 11);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵlistener"]("action", function CreateEventEventBookeiPage_Template_app_button_custom_component_action_16_listener() {
        return ctx.goOneStepBack();
      });
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](17, "translate");
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]();
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](18, "app-button-custom-component", 12);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵlistener"]("action", function CreateEventEventBookeiPage_Template_app_button_custom_component_action_18_listener() {
        return ctx.goToNextStep();
      });
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](19, "translate");
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]()()()();
    }

    if (rf & 2) {
      const _r2 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵreference"](14);

      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("title", _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](1, 10, "PG_CREATE_BOOKEI_STEP_HEADER_TITLE"))("showBadge", true)("refresh", false)("menuToggle", false);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](6);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("innerHTML", _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](7, 12, "PG_CREATE_BOOKEI_STEP_TEXT_SUBTITLE"), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵsanitizeHtml"]);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](3);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("ngIf", _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](10, 14, ctx.stateService.getState()));
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](3);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("ngIf", ctx.selectedBooking.length > 0)("ngIfElse", _r2);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](4);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("name", _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](17, 16, "BTN_BACK"));
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](2);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("name", _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](19, 18, "BTN_NEXT"));
    }
  },
  dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_8__.NgForOf, _angular_common__WEBPACK_IMPORTED_MODULE_8__.NgIf, _ionic_angular__WEBPACK_IMPORTED_MODULE_12__.IonCol, _ionic_angular__WEBPACK_IMPORTED_MODULE_12__.IonContent, _ionic_angular__WEBPACK_IMPORTED_MODULE_12__.IonFabButton, _ionic_angular__WEBPACK_IMPORTED_MODULE_12__.IonIcon, _ionic_angular__WEBPACK_IMPORTED_MODULE_12__.IonRow, _shared_components_header_header_component__WEBPACK_IMPORTED_MODULE_9__.HeaderComponent, _shared_components_card_booking_card_booking_component__WEBPACK_IMPORTED_MODULE_10__.CardBookingComponent, _shared_components_button_custom_button_custom_component__WEBPACK_IMPORTED_MODULE_11__.ButtonCustomComponent, _angular_common__WEBPACK_IMPORTED_MODULE_8__.AsyncPipe, _ngx_translate_core__WEBPACK_IMPORTED_MODULE_13__.TranslatePipe],
  styles: ["ion-content[_ngcontent-%COMP%] {\n  --background: var(--ion-color-background);\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  padding: 0 18px;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .top-row[_ngcontent-%COMP%] {\n  margin: 28px 0;\n  display: flex;\n  align-items: center;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .top-row[_ngcontent-%COMP%]   ion-col[_ngcontent-%COMP%] {\n  display: flex;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .top-row[_ngcontent-%COMP%]   ion-col[_ngcontent-%COMP%]   .fab[_ngcontent-%COMP%]   ion-fab-button[_ngcontent-%COMP%] {\n  --box-shadow: none !important;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .top-row[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%] {\n  font-size: 18px !important;\n  font-weight: bold;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .top-row[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]   .subtible[_ngcontent-%COMP%] {\n  font-weight: 100;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .input-holder[_ngcontent-%COMP%] {\n  margin-top: 8px;\n}\n\n.centralized-content[_ngcontent-%COMP%]   .button-holder[_ngcontent-%COMP%] {\n  width: 100%;\n}\n\n.not-result[_ngcontent-%COMP%] {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  height: 64px;\n  border-radius: 4px;\n  background: #fff;\n}\n\n.not-result[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%] {\n  font-weight: 500;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNyZWF0ZS1ldmVudC1ldmVudC1ib29rZWkucGFnZS5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UseUNBQUE7QUFDRjs7QUFnQ0E7RUFDRSwwQkFBQTtFQUNBLGFBQUE7RUFDQSwyQkFBQTtFQUNBLHNCQUFBO0VBQ0EsZUFBQTtBQTdCRjs7QUE4QkU7RUFDRSxjQUFBO0VBQ0EsYUFBQTtFQUNBLG1CQUFBO0FBNUJKOztBQTZCSTtFQUNFLGFBQUE7QUEzQk47O0FBNkJRO0VBQ0UsNkJBQUE7QUEzQlY7O0FBK0JJO0VBQ0UsMEJBQUE7RUFDQSxpQkFBQTtBQTdCTjs7QUE4Qk07RUFDRSxnQkFBQTtBQTVCUjs7QUFpQ0U7RUFDRSxlQUFBO0FBL0JKOztBQWlDRTtFQUNFLFdBQUE7QUEvQko7O0FBa0NBO0VBQ0UsYUFBQTtFQUNBLHVCQUFBO0VBQ0EsbUJBQUE7RUFDQSxZQUFBO0VBQ0Esa0JBQUE7RUFDQSxnQkFBQTtBQS9CRjs7QUFnQ0U7RUFDRSxnQkFBQTtBQTlCSiIsImZpbGUiOiJjcmVhdGUtZXZlbnQtZXZlbnQtYm9va2VpLnBhZ2Uuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbImlvbi1jb250ZW50IHtcbiAgLS1iYWNrZ3JvdW5kOiB2YXIoLS1pb24tY29sb3ItYmFja2dyb3VuZCk7XG59XG4vLyBpb24tdG9vbGJhciB7XG4vLyAgIGZvbnQtZmFtaWx5OiAnTnVuaXRvJywgc2Fucy1zZXJpZjtcblxuLy8gICBpb24taW1nIHtcbi8vICAgICBoZWlnaHQ6IDI1cHg7XG4vLyAgICAgd2lkdGg6IDI1cHg7XG4vLyAgIH1cblxuLy8gICBpb24tdGl0bGUge1xuLy8gICAgIGxldHRlci1zcGFjaW5nOiAxcHg7XG4vLyAgIH1cblxuLy8gICBpb24tYnV0dG9uIHtcbi8vICAgICBmYS1pY29uIHtcbi8vICAgICAgIGRpc3BsYXk6IGZsZXg7XG4vLyAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcbi8vICAgICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7XG4vLyAgICAgICBoZWlnaHQ6IDI0cHg7XG4vLyAgICAgICBwYWRkaW5nOiAwO1xuLy8gICAgICAgd2lkdGg6IDI0cHg7XG4vLyAgICAgICBtYXJnaW46IDA7XG4vLyAgICAgICBmb250LXNpemU6IDE5cHg7XG4vLyAgICAgICBjb2xvcjogIzY1Njc2ODtcbi8vICAgICB9XG5cbi8vICAgICAmLmhvdmVyIHtcbi8vICAgICAgIGJhY2tncm91bmQ6ICNmZmY7XG4vLyAgICAgfVxuLy8gICB9XG4vLyB9XG5cbi5jZW50cmFsaXplZC1jb250ZW50IHtcbiAgaGVpZ2h0OiBjYWxjKDEwMHZoIC0gNTZweCk7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIGp1c3RpZnktY29udGVudDogZmxleC1zdGFydDtcbiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcbiAgcGFkZGluZzogMCAxOHB4O1xuICAudG9wLXJvdyB7XG4gICAgbWFyZ2luOiAyOHB4IDA7XG4gICAgZGlzcGxheTogZmxleDtcbiAgICBhbGlnbi1pdGVtczogY2VudGVyO1xuICAgIGlvbi1jb2wge1xuICAgICAgZGlzcGxheTogZmxleDtcbiAgICAgIC5mYWIge1xuICAgICAgICBpb24tZmFiLWJ1dHRvbiB7XG4gICAgICAgICAgLS1ib3gtc2hhZG93OiBub25lICFpbXBvcnRhbnQ7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gICAgLnRpdGxlIHtcbiAgICAgIGZvbnQtc2l6ZTogMThweCAhaW1wb3J0YW50O1xuICAgICAgZm9udC13ZWlnaHQ6IGJvbGQ7XG4gICAgICAuc3VidGlibGUge1xuICAgICAgICBmb250LXdlaWdodDogMTAwO1xuICAgICAgfVxuICAgIH1cbiAgfVxuXG4gIC5pbnB1dC1ob2xkZXIge1xuICAgIG1hcmdpbi10b3A6IDhweDtcbiAgfVxuICAuYnV0dG9uLWhvbGRlciB7XG4gICAgd2lkdGg6IDEwMCU7XG4gIH1cbn1cbi5ub3QtcmVzdWx0IHtcbiAgZGlzcGxheTogZmxleDtcbiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG4gIGFsaWduLWl0ZW1zOiBjZW50ZXI7XG4gIGhlaWdodDogNjRweDtcbiAgYm9yZGVyLXJhZGl1czogNHB4O1xuICBiYWNrZ3JvdW5kOiAjZmZmO1xuICAudGV4dCB7XG4gICAgZm9udC13ZWlnaHQ6IDUwMDtcbiAgfVxufVxuIl19 */"]
});

/***/ }),

/***/ 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=9442.js.map