1import{_ as te}from"./CyYlfiN_.js";import{a as se}from"./CJDtCwkY.js";import{_ as re,a as oe,b as ie,c as de}from"./CBzIN9QS.js";import{k as le,g as ne,f as m}from"./CIOTHYTh.js";import{l as ce,m as b,H as i,R as r,a5 as n,a2 as h,T as _e,Q as o,a1 as A,u as t,P as f,V as Y,W as j,S as v,a0 as d,X as u,c as me}from"./DN_WM4KY.js";import{b as he}from"./fxfSeeQm.js";import{u as ue}from"./CR4r-HcW.js";import{_ as ye}from"./gkBUBijV.js";import"./COIwbfrD.js";import"./DlUQ5BVx.js";import"./D6Q7oHDz.js";import"./CeUl0gya.js";import"./DYPm9wxX.js";import"./Cogt-808.js";import"./DCLeI_JX.js";import"./GlyBzLK3.js";import"./bVqg5OHR.js";const be={class:"dashboard-trade-history"},fe={class:"dashboard__card-inner"},ve={key:1},pe={key:0,class:"dashboard-trade-history__filter-block"},ge={key:0,class:"dashboard-trade-history__item-symbol dashboard-trade-history__item-value"},we={key:0,class:"dashboard-trade-history__item-value dashboard-trade-history__item-value--small",style:{opacity:".8"}};const ke={key:1,class:"dashboard-trade-history__item-value"},Ve={key:2,class:"dashboard-trade-history__item-value dashboard-trade-history__item-value--profit"},Pe={key:0,style:{color:"#fff",opacity:".6"}},Fe={class:"dashboard-trade-history__card-block"},Ne={class:"dashboard-trade-history__item-value"},Be={class:"dashboard-trade-history__item-symbol dashboard-trade-history__item-value"},Te={key:0,class:"dashboard-trade-history__item-value",style:{opacity:".8"}};const Se={class:"dashboard-trade-history__item-value dashboard-trade-history__item-value--small dashboard-trade-history__item-value--regular"},De={class:"dashboard-trade-history__item-value dashboard-trade-history__item-value--profit"},He={key:0,style:{color:"#fff",opacity:".6","font-size":"8px"}},Ce={class:"dashboard-trade-history__card-block"},Me={class:"dashboard-trade-history__item-value"},$e={class:"dashboard-trade-history__item-value"},Le={class:"dashboard-trade-history__item-value"},xe={class:"dashboard-trade-history__item-value"},aa=ce({__name:"trade-history",setup(ze){const l=ue(),c=b(()=>l.state),_=b({get(){return c.value.pagination},set(s){l.updatePagination(s)}});function E(s){return s!=null&&s.includes("BTC")?new URL("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='11.556'%20height='16'%20viewBox='0%200%2011.556%2016'%3e%3cdefs%3e%3cclipPath%20id='clip-path'%3e%3crect%20id='Rectangle_238'%20data-name='Rectangle%20238'%20width='11.556'%20height='16'%20fill='%23fff'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20id='Group_475'%20data-name='Group%20475'%20transform='translate(0%200)'%3e%3cg%20id='Group_474'%20data-name='Group%20474'%20transform='translate(0%200)'%20clip-path='url(%23clip-path)'%3e%3cpath%20id='Path_17736'%20data-name='Path%2017736'%20d='M10.683,4.924C10.515,3.176,9.007,2.59,7.1,2.423V0H5.627V2.36c-.388,0-.784.008-1.178.015V0H2.974V2.423c-.319.006-.633.012-.939.012V2.428H0V4S1.09,3.983,1.072,4a.762.762,0,0,1,.849.646V7.41a1.167,1.167,0,0,1,.156.01H1.921v3.868a.522.522,0,0,1-.555.489c.019.016-1.072,0-1.072,0L0,13.539h1.92c.357,0,.709.006,1.054.009V16H4.449V13.574c.405.008.8.011,1.179.011V16H7.1V13.553c2.48-.142,4.216-.767,4.432-3.1a2.512,2.512,0,0,0-2.116-3.05A2.284,2.284,0,0,0,10.683,4.924ZM8.619,10.166c0,1.832-3.136,1.623-4.135,1.625V8.542c1,0,4.135-.288,4.135,1.623M7.933,5.583c0,1.667-2.616,1.472-3.449,1.472V4.109c.833,0,3.449-.264,3.449,1.474'%20transform='translate(0%200)'%20fill='%23fff'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",import.meta.url).href:new URL("data:image/svg+xml,%3csvg%20id='Layer_x0020_1'%20xmlns='http://www.w3.org/2000/svg'%20width='11.336'%20height='18.461'%20viewBox='0%200%2011.336%2018.461'%3e%3cg%20id='_1421394342400'%3e%3cg%20id='Group_476'%20data-name='Group%20476'%3e%3cpath%20id='Path_17737'%20data-name='Path%2017737'%20d='M383.624,0,383.5.421V12.628l.124.124L389.29,9.4Z'%20transform='translate(-377.957)'%20fill='%23a7a7a7'/%3e%3cpath%20id='Path_17738'%20data-name='Path%2017738'%20d='M5.666,0,0,9.4l5.666,3.349V0Z'%20fill='%23fff'/%3e%3cpath%20id='Path_17739'%20data-name='Path%2017739'%20d='M387.31,728.238l-.07.085v4.348l.07.2,5.67-7.985Z'%20transform='translate(-381.643%2
10-714.413)'%20fill='%23bcbcbc'/%3e%3cpath%20id='Path_17740'%20data-name='Path%2017740'%20d='M5.666,732.875v-4.637L0,724.89Z'%20transform='translate(0%20-714.413)'%20fill='%23fff'/%3e%3cpath%20id='Path_17741'%20data-name='Path%2017741'%20d='M392.07,478.255l5.666-3.349-5.666-2.576Z'%20transform='translate(-386.404%20-465.504)'%20fill='%23747474'/%3e%3cpath%20id='Path_17742'%20data-name='Path%2017742'%20d='M0,474.906l5.666,3.349V472.33Z'%20transform='translate(0%20-465.504)'%20fill='%23cfcfcf'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",import.meta.url).href}const{width:W}=he(),y=b(()=>W.value<1024),I=le();function Q({pagination:s}){l.updatePagination({..._.value,...s}),l.fetchTradeHistory()}return l.fetchTradeHistory(),(s,p)=>{const X=te,J=se,g=ye,K=ie,O=oe,ee=re,ae=de;return o(),i("section",be,[r("div",fe,[n(_e,{name:"skeleton",mode:"out-in"},{default:h(()=>{var w,k,V,P,F,N;return[t(l).isLoading?(o(),A(X,{key:0})):(o(),i("div",ve,[(k=(w=t(I))==null?void 0:w.connectedAccountsList)!=null&&k.length?(o(),i("div",pe,[(o(!0),i(Y,null,j((V=t(c))==null?void 0:V.filters,e=>(o(),i("div",{key:e.id,class:"dashboard-trade-history__filter-block-item"},[n(J,{filter:e,"after-update-func":()=>{var a;return(a=t(l))==null?void 0:a.fetchTradeHistory({shouldResetPagination:!0})},onUpdate:a=>t(l).updateFilterValue({name:e.name,value:a})},null,8,["filter","after-update-func","onUpdate"])]))),128))])):f("",!0),n(ee,{ref:"table",pagination:t(_),grid:t(y),"grid-header":!0,rows:(P=t(c))==null?void 0:P.rows,columns:t(y)?(F=t(c))==null?void 0:F.columns.filter(e=>e.name!=="dateTime"&&e.name!=="symbol"&&e.name!=="side").sort((e,a)=>e.sort-a.sort):(N=t(c))==null?void 0:N.columns,filter:t(c).filters,onRequest:Q},{body:h(e=>[n(O,{class:"dashboard-trade-history__item",props:e},{default:h(()=>[(o(!0),i(Y,null,j(e==null?void 0:e.cols,a=>(o(),A(K,{key:a.name,alt:a.value,props:e,class:"dashboard-trade-history__item-cell"},{default:h(()=>[a.name==="symbol"?(o(),i("div",ge,[r("div",{class:"dashboard-trade-history__item-symbol-icon-block",style:u(`background: ${a.value.backgroundColor}`)},[n(g,{src:a.value.icon,style:u(a.value.iconStyles)},null,8,["src","style"])],4),(o(),i("p",we,d(a.value.label),1))])):a.name==="side"?(o(),i("div",ke,[r("p",{class:v(["dashboard-trade-history__item-side",`dashboard-trade-history__item-side--${a.value.colorTheme}`])},d(t(y)?a.value.label[0]:a.value.label),3)])):a.name==="realizedProfit"?(o(),i("div",Ve,[r("p",{style:u({color:a.value.color})},d(a.value.label),5),a.value.append?(o(),i("p",Pe," Â "+d(a.value.append),1)):f("",!0)])):(o(),i("p",{key:3,class:v(["custom-table__body-item-label dashboard-trade-history__item-value",{"dashboard-trade-history__item-value--small":a.name==="dateTime"}])},d(a.value),3))]),_:2},1032,["alt","props"]))),128))]),_:2},1032,["props"])]),item:h(e=>{var a,B,T,S,D,H,C,M,$,L,x,z,R,U,Z,G,q;return[(o(),i("div",{key:((a=e.row)==null?void 0:a.id)??((B=e.row)==null?void 0:B.uuid)??`${((T=e.row)==null?void 0:T.dateTime)??""}-${((S=e.row)==null?void 0:S.symbol)??""}-${((D=e.row)==null?void 0:D.side)??""}-${((H=e.row)==null?void 0:H.entryPrice)??""}`,class:"dashboard-trade-history__card"},[r("div",Fe,[r("div",Ne,[r("p",{class:v(["dashboard-trade-history__item-side",`dashboard-trade-history__item-side--${((C=e==null?void 0:e.row)==null?void 0:C.side.toLowerCase())==="sell"?"red":"green"}`])},d(e.row.side[0]),3)]),r("div",Be,[r("div",{class:"dashboard-trade-history__item-symbol-icon-block",style:u(`background: ${e.row.symbol.includes("BTC")?"#F7931A":"#9D5ADF"}`)},[n(g,{src:E(e.row.symbol),style:{width:"7px",height:"9px"}},null,8,["src"])],4),(o(),i("p",Te,d(e.row.currency?e.row.symbol+e.row.currency:e.row.symbol),1))]),r("p",Se,d(("useDayjs"in s?s.useDayjs:t(ne))()((M=e.row)==null?void 0:M.dateTime).format("YYYY-MM-DD HH:mm:ss")),1),r("div",De,[($=e.row)!=null&&$.account_currency?(o(),i("p",He," Â "+d((L=e.row)==null?void 0:L.account_currency),1)):f("",!0),r("p",{style:u({color:((x=e.row)==null?void 0:x.realizedProfit)===0?"#fff":((z=e.row)==null?void 0:z.realizedProfit)>0?"#77FFDF":"#FF5068",fontSize:"14px"})},d(("useNumberFormat"in s?s.useNumberFormat:t(m))((R=e.row)==null?void 0:R.realizedProfit,"0,0.00")),5)])]),r("div",Ce,[r("p",Me,d(("useNumberFormat"in s?s.useNumberFormat:t(m))((U=e.row)==null?void 0:U.entryPrice,"0,0.00")),1
1),r("p",$e,d(("useNumberFormat"in s?s.useNumberFormat:t(m))((Z=e.row)==null?void 0:Z.exitPrice,"0,0.00")),1),r("p",Le,d(("useNumberFormat"in s?s.useNumberFormat:t(m))((G=e.row)==null?void 0:G.amount,"0,0.00")),1),r("p",xe,d(("useNumberFormat"in s?s.useNumberFormat:t(m))((q=e.row)==null?void 0:q.commission,"0,0.00")),1)])]))]}),_:1},8,["pagination","grid","rows","columns","filter"]),n(ae,{modelValue:t(_),"onUpdate:modelValue":p[0]||(p[0]=e=>me(_)?_.value=e:null),onUpdate:t(l).fetchTradeHistory},null,8,["modelValue","onUpdate"])]))]}),_:1})])])}}});export{aa as default};
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.