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

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

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "CreateEventEventNameStepPageModule": () => (/* binding */ CreateEventEventNameStepPageModule)
/* 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 _create_event_event_name_step_page__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./create-event-event-name-step.page */ 37482);
/* harmony import */ var src_app_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/shared-module/shared-module.module */ 69270);
/* 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_name_step_page__WEBPACK_IMPORTED_MODULE_1__.CreateEventEventNameStepPage
    }
];
class CreateEventEventNameStepPageModule {
}
CreateEventEventNameStepPageModule.ɵfac = function CreateEventEventNameStepPageModule_Factory(t) { return new (t || CreateEventEventNameStepPageModule)(); };
CreateEventEventNameStepPageModule.ɵmod = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdefineNgModule"]({ type: CreateEventEventNameStepPageModule });
CreateEventEventNameStepPageModule.ɵinj = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdefineInjector"]({ imports: [src_app_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_2__.SharedModuleModule,
        _angular_router__WEBPACK_IMPORTED_MODULE_0__.RouterModule.forChild(routes)] });
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵsetNgModuleScope"](CreateEventEventNameStepPageModule, { declarations: [_create_event_event_name_step_page__WEBPACK_IMPORTED_MODULE_1__.CreateEventEventNameStepPage], imports: [src_app_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_2__.SharedModuleModule, _angular_router__WEBPACK_IMPORTED_MODULE_0__.RouterModule] }); })();


/***/ }),

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

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "CreateEventEventNameStepPage": () => (/* binding */ CreateEventEventNameStepPage)
/* harmony export */ });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 45449);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/forms */ 2508);
/* harmony import */ var _shared_services__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @shared/services */ 17253);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ 61380);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_angular_router__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _shared_services_state_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @shared/services/state.service */ 21284);
/* harmony import */ var _shared_services_focus_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @shared/services/focus.service */ 37763);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common */ 90944);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_angular_common__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ionic/angular */ 93819);
/* harmony import */ var _shared_components_header_header_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../shared/components/header/header.component */ 36290);
/* harmony import */ var _ngx_translate_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @ngx-translate/core */ 38699);










