1import{b as ct,c as dt}from"./chunk-3QVU3OP4.js";import{a as pt,b as ut}from"./chunk-ZO7MWZV5.js";import"./chunk-E5C3DMEE.js";import{a as lt}from"./chunk-QZTWUFVX.js";import"./chunk-MRUXXFZZ.js";import"./chunk-ZK2UVZHG.js";import"./chunk-YCWVNKHW.js";import"./chunk-IKP3GIDA.js";import{a as st}from"./chunk-6FDE4EML.js";import{$a as M,Bb as at,Cb as v,Db as B,Ka as X,Va as q,Wb as nt,Yb as ot,_a as Q,ab as O,fa as G,ga as J,ia as A,lb as y,pb as it,qa as K,va as $,wc as rt}from"./chunk-UMFZ3LLX.js";import{a as tt,b as et}from"./chunk-BWEGVNY2.js";import{a as Y,b as Z}from"./chunk-AG6QEAUI.js";import"./chunk-SAUKD7DD.js";import{Ac as N,Bc as F,Gc as H,Jb as m,Lb as x,Nb as L,Nc as W,Ob as P,Pb as R,Qb as _,Qc as s,Rb as n,Rc as l,Sb as o,Tb as g,Za as I,_b as D,db as i,dc as h,fc as u,oa as b,ob as S,pa as E,sc as k,tc as r,ub as w,uc as p,vc as T,wc as z,zc as j}from"./chunk-KKSGD2T6.js";import"./chunk-EQDQRRRY.js";var gt=(e,d)=>({from:e,to:d});function Tt(e,d){e&1&&(n(0,"p",8),r(1),s(2,"translate"),o()),e&2&&(i(),T(" ",l(2,1,"account.tileCard.taxStatusUpdate.taxDialogDesc2")," "))}function ht(e,d){e&1&&(n(0,"p",8),r(1),s(2,"translate"),o()),e&2&&(i(),T(" ",l(2,1,"account.tileCard.taxStatusUpdate.taxDialogDesc3")," "))}var mt=(()=>{class e{constructor(t,c,a,C,U,V,f){this.profileService=t,this.dialogRef=c,this.data=a,this.trs=C,this.dialog=U,this.gtmService=V,this.storageService=f,this.isChangeTaxStatusLaddaActivated=!1,this.eLegalTaxStatus=at,this.eLegalTaxStatusUpdate=v}ngOnInit(){console.log("this.data",this.data)}changeTaxStatus(){this.isChangeTaxStatusLaddaActivated=!0,console.log("this.data",this.data),this.profileService.changeTaxStatus(this.data.taxStatusUpdateData).subscribe(t=>{t.status&&t.status==="OK"?(this.openConfirmationDialog("success"),this.gtmService.pushToDataLayer(nt.SELFCARE_ACTIONS,{user_id:this.storageService.get(tt.NOTIFICATION_UUID)||this.gtmService?.userAuthIdentity,custom_event:"change_tax_status"})):this.openConfirmationDialog("error"),this.isChangeTaxStatusLaddaActivated=!1},t=>{console.log("Error occurred while updating legal tax status: ",t),this.isChangeTaxStatusLaddaActivated=!1,this.openConfirmationDialog("error")})}openConfirmationDialog(t){this.closeDialog(),this.dialog.open(lt,{width:"812px",panelClass:["global-dialog","gd-v3","text-align-center","confirmation-dialog-v3"],data:{image:t==="success"?"assets/img/success-dialog-icon.svg":"assets/img/unsuccess-dialog-icon.svg",title:t==="success"?this.trs.trsTs("success"):this.trs.trsTs("account.tileCard.taxStatusUpdate.unSuccessDialogTitle"),innerDesc:t==="success"?this.trs.trsTsParams("account.tileCard.taxStatusUpdate.successDialogDesc",{from:this.data.from,to:this.data.to}):this.trs.trsTs("account.tileCard.taxStatusUpdate.unSuccessDialogDesc"),close:this.trs.trsTs("close")}}).afterClosed().subscribe(()=>{t==="success"&&this.profileService.fetchTaxStatus()})}closeDialog(t){this.dialogRef.close(t)}static{this.\u0275fac=function(c){return new(c||e)(S(B),S(G),S(J),S(y),S(A),S(ot),S(et))}}static{this.\u0275cmp=w({type:e,selectors:[["app-change-tax-status-dialog"]],decls:19,vars:19,consts:[[1,"dialog-heading-v3"],[1,"reset-btn",3,"click"],["src","assets/img/back-icon-black.svg","alt","back"],[1,"title-text-wrapper"],[1,"font-size-20","font-medium"],[1,"font-light","font-size-14","text-align-center"],[1,"dialog-content-v3"],[1,"mb-20","font-size-14","font-light",3,"innerHTML"],[1,"mb-30","font-size-14","font-light"],[1,"text-align-center","mb-20"],[1,"radius100","btn-3-v3","bg-main","ladda-fix-v3","black-with-ladda",3,"click","ladda","disabled"],[1,"font-size-12","font-light","small-text","text-align-center","p0-10",3,"innerHtml"]],template:function(c,a){c&1&&(n(0,"header",0)(1,"button",1),h("click",function(){return a.closeDialog()}),g(2,"img",2),o(),n(3,"div",3)(4,"h2",4),r(5),s(6,"translate"),o(),n(7,"p",5),r(8),s(9,"translate"),o()()(),n(10,"div",6),g(11,"p",7),m(12,Tt,3,3,"p",8),m(13,ht,3,3,"p",8),n(14,"div",9)(15,"button",10),h("click",function(){return a.changeTaxStatus()}),r(16),s(17,"translate"),o()(),g(18,"p",11),o()),c&2&&(i(5),p(l(6,10,"account.tileCard.taxStatusUpdate.changeTaxStatus")),i(3),z("",l(9,12,"account.tileCard.taxStatusUpdate.taxDialogSubtitleCustomerCode")," ",a.data.taxStatusUpdateData.customerCode),i(3),_("innerHTML",a.trs.trsTsParams("account.tileCard.taxStatusUpdate.taxDialogDesc1",W(16,gt,a.data.from,a.data.to)),I),i(),x(a.data.taxStatusUpdateData.currentTaxStatus===a.eLegalTaxStatusUpdate.CORPORATE?12:-1),i(),x(a.data.taxStatusUpdateData.currentTaxStatus!==a.eLegalTaxStatusUpdate.CORPORATE?13:-1),i(2),_("ladda",a.isChangeTaxStatusLaddaActivated)("disabled",a.isChangeTaxStatusLaddaActivated),i(),T(" ",l(17,14,"account.tileCard.taxStatusUpdate.confirmChange")," "),i(2),_("innerHtml",a.trs.trsTs("account.tileCard.taxStatusUpdate.smallText"),I))},dependencies:[Z,Y,O,M],styles:[".dialog-heading-v3[_ngcontent-%COMP%]{padding-bottom:20px}@media only screen and (max-width: 599px){.dialog-heading-v3[_ngcontent-%COMP%]{padding:0 45px 24px 70px}}@media only screen and (min-width: 600px){.dialog-heading-v3[_ngcontent-%COMP%]{padding:0 50px 24px}}.dialog-heading-v3[_ngcontent-%COMP%] .reset-btn[_ngcontent-%COMP%]{top:16px}.toggler-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.dialog-content-v3[_ngcontent-%COMP%]{max-width:600px;margin:0 auto}
1.dialog-content-v3[_ngcontent-%COMP%] .btn-3-v3[_ngcontent-%COMP%]{width:180px;height:33px}.small-text[_ngcontent-%COMP%]{color:#707070}"]})}}return e})();function Ut(e,d){if(e&1&&(n(0,"div",1),g(1,"mat-progress-spinner",3),o()),e&2){let t=u();i(),_("mode",t.commonService.mode)("strokeWidth",2)("diameter",80)}}function bt(e,d){if(e&1){let t=D();n(0,"mat-step")(1,"p",11),r(2),s(3,"translate"),n(4,"button",12),h("click",function(){b(t);let a=u(3);return E(a.goToExternalPage())}),r(5),s(6,"translate"),o(),r(7),s(8,"translate"),o(),n(9,"article",13)(10,"p",11),r(11),s(12,"translate"),o(),n(13,"p",14),r(14),o(),n(15,"div",15),g(16,"img",16),o()()()}if(e&2){let t=u(3);i(2),T(" ",l(3,5,"account.tileCard.taxStatusUpdate.wrongVatDesc")," "),i(3),p(l(6,7,"account.tileCard.taxStatusUpdate.wrongVatDesc2")),i(2),T(" ",l(8,9,"account.tileCard.taxStatusUpdate.wrongVatDesc3")," "),i(4),p(l(12,11,"account.tileCard.taxStatusUpdate.vatNumber")),i(3),p(t.profileService.taxStatus.vat?t.profileService.taxStatus.vat:"/")}}function Et(e,d){e&1&&(n(0,"p",17),r(1),s(2,"translate"),o()),e&2&&(i(),p(l(2,1,"account.tileCard.taxStatusUpdate.new.step2Desc")))}function It(e,d){if(e&1&&g(0,"div",18),e&2){let t=u(4);_("innerHtml",t.trs.trsTs("account.tileCard.taxStatusUpdate.new.invalidTaxStatus"),I)}}function Dt(e,d){if(e&1){let t=D();n(0,"div",19)(1,"mat-form-field",22)(2,"label"),r(3),s(4,"translate"),o(),n(5,"input",23),h("input",function(a){b(t);let C=u(4);return E(C.onSearch(a.target.value))}),o()()()}e&2&&(i(3),p(l(4,2,"account.tileCard.taxStatusUpdate.new.search")),i(2),_("type","text"))}function wt(e,d){if(e&1&&(n(0,"mat-radio-button",25)(1,"div",26)(2,"span",8),r(3),s(4,"translate"),o(),n(5,"span",9),r(6),o()(),n(7,"div")(8,"span",8),r(9),s(10,"translate"),o(),n(11,"span",9),r(12),s(13,"translate"),s(14,"translate"),s(15,"translate"),o()()()),e&2){let t=d.$implicit,c=d.$index,a=u(5);_("value",t.contract)("disabled",a.profileService.invalidTaxStatus)("checked",a.profileService.invalidTaxStatus?!1:c===0),i(3),p(l(4,7,"account.tileCard.taxStatusUpdate.new.customerCode")),i(3),p(t.customerCode),i(3),p(l(10,9,"account.tileCard.taxStatusUpdate.taxStatus")),i(3),T(" ",a.profileService.invalidTaxStatus?l(13,11,"account.tileCard.taxStatusUpdate.new.invalidVatNo"):t.taxStatus===a.eLegalTaxStatus.CORPORATE?l(14,13,"account.tileCard.taxStatusUpdate.corporate"):l(15,15,"account.tileCard.taxStatusUpdate.consumer")," ")}}function At(e,d){if(e&1){let t=D();n(0,"mat-radio-group",24),F("ngModelChange",function(a){b(t);let C=u(4);return N(C.selectedContractValue,a)||(C.selectedContractValue=a),E(a)}),P(1,wt,16,17,"mat-radio-button",25,L),o()}if(e&2){let t=u(4);j("ngModel",t.selectedContractValue),i(),R(t.profileService.filteredContracts)}}function Mt(e,d){if(e&1&&(n(0,"article",13)(1,"div",26)(2,"span",8),r(3),s(4,"translate"),o(),n(5,"span",9),r(6),o()(),n(7,"div")(8,"span",8),r(9),s(10,"translate"),o(),n(11,"span",9),r(12),s(13,"translate"),s(14,"translate"),s(15,"translate"),o()(),n(16,"div",15),g(17,"img",16),o()()),e&2){let t=d.$implicit,c=u(5);i(3),p(l(4,4,"account.tileCard.taxStatusUpdate.new.customerCode")),i(3),p(t.customerCode),i(3),p(l(10,6,"account.tileCard.taxStatusUpdate.taxStatus")),i(3),T(" ",c.profileService.invalidTaxStatus?l(13,8,"account.tileCard.taxStatusUpdate.new.invalidVatNo"):t.taxStatus===c.eLegalTaxStatus.CORPORATE?l(14,10,"account.tileCard.taxStatusUpdate.corporate"):l(15,12,"account.tileCard.taxStatusUpdate.consumer")," ")}}function Ot(e,d){if(e&1&&P(0,Mt,18,14,"article",13,L),e&2){let t=u(4);R(t.profileService.filteredContracts)}}function yt(e,d){if(e&1){let t=D();n(0,"div",21)(1,"button",27),h("click",function(){b(t);let a=u(4);return E(a.changeTaxStatus())}),r(2),s(3,"translate"),o()()}if(e&2){let t=u(4);i(),k(H("change-tax-btn radius16 btn-2-v3 bg-black ",t.profileService.invalidTaxStatus?"disabled":"")),_("disabled",t.profileService.invalidTaxStatus),i(),T(" ",l(3,5,"account.tileCard.taxStatusUpdate.changeTaxStatus")," ")}}function Bt(e,d){if(e&1&&(n(0,"mat-step"),m(1,Et,3,3,"p",17),m(2,It,1,1,"div",18),m(3,Dt,6,4,"div",19),m(4,At,3,1,"mat-radio-group",20),m(5,Ot,2,0),m(6,yt,4,7,"div",21),o()),e&2){let t=u(3);i(),x(t.profileService.invalidTaxStatus?-1:1),i(),x(t.profileService.invalidTaxStatus?2:-1),i(),x(t.profileService.taxStatus.contracts.length>10?3:-1),i(),x(t.profileService.invalidTaxStatus?-1:4),i(),x(t.profileService.invalidTaxStatus?5:-1),i(),x(t.profileService.invalidTaxStatus?-1:6)}}function Lt(e,d){if(e&1&&(n(0,"p",6),r(1),s(2,"translate"),o(),n(3,"article",7)(4,"p",8),r(5),s(6,"translate"),o(),n(7,"p",9),r(8),o(),n(9,"p",8),r(10),s(11,"translate"),o(),n(12,"p",9),r(13),o()(),n(14,"mat-stepper",10,0),m(16,bt,17,13,"mat-step"),m(17,Bt,7,6,"mat-step"),o()),e&2){let t=u(2);i(),p(l(2,9,"account.tileCard.taxStatusUpdate.new.pageDesc")),i(4),p(l(6,11,"account.tileCard.taxStatusUpdate.vatNumber")),i(3),p(t.profileService.taxStatus.vat?t.profileService.taxStatus.vat:"/"),i(2),p(l(11,13,"account.tileCard.taxStatusUpdate.name")),i(3),p(t.profileService.taxStatus.customerName?t.profileService.taxStatus.customerName:"/"),i(),_("linear",!0)("@.disabled",!0),i(2),x(!t.profileService.taxStatus.legalTaxStatus&&!t.profileService.taxStatus.contracts?16:-1),i(),x(t.profileService.taxStatus.legalTaxStatus&&t.profileService.taxStatus.contracts&&t.profileService.taxStatus.contracts.length?17:-1)}}function Pt(e,d){e&1&&(n(0,"div",5)(1,"div",28),g(2,"img",29),o(),n(3,"p",30),r(4),s(5,"translate"),o()()),e&2&&(i(4),p(l(5,1,"account.tileCard.taxStatusUpdate.noTaxStatus")))}function Rt(e,d){if(e&1&&(n(0,"div",2)(1,"div",4),m(2,Lt,18,15)(3,Pt,6,3,"div",5),o()()),e&2){let t=u();i(2),x(t.profileService.taxStatus?2:3)}}var xt=(()=>{class e{constructor(t,c,a,C,U){this.commonService=t,this.trs=c,this.dialog=a,this.profileService=C,this.authService=U,this.eLegalTaxStatus=v,this.authService.logoutSubject.subscribe(()=>{this.profileService.taxStatus=void 0,this.profileService.selectedContractValue="",this.profileService.customerLegalTaxStatus=""}),this.commonService.isPageTitleActivated=!0,this.commonService.isBackButtonActivated=!0,this.commonService.setPageTitle(this.trs.trsTs("account.tileCard.taxStatusUpdate.title"),"account-tax-status")}get selectedContractValue(){return this.profileService.invalidTaxStatus?"":this.profileService.selectedContractValue}set selectedContractValue(t){this.profileService.selectedContractValue=t}ngOnInit(){this.profileService.fetchTaxStatus()}onSearch(t){this.profileService.filteredContracts=this.profileService.taxStatus.contracts.filter(c=>c.customerCode.toLowerCase().includes(t.toLowerCase()))}goToExternalPage(){window.open(this.trs.trsTs("account.tileCard.taxStatusUpdate.linkToUpdateTaxExplanation"),"_blank")}changeTaxStatus(){let t=this.profileService.cleanTaxStatus,c=JSON.parse(JSON.stringify(t));this.profileService.taxStatus.contracts=c,this.profileService.taxStatus.contracts=this.profileService.taxStatus.contracts.map(f=>(f.contract===this.profileService.selectedContractValue&&(f.updateTaxStatus=f.taxStatus===v.CORPORATE?v.RETAIL:v.CORPORATE),f));let a=this.profileService.taxStatus.contracts.find(f=>f.contract===this.profileService.selectedContractValue),C=this.profileService.taxStatus.contracts.some(f=>f.taxStatus!==v.RETAIL),U={customerTaxStatus:a.updateTaxStatus,taxNumber:this.profileService.taxStatus.vat,customerExternalId:a.customerExternalId,customerCode:a.customerCode,currentTaxStatus:a.taxStatus,legalTaxStatus:C?v.CORPORATE:v.RETAIL,email:this.profileService.contactEmail};this.dialog.open(mt,{width:"812px",panelClass:["global-dialog","gd-v3","change-tax-status-dialog"],data:{taxStatusUpdateData:U,from:a.taxStatus===v.CORPORATE?this.trs.trsTs("account.tileCard.taxStatusUpdate.corporate"):this.trs.trsTs("account.tileCard.taxStatusUpdate.consumer"),to:a.taxStatus===v.CORPORATE?this.trs.trsTs("account.tileCard.taxStatusUpdate.consumer"):this.trs.trsTs("account.tileCard.taxStatusUpdate.corporate")}}).afterClosed().subscribe(()=>{})}ngOnDestroy(){this.commonService.isPageTitleActivated=!1,this.commonService.isBackButtonActivated=!1,this.profileService.filteredContracts=[]}static{this.\u0275fac=function(c){return new(c||e)(S(rt),S(y),S(A),S(B),S(it))}}static{this.\u0275cmp=w({type:e,selectors:[["app-tax-status-update"]],decls:2,vars:2,consts:[["stepper",""],[1,"page-spinner"],[1,"tax-status-update-new-page"],[3,"mode","strokeWidth","diameter"],[1,"container-460"],[1,"n
1o-user-available-content","text-align-center"],[1,"font-size-14","font-light","text-align-center","mb-40"],[1,"tax-data-info"],[1,"font-size-14"],[1,"font-size-14","font-bold","mb-5"],[3,"linear"],[1,"font-size-14","mb-5"],[1,"reset-btn","text-underline",3,"click"],[1,"tax-data-info","bigger-box"],[1,"font-size-14","font-bold"],[1,"icon-alert"],["src","assets/img/alert-icon-bigger.svg","alt","alert"],[1,"font-size-14","mb-16"],[1,"font-size-14","mb-16","color-red",3,"innerHtml"],[1,"form-field-holder","mb-20"],["name","selectedContract",1,"tax-radio-group",3,"ngModel"],[1,"text-align-center"],["floatLabel","never",1,"style-type-v3","with-icon","reset-margin"],["matInput","","autocomplete","new-username",3,"input","type"],["name","selectedContract",1,"tax-radio-group",3,"ngModelChange","ngModel"],[1,"variant-type-v3",3,"value","disabled","checked"],[1,"mb-5"],[3,"click","disabled"],[1,"mb-45"],["src","assets/img/no-user-available.png","alt","no user available"],[1,"font-size-16","font-bold"]],template:function(c,a){c&1&&(m(0,Ut,2,3,"div",1),m(1,Rt,4,1,"div",2)),c&2&&(x(a.profileService.isTaxStatusLoaded?-1:0),i(),x(a.profileService.isTaxStatusLoaded?1:-1))},dependencies:[st,dt,ct,q,Q,pt,X,K,$,ut,O,M],encapsulation:2})}}return e})();var le=[{path:"",redirectTo:"tax-status-update",pathMatch:"full"},{path:"tax-status-update",component:xt}];export{le as TAX_STATUS_UPDATE_ROUTES};
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.