import{fq as C,hR as f,C as _,dL as T,u as R,q as k,r as u,N as E,S as p,j as a,hS as H,dK as m,hT as P}from"./index-CXyQ5sGC.js";import{S}from"./jackpot-DJCixh5g.js";import"./lodash-CQGrF3PQ.js";const A=`https://rgs-je-clientapi.${C(window.location.host)}/api/Client/GetPlayerJackPotHistory`,D="51",O="990",w=({settings:h})=>{const{title:i,limit:o}={...f,...h},{site_id:l}=_.app,{currency:{rounding:e}}=T(),c=R(),g=k(),[s,t]=u.useState({data:[],loading:!0,error:null}),y=250;u.useEffect(()=>{E.post(A,{PartnerId:l,HasAll:!0,Count:o,Offset:1,SourceId:S.Casino,JackPotDefinitionId:D},{headers:{"Content-Type":"application/json"}}).then(n=>{const{Result:I,HasError:x,ErrorDescription:N}=n.data;if(x)t({data:[],loading:!1,error:N||p});else{const j=I.map(r=>({PlayerId:r.PlayerId,Amount:r.Amount,CurrencyId:r.CurrencyId}));t({data:j,loading:!1,error:null})}}).catch(n=>{t({data:[],loading:!1,error:n.message||p})})},[o,l]);const d=()=>g.push(`/casino/slots/${O}/ortak`);return s.loading?a.jsx(H,{}):s.error?null:a.jsx(a.Fragment,{children:s.data.length>0?a.jsxs("div",{className:"harmonyJackpotWidget",children:[i?a.jsxs("span",{className:"harmony-jackpot-widget-title ellipsis",children:[i," ",c("Winners")]}):null,a.jsx("div",{className:"running-line-wrapper withShadows",children:a.jsxs("div",{className:"running-line",style:{width:`${s.data.length*2*y}px`,animationDuration:`${s.data.length*4}s`},children:[s.data.map(n=>a.jsxs("div",{className:"running-line-item",onClick:d,children:[a.jsxs("span",{className:"running-line-item-label",children:["ID: ",n.PlayerId," - "]}),a.jsxs("span",{className:"running-line-item-value",children:[m(n.Amount,e).toFixed(e)," ",n.CurrencyId]})]},`${n.PlayerId}_initial`)),s.data.map(n=>a.jsxs("div",{className:"running-line-item",onClick:d,children:[a.jsxs("span",{className:"running-line-item-label",children:["ID: ",n.PlayerId," - "]}),a.jsxs("span",{className:"running-line-item-value",children:[m(n.Amount,e).toFixed(e)," ",n.CurrencyId]})]},`${n.PlayerId}_second`))]})})]}):a.jsx("p",{className:"empty-b-text-v-bc",children:c(P)})})};export{w as default};