1import{b as ot,d as nt,k as it}from"./chunk-E2QXR3C4.js";import"./chunk-GTWSYLOW.js";import{b}from"./chunk-R4XOWUNU.js";import{a as v}from"./chunk-A7XNZPVQ.js";import{g as X,j as Y}from"./chunk-ECZGZNOC.js";import"./chunk-AKPWQO74.js";import"./chunk-6M7YTNZ3.js";import"./chunk-JAUFFMJB.js";import"./chunk-BEXGYEK6.js";import"./chunk-DW26KXPT.js";import"./chunk-6BJ4ARYE.js";import"./chunk-UCSPB2TI.js";import{a as x}from"./chunk-HDEOED3Y.js";import{a as C}from"./chunk-TGYCWN6X.js";import"./chunk-LUEPDDK3.js";import"./chunk-JYTHCYMB.js";import"./chunk-QD7LQMXQ.js";import"./chunk-TU4HS7DK.js";import{c as k,f as Z,o as tt,x as et}from"./chunk-JE6V5G7H.js";import"./chunk-SVGMRVKV.js";import"./chunk-RU6I4RW7.js";import"./chunk-WYYGTMZQ.js";import"./chunk-75FMBNAY.js";import"./chunk-RX2QZ7KY.js";import"./chunk-MNNBRWSC.js";import"./chunk-UCTXCWYE.js";import{d as W}from"./chunk-QE2RFR3A.js";import"./chunk-3ORZ5HPX.js";import{A as Q,d as M,g as $,h as q,j as U,l as f,q as z,t as J,z as K}from"./chunk-UECSTCKC.js";import"./chunk-HCUC3NOO.js";import"./chunk-XPHZSUHH.js";import"./chunk-BFMBCTON.js";import"./chunk-C3K4HGJA.js";import"./chunk-4GARSLLQ.js";import"./chunk-NCUSZAE2.js";import{a as u}from"./chunk-WO3JGGXH.js";import"./chunk-7ZH3MW5T.js";import{a as ct}from"./chunk-6XLZH56E.js";import"./chunk-UOH7FEVC.js";import"./chunk-KW6DEXY7.js";import"./chunk-Y6HI2S5T.js";import"./chunk-DDHCCZ7T.js";import"./chunk-POVH2XMP.js";import{m as R,p as A,w as L}from"./chunk-LTE72U6U.js";import{Ac as m,Bb as r,Bc as l,Cc as a,Dc as N,Ec as _,Gb as c,Gc as P,Ia as S,Ja as D,Lc as h,Mc as s,R as T,Sa as H,Sb as d,Tb as O,Yb as w,hd as V,pa as B,pc as i,qa as E,rd as j,sd as G,ua as g}from"./chunk-6P6DX2R6.js";import{f as st}from"./chunk-GAL4ENT6.js";var Ht=st(ct());function lt(e,p){if(e&1&&a(0,"ewp-error-text",7),e&2){let t=s();i("text",t.emailInput.errorMsg)}}function pt(e,p){if(e&1&&a(0,"ewp-error-text",7),e&2){let t=s();i("text",t.phoneNumberInput.errorMsg)}}function dt(e,p){if(e&1&&(N(0),a(1,"ewp-checkbox",8),_()),e&2){let t=s();r(),i("content",t.consentCheckbox)("tabIndex",t.tabIndex)}}function ht(e,p){if(e&1&&(N(0),a(1,"ewp-richtext",9),_()),e&2){let t=s();r(),i("content",t.legalText)("tabIndex",t.tabIndex)}}function ft(e,p){if(e&1){let t=P();m(0,"ewp-cta",10),h("ctaClicked",function(o){S(t);let F=s();return D(F.handleButtonClicked(o))}),l()}if(e&2){let t=s();i("content",t.nextButton)("tabIndex",t.tabIndex)}}var rt=(()=>{class e{constructor(t){this.gtmService=t,this.tabIndex=0,this.handleNextButton=new H,this.showEmailError=!1,this.showPhoneError=!1}handleButtonClicked(t){t.stopPropagation(),t.preventDefault(),this.form.valid||this.gtmService.trackFormFailure(this.form,this.tileName),this.form.valid?this.handleNextButton.emit({email:this.form.controls.email.value,phone:this.form.controls.phone.value,consent:this.form.controls.consent.value}):(this.form.controls.email.valid||(this.showEmailError=!0),this.form.controls.phone.valid||(this.showPhoneError=!0))}ngOnInit(){this.form=new U({email:new f(this.selectedMotoristContact?.email??"",{nonNullable:!0,validators:[M.required,...Y()]}),phone:new f(this.selectedMotoristContact?.phone??"",{nonNullable:!0,validators:[M.required,...X(this.locale)]}),consent:new f(this.selectedMotoristContact?.consent??null)}),this.form.controls.email.valueChanges.pipe(T()).subscribe(()=>{this.showEmailError=!this.form.controls.email.valid}),this.form.controls.phone.valueChanges.pipe(T()).subscribe(()=>{this.showPhoneError=!this.form.controls.phone.valid})}static{this.\u0275fac=function(n){return new(n||e)(c(W))}}static{this.\u0275cmp=d({type:e,selectors:[["ewp-motorist-contact"]],inputs:{textForm:"textForm",emailInput:"emailInput",phoneNumberInput:"phoneNumberInput",nextButton:"nextButton",locale:"locale",consentCheckbox:"consentCheckbox",legalText:"legalText",selectedMotoristContact:"selectedMotoristContact",tabIndex:"tabIndex",tileName:"tileName"},outputs:{handleNextButton:"handleNextButton"},standalone:!1,decls:9,vars:12,consts:[[1,"s:max-w-[400px]",3,"formGroup"],[1,"mb-2","block","font-ewp-primary","text-ewp-copy-m","font-ewp-fw-normal","leading-ewp-copy-m","text-ewp-ui-text-subline",3,"content","tabIndex"],["data-cs-mask","","formControlName","email",3,"content","tabIndex"],[3,"text",4,"ngIf"],["data-cs-mask","","formControlName","phone",1,"mt-2","block",3,"content","tabIndex"],[4,"ngIf"],["class","mt-6 block s:mt-12",3,"content","tabIndex","ctaClicked",4,"ngIf"],[3,"text"],["formControlName","consent",1,"mt-6","block",3,"content","tabIndex"],[1,"mt-6","block",3,"content","tabIndex"],[1,"mt-6","block","s:mt-12",3,"ctaClicked","content","tabIndex"]],template:function(n,o){n&1&&(m(0,"div",0),a(1,"ewp-text",1)(2,"ewp-input-field",2),w(3,lt,1,1,"ewp-error-text",3),a(4,"ewp-input-field",4),w(5,pt,1,1,"ewp-error-text",3)(6,dt,2,2,"ng-container",5)(7,ht,2,2,"ng-container",5)(8,ft,1,2,"ewp-cta",6),l()),n&2&&(i("formGroup",o.form),r(),i("content",o.textForm)("tabIndex",o.tabIndex),r(),i("content",o.emailInput)("tabIndex",o.tabIndex),r(),i("ngIf",o.showEmailError),r(),i("content",o.phoneNumberInput)("tabIndex",o.tabIndex),r(),i("ngIf",o.showPhoneError),r(),i("ngIf",o.consentCheckbox&&o.consentCheckbox.id),r(),i("ngIf",o.legalText&&o.legalText.wysiwyg),r(),i("ngIf",o.nextButton))},dependencies:[R,$,q,z,J,nt,x,v,C,u,b],encapsulation:2,changeDetection:0})}}return e})();var I=(()=>{class e{constructor(t,n){this.motoristFacade=t,this.tileService=n,this.headline="",this.subHeadline="",this.infoBtnTitle="",this.infoHeadline="",this.infoText="",this.infoCtaText="",this.tabIndex=0,this.textForm={},this.emailInput={},this.phoneNumberInput={},this.nextButton={},this.consentCheckbox={},this.legalText={},this.tileName=k.MOTORIST_CONTACT_DETAILS}get motoristContact$(){return this.motoristFacade.motoristContact$}setMotoristContact(t){this.motoristFacade.setMotoristContact(t)}
1fetchConfiguration(){this.tileService.fetchConfiguration(this.tileName).subscribe(t=>{this.locale=t.locale,this.tabIndex=t.valid?-1:0,this.headline=t.headline,this.subHeadline=t?.subHeadline||"",this.infoBtnTitle=t?.infoBtnTitle||"",this.infoHeadline=t?.infoHeadline||"",this.textForm=t.textForm,this.emailInput=t.emailInput,this.phoneNumberInput=t.phoneNumberInput,this.nextButton=t.nextButton,t.legalText&&(this.legalText=t.legalText),t.consentCheckbox&&(this.consentCheckbox=t.consentCheckbox)})}loadNextTile(){this.tileService.loadNextTile(this.tileName,k.MOTORIST_ADDRESS_DETAILS)}static{this.\u0275fac=function(n){return new(n||e)(g(Z),g(et))}}static{this.\u0275prov=B({token:e,factory:e.\u0275fac})}}return e})();var Ut=(()=>{class e{constructor(t,n){this.service=t,this.processTrackingFacade=n}ngOnInit(){this.service.fetchConfiguration(),this.processTrackingFacade.trackTilePageView("customer-contact","contact")}handleNextButton(t){this.service.setMotoristContact(t),this.service.loadNextTile()}static{this.\u0275fac=function(n){return new(n||e)(c(I),c(tt))}}static{this.\u0275cmp=d({type:e,selectors:[["ewp-motorist-contact-tile"]],standalone:!1,features:[V([I])],decls:3,vars:19,consts:[[3,"headline","subHeadline","infoBtnTitle","infoHeadline","infoText","infoCtaText","tileName"],[3,"handleNextButton","tileName","textForm","emailInput","phoneNumberInput","nextButton","consentCheckbox","legalText","locale","selectedMotoristContact","tabIndex"]],template:function(n,o){n&1&&(m(0,"ewp-olb-base-tile",0)(1,"ewp-motorist-contact",1),j(2,"async"),h("handleNextButton",function(at){return o.handleNextButton(at)}),l()()),n&2&&(i("headline",o.service.headline)("subHeadline",o.service.subHeadline)("infoBtnTitle",o.service.infoBtnTitle)("infoHeadline",o.service.infoHeadline)("infoText",o.service.infoText)("infoCtaText",o.service.infoCtaText)("tileName",o.service.tileName),r(),i("tileName",o.service.tileName)("textForm",o.service.textForm)("emailInput",o.service.emailInput)("phoneNumberInput",o.service.phoneNumberInput)("nextButton",o.service.nextButton)("consentCheckbox",o.service.consentCheckbox)("legalText",o.service.legalText)("locale",o.service.locale)("selectedMotoristContact",G(2,17,o.service.motoristContact$))("tabIndex",o.service.tabIndex))},dependencies:[ot,rt,A],encapsulation:2,changeDetection:0})}}return e})();var re=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=O({type:e})}static{this.\u0275inj=E({imports:[L,K,Q,it,x,v,C,u,b]})}}return e})();export{Ut as MotoristContactTileComponent,re as OlbFeatureMotoristContactTileModule};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.