function CreateEventEventNameStepPage_div_14_div_1_Template(rf, ctx) { if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 14);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
} if (rf & 2) {
    const error_r2 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate"](error_r2.message);
} }
function CreateEventEventNameStepPage_div_14_Template(rf, ctx) { if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 12);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](1, CreateEventEventNameStepPage_div_14_div_1_Template, 2, 1, "div", 13);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
} if (rf & 2) {
    const ctx_r0 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngForOf", ctx_r0.eventTitleFormErrors);
} }
class CreateEventEventNameStepPage {
    constructor(formBuilder, notificatorService, navigationService, createEventService, loadingService, commonService, activatedRoute, router, pendingRelease, apiService, resumeCreateEventInterruptedService, profileManagerService, translateConfigService, stateService, focusService) {
        this.formBuilder = formBuilder;
        this.notificatorService = notificatorService;
        this.navigationService = navigationService;
        this.createEventService = createEventService;
        this.loadingService = loadingService;
        this.commonService = commonService;
        this.activatedRoute = activatedRoute;
        this.router = router;
        this.pendingRelease = pendingRelease;
        this.apiService = apiService;
        this.resumeCreateEventInterruptedService = resumeCreateEventInterruptedService;
        this.profileManagerService = profileManagerService;
        this.translateConfigService = translateConfigService;
        this.stateService = stateService;
        this.focusService = focusService;
        this.isLimitedProfile = false;
        this.action = null;
        this.approveEventReview = '';
        this.navigateToQRCode = () => {
            this.navigationService.forward(['/home']);
        };
        this.navigateToPendingLiberations = () => {
            this.navigationService.forward(['/push-notifications']);
        };
        this.getCompanyGroups = () => {
            this.createEventService
                .getCompanyGroups()
                .then(this.handleGetCompanyGroupsSuccessResponse)
                .catch(this.handleGetCompanyGroupsErrorResponse)
                .finally(() => {
                this.loadingService.hide(null, 'loading-company-data');
                this.focusService.applyFocusQuerySelector('create_name_step', 1000);
            });
        };
        this.handleGetCompanyGroupsSuccessResponse = response => {
            this.createEventService.setGroups(response);
            const groups = this.createEventService.getGroups();
            if (groups.length === 1) {
                this.createEventService.setSelectedGroup(groups[0]);
            }
            this.getCompanyFloors();
        };
        this.handleGetCompanyGroupsErrorResponse = response => {
            this.loadingService.hide(null, 'loading-company-data');
            // console.log('handleGetCompanyGroupsErrorResponse:', response);
        };
        this.getCompanyFloors = () => {
            this.createEventService
                .getCompanyFloors()
                .then(this.handleGetCompanyFloorsSuccessResponse)
                .catch(this.handleGetCompanyFloorsErrorResponse);
        };
        this.handleGetCompanyFloorsSuccessResponse = response => {
            if (!response.length) {
                const title = this.translateConfigService.translate('PG_CREATE_NAME_STEP_TOAST_COMPANY_HAS_NO_FLOORS_TITLE');
                const message = this.translateConfigService.translate('PG_CREATE_NAME_STEP_TOAST_COMPANY_HAS_NO_FLOORS_MESSAGE');
                const notification = {
                    title,
                    message,
                    type: 'error'
                };
                this.notificatorService.notify(notification);
                this.navigationService.back(['/home']);
            }
            else {
                this.createEventService.setFloors(response);
                const floors = this.createEventService.getFloors();
                if (floors.length === 1) {
                    this.createEventService.setSelectedFloor(floors[0]);
                }
                if (this.createEventService.getIsNew()) {
                    this.createEventService
                        .getAccount()
                        .then(this.handleGetUserAccountSuccessResponse)
                        .catch(this.handleGetUserAccountErrorResponse);
                }
                else if (this.approveEventReview || (this.action === 'edit' && this.canBeEdited())) {
                    if (this.isLimitedProfile) {
                        this.goToLimitedFirstPage();
                    }
                    else {
                        this.createEventService
                            .getAccount()
                            .then(responseAccount => {
                            this.handleGetUserAccountSuccessResponse(responseAccount);
                        })
                            .catch(this.handleGetUserAccountErrorResponse);
                    }
                }
                else {
                    this.loadingService.hide(null, 'loading-company-data');
                    this.navigationService.forward(['/create-event-event-hosts']);
                }
            }
        };
        this.goToLimitedFirstPage = () => {
            const navigationExtras = {
                state: {
                    isLimitedProfile: true,
                    event: this.event
                }
            };
            this.loadingService.hide(null, 'loading-company-data').then(() => {
                this.navigationService.forward(['/create-event-event-guests'], navigationExtras);
            });
        };
        this.canBeEdited = () => !this.event?.guests.find(g => g.status !== 'WAITING_FOR_CHECKIN' && g.status !== 'WAITING_FOR_EVENT_APPROVE');
        this.handleGetCompanyFloorsErrorResponse = error => {
            console.log('handleGetCompanyFloorsErrorResponse');
            console.log(error);
            this.navigationService.back(['/home']);
            this.loadingService.hide(null, 'loading-company-data');
            const title = this.translateConfigService.translate('PG_CREATE_NAME_STEP_TOAST_FLOORS_TITLE');
            const message = this.translateConfigService.translate('PG_CREATE_NAME_STEP_TOAST_FLOORS_MESSAGE');
            const notification = {
                title,
                message,
                type: 'error'
            };
            this.notificatorService.notify(notification);
        };
        this.handleGetUserAccountSuccessResponse = response => {
            this.loadingService.hide(null, 'loading-company-data');
            const isNew = this.createEventService.getIsNew();
            const action = this.createEventService.getAction();
            const hosts = this.createEventService.getHosts();
            if (isNew || action === 'approve-event-review') {
                if (hosts.length < 2) {
                    this.createEventService
                        .getCompanyHost(response.refId)
                        .then((res) => {
                        this.createEventService.setHosts(res);
                    })
                        .catch((error) => { });
                }
            }
            if (!isNew && (this.action === 'edit' || this.canBeEdited())) {
                if (hosts.length < 2) {
                    this.createEventService
                        .getCompanyHost(response.refId)
                        .then((res) => {
                        this.createEventService.setHosts(res);
                    })
                        .catch((error) => { });
                }
            }
            if (action === 'approve-event-review' && !this.approveEventReview) {
                const navigationExtras = {
                    state: {
                        isLimitedProfile: this.isLimitedProfile
                    }
                };
                const floor = this.createEventService.getSelectedFloor();
                const group = this.createEventService.getSelectedGroup();
                if (floor && group && !this.approveEventReview) {
                    this.navigationService.forward(['/create-event-event-hosts']);
                }
                else {
                    this.navigationService.forward(['/create-event-event-start-date-time'], navigationExtras);
                }
            }
        };
        this.handleGetUserAccountErrorResponse = error => {
            console.log('handleGetUserAccountErrorResponse');
            console.log('error:', error);
            this.loadingService.hide(null, 'loading-company-data');
            const title = this.translateConfigService.translate('PG_CREATE_NAME_STEP_TOAST_GETUSER_TITLE');
            const message = this.translateConfigService.translate('PG_CREATE_NAME_STEP_TOAST_GETUSER_MESSAGE');
            const notification = {
                title,
                message,
                type: 'error'
            };
            this.notificatorService.notify(notification);
            this.navigationService.back(['/home']);
        };
        this.onSubmit = () => {
            this.cleanValidationErrors();
            const title = this.commonService.clearString(this.eventTitleForm.controls.title.value);
            const data = {
                title
            };
            const validationResult = this.validateInput(data);
            if (!!validationResult.length) {
                this.setValidationErrors(validationResult);
                const titleToast = this.translateConfigService.translate('PG_CREATE_NAME_STEP_TOAST_INVALID_DATA_TITLE');
                const message = this.translateConfigService.translate('PG_CREATE_NAME_STEP_TOAST_INVALID_DATA_NESSAGE');
                const notification = {
                    title,
                    message,
                    type: 'error'
                };
                this.notificatorService.notify(notification);
            }
            else {
                this.createEventService.setTitle(title);
                this.navigationService.forward(['/create-event-event-start-date-time']);
                this.setResumeCreationInterrupte();
            }
        };
        this.validateInput = data => {
            const errors = [];
            const titleInputValidationErrors = this.validateTitleInput(data);
            if (titleInputValidationErrors) {
                errors.push(titleInputValidationErrors);
            }
            return errors;
        };
        this.validateTitleInput = data => {
            if (!data.title || data.title.length < 1) {
                return {
                    message: this.translateConfigService.translate('PG_CREATE_NAME_STEP_TEXT_ERROR_INPUT_TITLE'),
                    field: 'title'
                };
            }
            return null;
        };
        this.goOneStepBack = () => {
            this.cleanValidationErrors();
            this.createEventService.clearCreateEventData();
            if (this.createEventService.getIsNew()) {
                this.navigationService.forward(['/home']);
            }
            else {
                this.navigationService.forward(['/events']);
            }
        };
        this.setValidationErrors = errors => {
            console.log('setValidationErrors:', errors);
            this.eventTitleFormErrors = errors;
        };
        this.cleanValidationErrors = () => {
            this.eventTitleFormErrors = [];
        };
        this.eventTitleForm = this.formBuilder.group({
            title: ['']
        });
        this.getParansNavigation();
    }
    ionViewDidEnter() {
        this.loadData();
        // this.verifyNotifications;
    }
    ionViewDidLeave() { }
    loadData() {
        this.loadingService.show(this.translateConfigService.translate('PG_CREATE_NAME_STEP_LOADING'), 'loading-company-data');
        let eventTitle = null;
        if (this.action === 'create' && !this.resumeEventInterrupted && !this.onBack && !this.event) {
            this.createEventService.clearCreateEventData();
        }
        if (this.action === 'edit' || this.resumeEventInterrupted || this.onBack || this.event?.title) {
            eventTitle = this.event?.title || this.createEventService.getTitle();
        }
        this.createEventService.setAction(this.action);
        this.createEventService.setApproveEventReview(this.approveEventReview);
        this.createEventService.setEventToEdit(this.event);
        // KA_APP-704
        if (this.event?.id && this.createEventService.disableFields()) {
            this.eventTitleForm.controls['title']?.disable();
        }
        else {
            this.eventTitleForm.controls['title']?.enable();
        }
        // if (event) {
        //   this.createEventService.setEventToEdit(event);
        // }
        this.eventTitleForm.patchValue({
            title: eventTitle
        });
        this.eventTitleFormErrors = [];
        this.getCompanyGroups();
    }
    getParansNavigation() {
        this.activatedRoute.queryParams.subscribe(params => {
            if (this.router.getCurrentNavigation().extras.state) {
                this.event = this.router.getCurrentNavigation().extras.state.event;
                this.isLimitedProfile = this.router.getCurrentNavigation().extras.state.isLimitedProfile
                    ? this.router.getCurrentNavigation().extras.state.isLimitedProfile
                    : false;
                this.action = this.router.getCurrentNavigation().extras.state.action
                    ? this.router.getCurrentNavigation().extras.state.action
                    : null;
                this.approveEventReview = this.router.getCurrentNavigation().extras.state.approveEventReview
                    ? this.router.getCurrentNavigation().extras.state.approveEventReview
                    : '';
                this.resumeEventInterrupted = this.router.getCurrentNavigation().extras.state
                    .resumeEventInterrupted
                    ? this.router.getCurrentNavigation().extras.state.resumeEventInterrupted
                    : false;
                this.onBack = this.router.getCurrentNavigation().extras.state.onBack
                    ? this.router.getCurrentNavigation().extras.state.onBack
                    : false;
            }
        });
    }
    setResumeCreationInterrupte() {
        const resume = {
            logistic: {
                eventType: ''
            },
            vo: true,
            action: this.action,
            event: this.event?.id
                ? {
                    id: this.event.id,
                    instanceName: this.event?.company?.instanceName ? this.event.company.instanceName : ''
                }
                : { id: '', instanceName: '' }
        };
        this.resumeCreateEventInterruptedService.setResumeCreationInterrupte(resume);
    }
}
CreateEventEventNameStepPage.ɵfac = function CreateEventEventNameStepPage_Factory(t) { return new (t || CreateEventEventNameStepPage)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_7__.UntypedFormBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_1__.NotificatorService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_1__.NavigationService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_1__.CreateEventService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_1__.LoadingService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_1__.CommonService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_router__WEBPACK_IMPORTED_MODULE_2__.ActivatedRoute), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_router__WEBPACK_IMPORTED_MODULE_2__.Router), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_1__.PendingReleaseService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_1__.ApiService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_1__.ResumeCreateEventInterruptedService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_1__.ProfileManagerService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_1__.TranslateConfigService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_shared_services_state_service__WEBPACK_IMPORTED_MODULE_3__.StateService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_shared_services_focus_service__WEBPACK_IMPORTED_MODULE_4__.FocusService)); };
CreateEventEventNameStepPage.ɵcmp = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({ type: CreateEventEventNameStepPage, selectors: [["app-create-event-event-name-step"]], decls: 22, vars: 20, consts: [["defaultHref", "events", 3, "title", "showBadge", "refresh", "menuToggle"], [1, "centralized-content"], [1, "page-title"], ["id", "create_name_step", "tabindex", "1", 1, "sub-title"], [1, "ion-margin-vertical"], [3, "formGroup", "ngSubmit"], [1, "input-holder"], ["type", "text", "formControlName", "title", 3, "placeholder"], ["class", "errors", 4, "ngIf"], [1, "button-holder"], ["type", "button", 1, "back", 3, "click"], ["type", "submit", 3, "click"], [1, "errors"], ["class", "error", 4, "ngFor", "ngForOf"], [1, "error"]], template: function CreateEventEventNameStepPage_Template(rf, ctx) { if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](0, "app-header", 0);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipe"](1, "translate");
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](2, "ion-content")(3, "div", 1)(4, "div", 2)(5, "div", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](6);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipe"](7, "translate");
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](8, "ion-row")(9, "ion-col", 4)(10, "form", 5);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("ngSubmit", function CreateEventEventNameStepPage_Template_form_ngSubmit_10_listener() { return ctx.onSubmit(); });
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](11, "div", 6);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](12, "input", 7);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipe"](13, "translate");
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](14, CreateEventEventNameStepPage_div_14_Template, 2, 1, "div", 8);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](15, "div", 9)(16, "button", 10);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function CreateEventEventNameStepPage_Template_button_click_16_listener() { return ctx.goOneStepBack(); });
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](17);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipe"](18, "translate");
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](19, "button", 11);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function CreateEventEventNameStepPage_Template_button_click_19_listener() { return ctx.onSubmit(); });
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](20);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipe"](21, "translate");
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]()()()()()()();
    } if (rf & 2) {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("title", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipeBind1"](1, 10, "PG_CREATE_NAME_STEP_HEADER_TITLE"))("showBadge", true)("refresh", false)("menuToggle", false);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](6);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipeBind1"](7, 12, "PG_CREATE_NAME_STEP_TEXT_SUBTITLE"), " ");
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("formGroup", ctx.eventTitleForm);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("placeholder", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipeBind1"](13, 14, "PG_CREATE_NAME_STEP_TEXT_INPUT"));
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx.eventTitleFormErrors);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](3);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipeBind1"](18, 16, "BTN_BACK"), " ");
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](3);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipeBind1"](21, 18, "BTN_NEXT"));
    } }, dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_5__.NgForOf, _angular_common__WEBPACK_IMPORTED_MODULE_5__.NgIf, _ionic_angular__WEBPACK_IMPORTED_MODULE_8__.IonCol, _ionic_angular__WEBPACK_IMPORTED_MODULE_8__.IonContent, _ionic_angular__WEBPACK_IMPORTED_MODULE_8__.IonRow, _angular_forms__WEBPACK_IMPORTED_MODULE_7__["ɵNgNoValidate"], _angular_forms__WEBPACK_IMPORTED_MODULE_7__.DefaultValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.NgControlStatusGroup, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.FormGroupDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.FormControlName, _shared_components_header_header_component__WEBPACK_IMPORTED_MODULE_6__.HeaderComponent, _ngx_translate_core__WEBPACK_IMPORTED_MODULE_9__.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%]   .errors[_ngcontent-%COMP%] {\n  width: 80%;\n  margin: 12px 10% 0;\n  color: #f0181b;\n  text-align: center;\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.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  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xlIHtcbiAgICAgIGZvbnQtc2l6ZTogaW5pdGlhbCAhaW1wb3J0YW50O1xuICAgICAgZm9udC13ZWlnaHQ6IGJvbGQ7XG4gICAgICB0ZXh0LWFsaWduOiBjZW50ZXI7XG4gICAgfVxuXG4gICAgLnN1Yi10aXRsZSB7XG4gICAgICB0ZXh0LWFsaWduOiBjZW50ZXI7XG4gICAgICBjb2xvcjogIzY1Njc2ODtcbiAgICAgIGZvbnQtc2l6ZTogMC45ZW07XG4gICAgICBtYXJnaW4tdG9wOiA0cHg7XG4gICAgfVxuICB9XG59XG4ucHVsc2F0ZS1md2Qge1xuICBhbmltYXRpb246IHB1bHNhdGUtZndkIDAuNXMgZWFzZS1pbi1vdXQgaW5maW5pdGUgYm90aDtcbiAgb3V0bGluZTogbm9uZTtcbn1cblxuQGtleWZyYW1lcyBwdWxzYXRlLWZ3ZCB7XG4gIDAlIHtcbiAgICB0cmFuc2Zvcm06IHNjYWxlKDEpO1xuICB9XG4gIDUwJSB7XG4gICAgdHJhbnNmb3JtOiBzY2FsZSgxLjUpO1xuICB9XG4gIDEwMCUge1xuICAgIHRyYW5zZm9ybTogc2NhbGUoMSk7XG4gIH1cbn1cbiJdfQ== */"] });


/***/ }),

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