1import{a as te}from"./chunk-Q3YHYZTU.js";import{b as J}from"./chunk-4G6OIGYA.js";import{Z,_ as ee}from"./chunk-JI3OXUYU.js";import{$a as T,Ac as B,Bc as W,Da as $,Fa as h,Ha as S,Q as N,Qa as _,Ra as r,Sa as p,Ta as I,Ua as D,Vb as G,Y,Z as M,Za as k,_a as L,_b as x,ec as X,fb as y,kb as O,kc as z,lb as R,lc as w,mb as g,ob as b,pb as F,sa as c,sc as V,ta as s,uc as Q,wc as d,yb as j,zc as q}from"./chunk-ECFZ5EN4.js";var E=function(e){return e.Success="success",e.Error="error",e.Cancel="cancel",e.Reject="reject",e;}(E||{});var U=class{get paymentOnError(){return this.paymentStatus===E.Error;}get paymentCancelled(){return this.paymentStatus===E.Cancel;}get paymentRejected(){return this.paymentStatus===E.Reject;}get paymentAccepted(){return this.paymentStatus===E.Success;}constructor(a,t,n,i,o,u,m){this.http=a,this.router=t,this.route=n,this.apiConfigSrv=i,this.authUserSrv=o,this.commonSrv=u,this.gaReportingSrv=m,this.orderNumber="",this.paymentStatus="",this.orderData=null,this.orderDatatLoadingState={inProgress:!0,onError:!1},this.orderPaymentSuccessNotice="";}createPaymentSuccessNotice(){if(!this.orderData)return"";let a=this.commonSrv.formatPrice(this.orderData.totalPrice);return this.orderPaymentSuccessNotice.replace("__ORDER_PRICE__",a).replace("__ORDER_NUMBER__",this.orderNumber);}loadOrderData(){this.orderDatatLoadingState.inProgress=!0;let a=this.apiConfigSrv.findOrderDataReqUrl(this.orderNumber);this.http.get(a,{observe:"response"}).subscribe(t=>{if(this.orderDatatLoadingState.inProgress=!1,t.status!==200){this.orderDatatLoadingState.onError=!0;return;}let n=t.body?t.body:null;if((n?n.code:null)!==2e4){this.orderDatatLoadingState.onError=!0;return;}let o=n?n.data:null;this.orderData=o,this.gaReportingSrv.sendPurchaseReporting(o);},t=>{this.orderDatatLoadingState.inProgress=!1,this.orderDatatLoadingState.onError=!0;});}};var oe=["pageMetaTitleContent"],re=["pageMetaDescriptionContent"],_e=["orderPaymentSuccessNoticeDetails"];function ae(e,a){e&1&&(_(0,"div")(1,"h2"),T(2,6),r(),_(3,"div",19),T(4,7),r()());}function Te(e,a){e&1&&(_(0,"div")(1,"h2"),T(2,8),r(),_(3,"div",19),T(4,9),r()());}function Ce(e,a){e&1&&(_(0,"div")(1,"h2"),T(2,10),r(),_(3,"div",19),T(4,11),r()());}function se(e,a){e&1&&(_(0,"div",22),T(1,13),r());}function ce(e,a){e&1&&p(0,"mat-progress-spinner",23);}function Se(e,a){if(e&1&&(_(0,"div")(1,"div",24),b(2),r(),p(3,"br"),I(4),k(5,14),p(6,"br"),L(),D(),r()),e&2){let t=y(2);c(2),F(t.createPaymentSuccessNotice());}}function ue(e,a){if(e&1&&(_(0,"div")(1,"h2"),T(2,12),r(),h(3,se,2,0,"div",20)(4,ce,1,0,"mat-progress-spinner",21)(5,Se,7,1,"div",16),r()),e&2){let t=y();c(3),S("ngIf",!t.orderDatatLoadingState.inProgress),c(),S("ngIf",t.orderDatatLoadingState.inProgress),c(),S("ngIf",t.orderData);}}var f=(()=>{class e extends U{constructor(t,n,i,o,u,m,l,A,P){super(t,n,i,o,u,m,l),this.route=i,this.metaTitle=A,this.pageMetaTags=P,this.metaTitleContentRef=null,this.metaDescContentRef=null,this.orderPaymentSuccessNoticeRef=null,this.routeParamsSubscriber=null;}ngOnInit(){this.commonSrv.currentVisitingPage=W.CartCheckoutPaymentStatus,this.checkPathParams();}ngAfterViewInit(){this.definePageMetaTags(),this.initI18nTexts(),this.gaReportingSrv.sendPageViewReporting();}ngOnDestroy(){this.commonSrv.currentVisitingPage=null;try{this.routeParamsSubscriber&&this.routeParamsSubscriber.unsubscribe();}catch{}}checkPathParams(){this.routeParamsSubscriber=this.route.params.subscribe(t=>{this.handlePathParamsReady(t);});}handlePathParamsReady(t){this.orderNumber=t.orderNumber?decodeURIComponent(t.orderNumber):"",this.paymentStatus=t.paymentStatus?decodeURIComponent(t.paymentStatus):"",this.paymentAccepted&&this.handleSuccessPayment();}handleSuccessPayment(){this.loadOrderData();}definePageMetaTags(){if(this.metaTitleContentRef){let t=this.metaTitleContentRef.nativeElement.textContent;this.metaTitle.setTitle(t),this.metaTitleContentRef.nativeElement.textContent="";}if(this.metaDescContentRef){let t=this.metaDescContentRef.nativeElement.textContent,n=this.pageMetaTags.getTag('name="description"');n&&(n.content=t),this.metaDescContentRef&&(this.metaDescContentRef.nativeElement.textContent="");}}initI18nTexts(){this.orderPaymentSuccessNoticeRef&&(this.orderPaymentSuccessNotice=this.orderPaymentSuccessNoticeRef.nativeElement.textContent);}static{this.ɵfac=function(n){return new(n||e)(s(X),s(Q),s(V),s(q),s(J),s(B),s(te),s(w),s(z));};}static{this.ɵcmp=Y({type:e,selectors:[["pw-cart-checkout-payment-status"]],viewQuery:function(n,i){if
1(n&1&&(O(oe,5),O(re,5),O(_e,5)),n&2){let o;R(o=g())&&(i.metaTitleContentRef=o.first),R(o=g())&&(i.metaDescContentRef=o.first),R(o=g())&&(i.orderPaymentSuccessNoticeRef=o.first);}},standalone:!0,features:[$,j],decls:14,vars:4,consts:()=>{let t;t="Paiement";let n;n="Paiement de la commande";let i;i=" Nous avons bien re\xE7u le paiement de __ORDER_PRICE__ pour la commande __ORDER_NUMBER__. Vous recevrez la confirmation par email.\n";let o;o="Paiement en erreur";let u;u=" Une erreur est survenue durant le paiement de votre commande ";let m;m="Paiement annul\xE9";let l;l=" Le paiement de votre commande a \xE9t\xE9 annul\xE9 ";let A;A="Paiement rejet\xE9";let P;P=" Le paiement de votre commande a \xE9t\xE9 rejet\xE9 ";let v;v="Paiement accept\xE9";let H;H=" Le paiement de votre commande a \xE9t\xE9 accept\xE9. ";let K;return K=" Vous pouvez d\xE8s \xE0 pr\xE9sent la retrouver et suivre son \xE9volution dans la rubrique Mes commandes."+"\uFFFD#6\uFFFD\uFFFD/#6\uFFFD"+" Nous vous remercions de votre confiance et vous souhaitons une agr\xE9able d\xE9gustation. ",[["pageMetaTitleContent",""],["pageMetaDescriptionContent",""],["orderPaymentSuccessNoticeDetails",""],t,n,i,o,u,m,l,A,P,v,H,K,[1,"container","page-container","mb-5"],[4,"ngIf"],["data-nosnippet","","hidden",""],["hidden","","data-nosnippet",""],[1,"alert","alert-danger"],["class","alert alert-success",4,"ngIf"],["class","m-auto mt-3 mb-5","strokeWidth","2","diameter","25","mode","indeterminate",4,"ngIf"],[1,"alert","alert-success"],["strokeWidth","2","diameter","25","mode","indeterminate",1,"m-auto","mt-3","mb-5"],[1,"alert","alert-success","mt-1"]];},template:function(n,i){n&1&&(_(0,"div",15),h(1,ae,5,0,"div",16)(2,Te,5,0,"div",16)(3,Ce,5,0,"div",16)(4,ue,6,3,"div",16),r(),_(5,"div",17,0),T(7,3),r(),_(8,"div",17,1),T(10,4),r(),_(11,"div",18,2),T(13,5),r()),n&2&&(c(),S("ngIf",i.paymentOnError),c(),S("ngIf",i.paymentCancelled),c(),S("ngIf",i.paymentRejected),c(),S("ngIf",i.paymentAccepted));},dependencies:[G,Z],styles:["h2[_ngcontent-%COMP%]{font-size:24px}"]});}}return e;})();var me=[{path:"",component:f}],ie=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)();};}static{this.ɵmod=M({type:e});}static{this.ɵinj=N({imports:[d.forChild(me),d]});}}return e;})();var Le=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)();};}static{this.ɵmod=M({type:e});}static{this.ɵinj=N({imports:[x,d,ee,ie,f]});}}return e;})();export{Le as CartCheckoutPaymentStatusModule};/**i18n:c268d6aa763701f7bb01344751edc96989c72bead18435ad51f3b240f2aab54b*/
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.