1import{b as Y}from"./chunk-KZVHG7UY.js";import{a as z}from"./chunk-K5FYGYYV.js";import{a as H}from"./chunk-W24EU3QI.js";import{a as U}from"./chunk-RNCPKOJW.js";import"./chunk-WPZXP5M6.js";import"./chunk-WZ46XFBJ.js";import"./chunk-BU6QNCTQ.js";import"./chunk-MIUETEHZ.js";import"./chunk-U5QDKIFU.js";import"./chunk-I74BUUU5.js";import"./chunk-4ZE5RWJH.js";import{a as G}from"./chunk-WTEQXFUS.js";import{a as q}from"./chunk-TD2RWAU3.js";import{c as V,d as L,e as $}from"./chunk-BOAHPV3Z.js";import{d as j}from"./chunk-NCYGWZUK.js";import"./chunk-B6TKUMBU.js";import"./chunk-XQM54ZDB.js";import"./chunk-OBJKJXN7.js";import"./chunk-I477UKPF.js";import"./chunk-JRH7OLGD.js";import"./chunk-TLY3XLDF.js";import{B as D,m as A,q as R,w as F}from"./chunk-OEITEYVC.js";import{$b as O,Dc as a,Eb as I,Ec as l,Fc as u,Gc as B,Ia as S,Ka as y,Rb as _,Tb as C,Vb as E,Vc as T,Wb as w,Wc as v,Xb as k,Yb as d,Zb as i,_ as M,_b as o,ad as r,bd as p,cd as f,f as P,ib as n,la as m,mc as N,oc as g,zb as b}from"./chunk-BKSDA75L.js";import{a as x}from"./chunk-4PSLHSLT.js";var K=(e,c)=>({"desktop-no-data-container":e,"margin-top":c}),Q=(e,c)=>({"transaction-container-desktop":e,"margin-top":c}),W=e=>({"item-card-desktop":e}),X=e=>({"background-color":e});function Z(e,c){if(e&1&&(i(0,"div",3)(1,"p"),a(2),r(3,"translate"),o()()),e&2){let t=g(2);d("ngClass",v(4,K,t.isDesktop,t.addMarginTop)),n(2),l(p(3,2,"TRANSACTION_NO_ACTIVE_TRANSACTIONS"))}}function tt(e,c){if(e&1&&O(0,"span",12),e&2){let t=g().$implicit;d("ngStyle",T(1,X,t==null?null:t.color))}}function et(e,c){if(e&1&&(i(0,"div",5)(1,"div",6)(2,"div")(3,"p"),a(4),r(5,"translate"),o(),i(6,"p"),a(7),r(8,"amountCurrency"),o()(),i(9,"div",7)(10,"p"),a(11),r(12,"translate"),o(),i(13,"p",8),a(14),r(15,"amountCurrency"),o()(),i(16,"div",9)(17,"p"),a(18),r(19,"translate"),o(),i(20,"p"),a(21),r(22,"amountCurrency"),o()()(),i(23,"div",10)(24,"p"),a(25),r(26,"translate"),o(),i(27,"p",11),a(28),r(29,"date"),o()(),i(30,"div",10)(31,"p"),a(32),r(33,"translate"),o(),i(34,"p",11),a(35),o()(),i(36,"div",10)(37,"p"),a(38),r(39,"translate"),o(),i(40,"p",11),a(41),o()(),i(42,"div",10)(43,"p"),a(44),r(45,"translate"),o(),i(46,"p",11),a(47),_(48,tt,1,3,"span",12),o()()()),e&2){let t=c.$implicit,h=g(3);d("ngClass",T(43,W,h.isDesktop)),n(4),l(p(5,17,"CRO_PROFILE_V2_TRANSACTION_BALANCE")),n(3),u(" ",f(8,19,t==null?null:t.startBalance,t==null?null:t.currency)," "),n(4),l(p(12,22,"PAYMENT_DEPOSIT_TRANSACTION_AMOUNT")),n(3),u(" ",f(15,24,t==null?null:t.amount,t==null?null:t.currency)," "),n(4),l(p(19,27,"CRO_PROFILE_V2_FINANCE_DEPOSIT_AFTER")),n(3),u(" ",f(22,29,t==null?null:t.endBalance,t==null?null:t.currency)," "),n(4),l(p(26,32,"CRO_PROFILE_V2_TIME")),n(3),u(" ",f(29,34,t==null?null:t.createdOn,"dd.MM.yyyy. HH:mm:ss")," "),n(4),l(p(33,37,"CRO_PROFILE_V2_ID_TRANSACTION")),n(3),l(t==null?null:t.id),n(3),l(p(39,39,"GAME_TRANSACTION_TYPE")),n(3),B("",t==null?null:t.product," / ",t==null?null:t.gameName),n(3),l(p(45,41,"STATUS")),n(3),u(" ",t==null?null:t.status," "),n(),C(t!=null&&t.color?48:-1)}}function nt(e,c){if(e&1&&(i(0,"div",4),w(1,et,49,45,"div",5,E),o()),e&2){let t=g(2);d("ngClass",v(1,Q,t.isDesktop,t.addMarginTop)),n(),k(t.transactions)}}function it(e,c){if(e&1&&(_(0,Z,4,7,"div",3),_(1,nt,3,4,"div",4)),e&2){let t=g();C(t.transactions!=null&&t.transactions.length?-1:0),n(),C(t.transactions!=null&&t.transactions.length?1:-1)}}var Ot=(()=>{class e extends j{constructor(){super(...arguments),this.translate=m(V),this.filterService=m(z),this.transactionService=m(Y),this.el=m(y),this.toaster=m(q),this.config={itemsPerPage:10,currentPage:1,totalItems:0},this.transactions=[],this.isLoading=!1,this.resetPaginationEmitter=new P,this.limit=10,this.offset=0,this.paginationRequest=!1,this.destroy$=new P,this.addMarginTop=!1}ngOnInit(){this.isLoading=!0,this.setupPagination(),this.setFilterParamSubscription(),this.resetPagination(),this.scrollableContainer=this.el.nativeElement.closest(".cro-profile-content")}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}setFilterParamSubscription(){this.filterService.params$.pipe(M(this.destroy$)).subscribe(t=>{this.handleDesktopDatepickerFilterItem(t)||t!==null&&(Reflect.deleteProperty(t,"eventType"),this.filterParams=t,this.setupPagination(),this.resetPagination(),this.getTransactions())})}handleDesktopDatepickerFilterItem(t){if(this.isDesktop&&t?.eventType==="custom"){if(this.addMarginTop=!0,t.startDate===null||t.endDate===null)return this.transactions=[],this.showMoreBtnVisible=!1,!0}else return this.addMarginTop=!1,!1}getTransactions(){this.paginationParams={limit:this.limit,offset:this.offset},this.transactionService.getTransactionHistory(x(x({},this.filterParams),this.paginationParams)).subscribe({next:t=>{this.setTransactionsData(t)},error:()=>{this.isLoading=!1,this.toaster.showError(this.translate.instant("UNABLE_TO_GET_TRANSACTIONS"))}})}setTransactionsData(t){!this.paginationRequest&&(this.backOnTop=!1),this.paginationRequest?(this.transactions=[...this.transactions||[],...t.records],this.showMoreBtnVisible=t.total>this.transactions.length,this.backOnTop=t.total===this.transactions.length,this.paginationRequest=!1):(this.transactions=[...t.records],this.showMoreBtnVisible=t.total>this.transactions.length,this.backOnTop=!1),this.config.totalItems=t.total,this.isLoading=!1}pageChanged(t){this.paginationRequest=!0,this.config.currentPage=t,this.offset=t*this.limit,this.getTransactions()}setupPagination(){this.config={itemsPerPage:this.limit,currentPage:1}}resetPagination(){this.resetPaginationEmitter.next(!0),this.config.currentPage=1,this.offset=0}static{this.\u0275fac=(()=>{let t;return function(s){return(t||(t=S(e)))(s||e)}})()}
1static{this.\u0275cmp=b({type:e,selectors:[["app-cro-sport-transactions-v2"]],features:[I],decls:4,vars:8,consts:[[3,"isLoading"],[1,"d-flex","justify-content-center","py-2"],[3,"loadMore","itemsPerLoad","length","resetPagination","visible","backOnTop","scrollableContainer"],[1,"no-data-container",3,"ngClass"],[1,"transaction-container",3,"ngClass"],[1,"item-card",3,"ngClass"],[1,"row-3","mb"],[1,"center"],[1,"bold"],[1,"right"],[1,"row-2"],[1,"bold","right"],[1,"status",3,"ngStyle"]],template:function(h,s){h&1&&(O(0,"app-cro-spinner-v2",0),_(1,it,2,2),i(2,"div",1)(3,"app-cro-show-more-pagination-button-v2",2),N("loadMore",function(J){return s.pageChanged(J)}),o()()),h&2&&(d("isLoading",s.isLoading),n(),C(s.isLoading?-1:1),n(2),d("itemsPerLoad",10)("length",s.config.totalItems)("resetPagination",s.resetPaginationEmitter)("visible",s.showMoreBtnVisible)("backOnTop",s.backOnTop)("scrollableContainer",s.scrollableContainer))},dependencies:[H,U,$,D,A,R,L,F,G],styles:["p[_ngcontent-%COMP%]{margin:0 0 5px}.no-data-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}.no-data-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-top:15px;font-size:16px;font-weight:600;color:var(--croNewBlack)}.item-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;font-size:14px;color:var(--croNewBlack);border:1px solid var(--croNewGrey4);border-radius:6px;padding:12px}.item-card[_ngcontent-%COMP%] .row-3[_ngcontent-%COMP%]{display:flex}.item-card[_ngcontent-%COMP%] .row-3[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{width:33%}.item-card[_ngcontent-%COMP%] .row-2[_ngcontent-%COMP%]{display:flex}.item-card[_ngcontent-%COMP%] .row-2[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{width:50%}.item-card[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{display:inline-block;width:9px;height:9px;border-radius:50%;margin:0 0 0 5px}.item-card[_ngcontent-%COMP%] .bold[_ngcontent-%COMP%]{font-weight:700}.item-card[_ngcontent-%COMP%] .center[_ngcontent-%COMP%]{text-align:center}.item-card[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{text-align:right}.item-card[_ngcontent-%COMP%] .mb[_ngcontent-%COMP%]{margin-bottom:10px}.item-card[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{border:none;height:1px;background-color:var(--croNewGrey4)}[_nghost-%COMP%]{width:100%}.transaction-container[_ngcontent-%COMP%]{height:calc(100% - 20px);overflow-y:auto}.transaction-container[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.transaction-container[_ngcontent-%COMP%]{-ms-overflow-style:none;scrollbar-width:none}.transaction-container-desktop[_ngcontent-%COMP%]{width:100%;height:calc(100% - 10px);display:flex;flex-direction:row;flex-wrap:wrap;gap:10px}.desktop-no-data-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:left;align-items:normal;margin:0 auto}.desktop-no-data-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-top:0;margin-bottom:10px}.margin-top[_ngcontent-%COMP%]{margin-top:55px}.item-card-desktop[_ngcontent-%COMP%]{width:calc((100% - 20px)/2);margin:0}"]})}}return e})();export{Ot as CroSportTransactionsV2Component};
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.