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

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

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "EventNamePageModule": () => (/* binding */ EventNamePageModule)
/* 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 _event_name_page__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./event-name.page */ 18296);
/* 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: _event_name_page__WEBPACK_IMPORTED_MODULE_1__.EventNamePage
    }
];
class EventNamePageModule {
}
EventNamePageModule.ɵfac = function EventNamePageModule_Factory(t) { return new (t || EventNamePageModule)(); };
EventNamePageModule.ɵmod = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdefineNgModule"]({ type: EventNamePageModule });
EventNamePageModule.ɵ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"](EventNamePageModule, { declarations: [_event_name_page__WEBPACK_IMPORTED_MODULE_1__.EventNamePage], imports: [src_app_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_2__.SharedModuleModule, _angular_router__WEBPACK_IMPORTED_MODULE_0__.RouterModule] }); })();


/***/ }),

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

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "EventNamePage": () => (/* binding */ EventNamePage)
/* 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_6__ = __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_focus_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @shared/services/focus.service */ 37763);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/common */ 90944);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_angular_common__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @ionic/angular */ 93819);
/* harmony import */ var _shared_components_header_header_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../shared/components/header/header.component */ 36290);
/* harmony import */ var _ngx_translate_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ngx-translate/core */ 38699);









function EventNamePage_div_4_Template(rf, ctx) { if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 13);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipe"](2, "translate");
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
} if (rf & 2) {
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipeBind1"](2, 1, "PG_CREATE_LG_NAME_STEP_TEXT_ENTRY"), " ");
} }
function EventNamePage_div_5_Template(rf, ctx) { if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 13);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipe"](2, "translate");
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
} if (rf & 2) {
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipeBind1"](2, 1, "PG_CREATE_LG_NAME_STEP_TEXT_EXIT"), " ");
} }
function EventNamePage_div_12_div_1_Template(rf, ctx) { if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 16);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
} if (rf & 2) {
    const error_r6 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate"](error_r6.message);
} }
function EventNamePage_div_12_Template(rf, ctx) { if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 14);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](1, EventNamePage_div_12_div_1_Template, 2, 1, "div", 15);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
} if (rf & 2) {
    const ctx_r2 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngForOf", ctx_r2.eventTitleFormErrors);
} }
function EventNamePage_ion_row_20_Template(rf, ctx) { if (rf & 1) {
    const _r8 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "ion-row")(1, "ion-col", 4)(2, "div", 9)(3, "button", 17);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function EventNamePage_ion_row_20_Template_button_click_3_listener() { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](_r8); const ctx_r7 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); return _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵresetView"](ctx_r7.goToCreateEventFromExit()); });
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipe"](5, "translate");
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]()()()();
} if (rf & 2) {
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipeBind1"](5, 1, "PG_CREATE_LG_NAME_STEP_BTN_CREATE_FROM_EXIT"), " ");
} }
function EventNamePage_ion_row_21_Template(rf, ctx) { if (rf & 1) {
    const _r10 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "ion-row")(1, "ion-col", 4)(2, "div", 9)(3, "button", 17);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function EventNamePage_ion_row_21_Template_button_click_3_listener() { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](_r10); const ctx_r9 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); return _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵresetView"](ctx_r9.goToCreateEventFromEntry()); });
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipe"](5, "translate");
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]()()()();
} if (rf & 2) {
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipeBind1"](5, 1, "PG_CREATE_LG_NAME_STEP_BTN_CREATE_FROM_ENTRY"), " ");
} }
class EventNamePage {
    constructor(formBuilder, notificatorService, navigationService, createLogisticEventService, commonService, activatedRoute, router, resumeCreateEventInterruptedService, translateConfigService, focusService) {
        this.formBuilder = formBuilder;
        this.notificatorService = notificatorService;
        this.navigationService = navigationService;
        this.createLogisticEventService = createLogisticEventService;
        this.commonService = commonService;
        this.activatedRoute = activatedRoute;
        this.router = router;
        this.resumeCreateEventInterruptedService = resumeCreateEventInterruptedService;
        this.translateConfigService = translateConfigService;
        this.focusService = focusService;
        this.approveEventReview = '';
        this.action = null;
        this.navigateToPendingLiberations = () => {
            this.navigationService.forward(['/push-notifications']);
        };
        this.navigateToQRCode = () => {
            this.navigationService.forward(['/home']);
        };
        this.goToLogisticEventResume = () => {
            const event = {
                id: this.createLogisticEventService.getId(),
                title: this.createLogisticEventService.getTitle(),
                startAt: this.createLogisticEventService.getStartDate(),
                endAt: this.createLogisticEventService.getEndDate(),
                driver: this.createLogisticEventService.getDriver(),
                assistants: this.createLogisticEventService.getAssistants(),
                licensePlateOne: this.createLogisticEventService.getLicensePlateOne(),
                licensePlateTwo: this.createLogisticEventService.getLicensePlateTwo(),
                hasCart: this.createLogisticEventService.getHasCart(),
                onFoot: this.createLogisticEventService.getOnFoot(),
                needAuthorization: this.createLogisticEventService.getNeedAuthorization(),
                notes: this.createLogisticEventService.getNotes(),
                locator: this.createLogisticEventService.getLocator(),
                useOwnLocator: this.createLogisticEventService.getUseOwnLocator(),
                useLocatorPreAuthorized: this.createLogisticEventService.getUseLocatorPreAuthorized(),
                locatorPreAuthorized: this.createLogisticEventService.getLocatorPreAuthorized()
            };
            const navigationExtras = {
                state: {
                    event
                }
            };
            this.navigationService.forward(['/logistic-events/create/event-resume'], navigationExtras);
        };
        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 notification = {
                    title: this.translateConfigService.translate('TOAST_INVALID_DATA_TITLE'),
                    message: this.translateConfigService.translate('TOAST_INVALID_DATA_NESSAGE'),
                    type: 'error'
                };
                this.notificatorService.notify(notification);
            }
            else {
                this.createLogisticEventService.setTitle(title);
                this.navigationService.forward(['/logistic-events/create/event-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_LG_NAME_STEP_ERROR_INPUT_TITLE'),
                    field: 'title'
                };
            }
            return null;
        };
        this.goToCreateEventFromEntry = () => {
            const navigationExtras = {
                state: {
                    context: 'VIEWING_TO_CREATE_FROM'
                }
            };
            this.navigationService.forward(['/logistic-events/entrance'], navigationExtras);
        };
        this.goToCreateEventFromExit = () => {
            const navigationExtras = {
                state: {
                    context: 'VIEWING_TO_CREATE_FROM'
                }
            };
            this.navigationService.forward(['/logistic-events/exit'], navigationExtras);
        };
        this.goOneStepBack = () => {
            this.cleanValidationErrors();
            this.createLogisticEventService.clearCreateEventData();
            if (this.createLogisticEventService.getIsNew()) {
                this.navigationService.forward(['/home']);
            }
            else {
                this.navigationService.forward(['/logistic-events']);
            }
        };
        this.setValidationErrors = errors => {
            console.log('setValidationErrors:', errors);
            this.eventTitleFormErrors = errors;
        };
        this.cleanValidationErrors = () => {
            this.eventTitleFormErrors = [];
        };
        this.showCloneEventFromEntryMessage = () => this.eventType === 'EXIT' && (this.action === 'create' || this.action === 'edit');
        this.showCloneEventFromExitMessage = () => this.eventType === 'ENTRY' && (this.action === 'create' || this.action === 'edit');
        this.eventTitleForm = this.formBuilder.group({
            title: ['']
        });
        this.getParansNavigation();
    }
    ionViewDidEnter() {
        this.loadData(this.event);
    }
    ionViewWillEnter() {
        this.focusService.applyFocusQuerySelector('create_event_name', 3500);
    }
    ionViewDidLeave() { }
    loadData(event) {
        console.log(event);
        if (event) {
            this.createLogisticEventService.setEventToEdit(event);
        }
        let eventTitle = null;
        if (this.action === 'create' && !this.resumeEventInterrupted && !this.onBack && !event) {
            this.createLogisticEventService.clearCreateEventData();
        }
        if (this.action === 'edit' || this.resumeEventInterrupted || this.onBack || this.event?.title) {
            eventTitle = this.event?.title || this.createLogisticEventService.getTitle();
        }
        this.createLogisticEventService.setAction(this.action);
        this.createLogisticEventService.setType(this.eventType);
        this.createLogisticEventService.setApproveEventReview(this.approveEventReview);
        this.eventTitleForm.patchValue({
            title: eventTitle
        });
        this.eventTitleFormErrors = [];
        if (this.createLogisticEventService.getAction() === 'approve-event-review') {
            this.goToLogisticEventResume();
        }
    }
    getParansNavigation() {
        this.activatedRoute.queryParams.subscribe(() => {
            if (this.router.getCurrentNavigation()?.extras?.state) {
                this.event = this.router.getCurrentNavigation()?.extras?.state?.event;
                this.eventType = this.router.getCurrentNavigation()?.extras?.state?.eventType
                    ? this.router.getCurrentNavigation()?.extras?.state?.eventType
                    : this.createLogisticEventService.getType();
                this.tittleHeader =
                    this.eventType === 'ENTRY' || this.eventType === 'CLONE_EXIT'
                        ? this.translateConfigService.translate('PG_CREATE_LG_NAME_STEP_HEADER_TITLE_ENTRY')
                        : this.translateConfigService.translate('PG_CREATE_LG_NAME_STEP_HEADER_TITLE_EXIT');
                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 { action, event } = this.resumeCreateEventInterruptedService.getResumeCreationInterrupted();
        const resume = {
            logistic: {
                eventType: this.eventType
            },
            vo: false,
            action: action ? action : this.action,
            event: {
                id: event?.id ? event.id : this.event?.id ? this.event?.id : '',
                instanceName: event?.instanceName
                    ? event?.instanceName
                    : this.event?.company?.instanceName
                        ? this.event?.company?.instanceName
                        : ''
            }
        };
        this.resumeCreateEventInterruptedService.setResumeCreationInterrupte(resume);
    }
}
EventNamePage.ɵfac = function EventNamePage_Factory(t) { return new (t || EventNamePage)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_6__.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__.CreateLogisticEventService), _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__.ResumeCreateEventInterruptedService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_1__.TranslateConfigService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_shared_services_focus_service__WEBPACK_IMPORTED_MODULE_3__.FocusService)); };
EventNamePage.ɵcmp = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({ type: EventNamePage, selectors: [["app-event-name"]], decls: 22, vars: 20, consts: [[3, "defaultHref", "title", "showBadge", "refresh", "menuToggle"], [1, "centralized-content"], ["id", "create_event_name", 1, "page-title"], ["class", "sub-title", 4, "ngIf"], [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"], [4, "ngIf"], [1, "sub-title"], [1, "errors"], ["class", "error", 4, "ngFor", "ngForOf"], [1, "error"], ["type", "button", 3, "click"]], template: function EventNamePage_Template(rf, ctx) { if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](0, "app-header", 0);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](1, "ion-content")(2, "div", 1)(3, "div", 2);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](4, EventNamePage_div_4_Template, 3, 3, "div", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](5, EventNamePage_div_5_Template, 3, 3, "div", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](6, "ion-row")(7, "ion-col", 4)(8, "form", 5);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("ngSubmit", function EventNamePage_Template_form_ngSubmit_8_listener() { return ctx.onSubmit(); });
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](9, "div", 6);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](10, "input", 7);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipe"](11, "translate");
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](12, EventNamePage_div_12_Template, 2, 1, "div", 8);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](13, "div", 9)(14, "button", 10);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function EventNamePage_Template_button_click_14_listener() { return ctx.goOneStepBack(); });
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](15);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipe"](16, "translate");
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](17, "button", 11);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function EventNamePage_Template_button_click_17_listener() { return ctx.onSubmit(); });
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](18);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipe"](19, "translate");
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]()()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](20, EventNamePage_ion_row_20_Template, 6, 3, "ion-row", 12);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](21, EventNamePage_ion_row_21_Template, 6, 3, "ion-row", 12);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]()();
    } if (rf & 2) {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("defaultHref", ctx.eventType === "ENTRY" || ctx.eventType === "CLONE_EXIT" ? "/logistic-events/entrance" : "/logistic-events/exit")("title", ctx.tittleHeader)("showBadge", true)("refresh", false)("menuToggle", false);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx.eventType === "ENTRY" || ctx.eventType === "CLONE_EXIT");
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx.eventType === "EXIT" || ctx.eventType === "CLONE_ENTRY");
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](3);
        _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"](11, 14, "PG_CREATE_LG_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"](16, 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"](19, 18, "BTN_NEXT"));
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx.showCloneEventFromExitMessage());
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx.showCloneEventFromEntryMessage());
    } }, dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_4__.NgForOf, _angular_common__WEBPACK_IMPORTED_MODULE_4__.NgIf, _ionic_angular__WEBPACK_IMPORTED_MODULE_7__.IonCol, _ionic_angular__WEBPACK_IMPORTED_MODULE_7__.IonContent, _ionic_angular__WEBPACK_IMPORTED_MODULE_7__.IonRow, _angular_forms__WEBPACK_IMPORTED_MODULE_6__["ɵNgNoValidate"], _angular_forms__WEBPACK_IMPORTED_MODULE_6__.DefaultValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_6__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_6__.NgControlStatusGroup, _angular_forms__WEBPACK_IMPORTED_MODULE_6__.FormGroupDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_6__.FormControlName, _shared_components_header_header_component__WEBPACK_IMPORTED_MODULE_5__.HeaderComponent, _ngx_translate_core__WEBPACK_IMPORTED_MODULE_8__.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}\n\n.centralized-content[_ngcontent-%COMP%]   .page-title[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%] {\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  50% {\n    transform: scale(1.5);\n  }\n  100% {\n    transform: scale(1);\n  }\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImV2ZW50LW5hbWUucGFnZS5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UscUJBQUE7QUFDRjs7QUFDQTtFQUNFLGlDQUFBO0FBRUY7O0FBQUU7RUFDRSxZQUFBO0VBQ0EsV0FBQTtBQUVKOztBQUNFO0VBQ0UsbUJBQUE7QUFDSjs7QUFHSTtFQUNFLGFBQUE7RUFDQSx1QkFBQTtFQUNBLG1CQUFBO0VBQ0EsWUFBQTtFQUNBLFVBQUE7RUFDQSxXQUFBO0VBQ0EsU0FBQTtFQUNBLGVBQUE7RUFDQSxjQUFBO0FBRE47O0FB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SB7XG4gICAgdHJhbnNmb3JtOiBzY2FsZSgxKTtcbiAgfVxufVxuIl19 */"] });


/***/ }),

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