import{$ as e,a1 as s,q as a,a6 as i,a5 as t,o as n,a as o,g as l,t as c,u as r,F as d,i as u,j as m,v,h as f,e as p,L as b,l as y,c as _,x as h,f as w,w as C,n as g,S as I,a2 as L,a3 as k}from"./vendor-edc0678f.js";import{_ as j,f as q,i as F,k as R,A as S,o as x,h as H,a as O,u as D,b as E}from"./index-4c745ab9.js";import{C as P}from"./candlestick-f0918cab.js";import{m as T}from"./filters-692458bf.js";import{P as z}from"./public-7285197c.js";import{L as A}from"./leftSide-5270356f.js";import"./currencyItem-8e423279.js";const U={class:"dealListHeader"},N={class:"time"},B={class:"direction"},$={class:"price"},G={class:"count"},J={class:"time fw-num"},K={class:"price fw-num"},M={class:"count fw-num"},Q=j({__name:"dealList",props:{rows:{type:Number,default:20},coinInfo:{type:Object,default:()=>{}}},setup(b){const y=b,_=e({}),h=e([]),w=e([]),C=async e=>{let s=t.subscribe(x.TRADE,(s,a)=>{var i,t;if(a.symbol==e.coin&&(null==(t=null==(i=null==a?void 0:a.data)?void 0:i.tick)?void 0:t.data)){let e=a.data.tick.data;e.length>=y.rows?Object.assign(w,e):(w.splice(y.rows-e.length),w.unshift(...e))}});h.push(s)},g=s.debounce(e=>{let s=e.detail.coinInfo;Object.assign(_,s),C(_),w.length=0},200);return a(()=>{Object.assign(_,y.coinInfo),C(_),document.addEventListener("event_tradeSymbolChange",g)}),i(()=>{document.removeEventListener("event_tradeSymbolChange",g),h.forEach(e=>{e&&t.unsubscribe(e)})}),(e,s)=>{const a=H;return n(),o(d,null,[l("div",U,[l("div",N,c(r(q)("k_time")),1),l("div",B,c(r(q)("bb_direction")),1),l("div",$,c(r(q)("price"))+"("+c(y.coinInfo.baseCoinUpperCase)+")",1),l("div",G,c(r(q)("metastaking_bb_count"))+"("+c(2===y.coinInfo.customizeFlag?r(T)(y.coinInfo.showSymbol,"/USDT"):y.coinInfo.coinUpperCase)+") ",1)]),(n(!0),o(d,null,u(w,(s,a)=>(n(),o("div",{class:"dealItem",key:a},[l("div",J,c(e._timeFormat(s.ts,"HH:mm:ss",!0)),1),m(l("div",{class:"fall direction fw-bold"},c(r(q)("bb_sell1")),513),[[v,"sell"==s.direction]]),m(l("div",{class:"rise direction fw-bold"},c(r(q)("purchase")),513),[[v,"buy"==s.direction]]),l("div",K,c(r(F)(s.price)),1),l("div",M,c(r(R)(r(S)(s.amount,s.price))),1)]))),128)),0===w.length?(n(),f(a,{key:0})):p("",!0)],64)}}},[["__scopeId","data-v-5037218f"]]),V={class:"right"},W={class:"central"},X={class:"fw-bold"},Y={class:"top"},Z={class:"second"},ee={class:"secondLeft"},se={class:"secondRight"},ae={class:"secondItem"},ie={class:"itemL"},te={class:"itemR fw-num"},ne={class:"secondItem"},oe={class:"itemL"},le={class:"itemR fw-num"},ce={class:"secondItem"},re={class:"itemL"},de={class:"itemR fw-num"},ue=(e=>(L("data-v-d82f8327"),e=e(),k(),e))(()=>l("div",{class:"line"},null,-1)),me={class:"entrust"},ve={class:"entrustL"},fe={class:"entrustItem hightItem"},pe=j({__name:"detail",setup(e){const s=O(),t=D(),d=b(),u=y(!1),m=()=>{u.value=!0},v=()=>{u.value=!1};y(!1);const L=_(()=>{let e={};return e=2==Number(d.query.type)?d.query.symbol&&t.contractCoinList.filter(e=>e.coin===d.query.symbol)[0]||t.contractCoinList[0]:d.query.symbol&&t.spotCoinList.filter(e=>e.coin===d.query.symbol)[0]||t.spotCoinList[0],e}),k=_(()=>t.allCoinPriceInfo[L.value.coin]||{}),j=(e,s)=>{d.query.symbol=e,d.query.type=s||d.query.type,u.value=!1};return h(()=>{L.value.coin},(e,s)=>{t.setCurrentCoinList(s,"remove"),t.setCurrentCoinList(e)}),a(()=>{s.setTradeFlag(s.tradeFlag+s.isOption)}),i(()=>{t.setCurrentCoinList(L.value.coin,"remove")}),(e,s)=>{var a;const i=E,t=I;return n(),o("div",null,[w(t,null,{default:C(()=>[l("header",null,[w(i,{name:"jiantou-z",class:"leftImg",onClick:s[0]||(s[0]=s=>e._back())}),l("div",V,[l("div",W,[w(i,{name:"cebian17x14",class:"firLeftImg",onClick:m}),l("div",X,c(L.value.showSymbol),1)])])])]),_:1}),l("div",Y,[l("div",Z,[l("div",ee,[l("div",{class:g([e._isRFD(k.value.open,k.value.close,"buy","rise")," fw-num"])},c(k.value.close),3),l("div",{class:g([e._isRFD(k.value.openPrice,k.value.close,"buy","rise")," rfd-sign secondLeftB fw-num"])},c(null==(a=k.value)?void 0:a.priceChangePercent)+"% ",3)]),l("div",se,[l("div",ae,[l("div",ie,c(e._t18("k_hight",["ebc"])),1),l("div",te,c(r(F)(k.value.high24)),1)]),l("div",ne,[l("div",oe,c(e._t18("k_low",["ebc"])),1),l("div",le,c(r(F)(k.value.low24)),1)]),l("div",ce,[l("div",re,c(e._t18("k_quantity")),1),l("div",de,c(r(R)(k.value.volume24)),1)])])])]),L.value.coin?(n(),f(P,{key:0,coinInfo:L.value,type:"detail"},null,8,["coinInfo"])):p("",!0),ue,l("div",me,[l("div",ve,[l("div",fe,c(e._t18("real_time_transaction")),1)])]),L.value.coin?(n(),f(Q,{key:1,coinInfo:L.value,rows:20},null,8,["coinInfo"])):p("",!0),w(z,{show:r(u),direction:"left",onHandelClose:v,height:"100%",width:"80%",showHeader:!1,empty:!1},{emptyContentCustomize:C(()=>[w(A,{onLinkTo:j,onClose:v})]),_:1},8,["show"])])}}},[["__scopeId","data-v-d82f8327"]]);export{pe as default};
