1import {X as Xt}from'./chunk-CdwWmFO_.js';import'./chunk-BjGf3JRz.js';import {h}from'./chunk-DtdCZK5Z.js';import'./chunk-BkYuKK9k.js';import {c as ce}from'./chunk-BRsHFk4j.js';import'./chunk-C0DmzTpz.js';import {V,aE as ut,O,bK as P,bI as Gt,X as Xb,z as zg,N as Ng,T as Tt,cn as pe,d4 as Pe,j as Xv,w as w0,H as H0,Z as Zx,k as dn,l as zw,s as sk,n as nd,r as rC,m as wC,o as mv,p as GC,t as tD,q as vD,aO as cD,u as al,x as tM,y as dM,L as Lb,A as r1,P as P1,cQ as G_,cR as O1,B as xS,C as Vs,J as GS,K as iI,M as RI,Q as us,Y as UI,_ as tE,$ as Dn,a0 as ME,a1 as ny,a2 as go,a3 as Kd,a4 as XE,a5 as LT,a6 as mA,a7 as mt,a8 as fy,aB as ey,ai as dy,bn as nS,ag as SC,aR as i_,aa as Js,ae as pS,ab as Ey,aS as Vp,aT as d_,aU as Hp,ad as gd,bS as Y_,al as gS}from'./main-4WA6AAHG.js';import'./chunk-CkU8oUfw.js';var yi=()=>["Add a card so renewals do not fail.","Remove a card you no longer use."],_i=()=>["Manage_Subscriptions"];function Ti(e,xi){if(e&1){let i=i_();Js(0,"mat-card",2)(1,"mat-tab-group",3)(2,"mat-tab",4),pS(3,"translate"),Js(4,"payment-methods",5),Ey("cardsChanged",function(){Vp(i);let a=d_();return Hp(a.loadCards())}),gd()()()();}if(e&2){let i=d_();SC(2),dy("label",Y_(gS(3,4,"Payment methods"))),SC(2),dy("isAdmin",false)("cards",i.cards);}}var ye=(()=>{class e{constructor(i,t,a,Ci,Si){this.cardsService=i,this.toastr=t,this.translate=a,this.loadingService=Ci,this.errorService=Si,this.cards=[];}ngOnInit(){this.loadCards();}loadCards(){this.loadingService.loadingOn(),this.cardsService.getUserSavedCards().subscribe({next:i=>{this.loadingService.loadingOff(),this.cards=i.succeeded&&Array.isArray(i.data)?i.data:[],i.succeeded||this.toastr.error("An unexpected error occurred");},error:i=>{this.loadingService.loadingOff(),this.errorService.setError(i,"Failed to Complete the Operation");}});}static{this.\u0275fac=function(t){return new(t||e)(V(h),V(ut),V(O),V(P),V(Gt))};}static{this.\u0275cmp=Xb({type:e,selectors:[["app-cards"]],decls:2,vars:4,consts:[["helpKey","payment-cards","intro","The cards saved on your account for subscription renewals and points top-ups.","warning","If the card used for a subscription expires, the renewal fails and the subscription can lapse. Keep at least one valid card here.",3,"steps"],["class","cardWithShadow",4,"ngxPermissionsOnly"],[1,"cardWithShadow"],["mat-stretch-tabs","false"],[3,"label"],[3,"cardsChanged","isAdmin","cards"]],template:function(t,a){t&1&&(fy(0,"app-page-help",0),ey(1,Ti,5,6,"mat-card",1)),t&2&&(dy("steps",nS(2,yi)),SC(),dy("ngxPermissionsOnly",nS(3,_i)));},dependencies:[ce,zg,Ng,Tt,Xt,pe,Pe,Xv,w0,H0,Zx,dn,zw,sk,nd,rC,wC,mv,GC,tD,vD,cD,al,tM,dM,Lb,r1,P1,G_,O1,xS,Vs,GS,iI,RI,us,UI,tE,Dn,ME,ny,go,Kd,XE,LT,mA,mt],encapsulation:2,changeDetection:1});}}return e})();export{ye as CardsComponent};
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.