import{_ as e,u as s,b as t,a as o,f as n,g as a,h as c}from"./index-4c745ab9.js";import{$ as i,o as l,a as r,g as d,t as m,f as u,e as I,u as p,h as y,d as f,L as v,l as h,c as g,j as _,C,B as k,F as L,i as b}from"./vendor-edc0678f.js";import{l as S,a as q,L as w,b as B,f as P}from"./filters-692458bf.js";import{C as j}from"./currencyItem-8e423279.js";const T={class:"mainBgc"},x={class:"main_collect"},A={key:0,class:"main_header"},O={class:"left"},F={class:"main"},N={class:"arrows"},U={class:"arrows"},V={class:"arrows"},$=e({__name:"filter",props:{isOptional:{type:Boolean,default:!1},list:{type:Array,default:[]}},emits:["toSort"],setup(e,{emit:o}){const n=s(),a=e,c=[],f=o;let v=i({firstIcon:0,secondIcon:0,thirdIcon:0});const h=()=>{v.secondIcon=0,v.thirdIcon=0,0===v.firstIcon?(v.firstIcon=1,c.value=S(a.list,"coin")):1===v.firstIcon?(v.firstIcon=2,c.value=q(a.list,"coin")):2===v.firstIcon&&(v.firstIcon=0,c.value=a.list),f("toSort",c.value)},g=()=>{v.firstIcon=0,v.thirdIcon=0,0===v.secondIcon?(v.secondIcon=1,c.value=w(a.list,n.allCoinPriceInfo,"close")):1===v.secondIcon?(v.secondIcon=2,c.value=B(a.list,n.allCoinPriceInfo,"close")):2===v.secondIcon&&(v.secondIcon=0,c.value=a.list),f("toSort",c.value)},_=()=>{v.firstIcon=0,v.secondIcon=0,0===v.thirdIcon?(v.thirdIcon=1,c.value=w(a.list,n.allCoinPriceInfo,"change",1)):1===v.thirdIcon?(v.thirdIcon=2,c.value=B(a.list,n.allCoinPriceInfo,"change",1)):2===v.thirdIcon&&(v.thirdIcon=0,c.value=a.list),f("toSort",c.value)};return(s,o)=>{const n=t;return l(),r("div",null,[d("div",T,[d("div",x,[e.isOptional?(l(),r("div",A,[d("div",O,m(s._t18("quote_spot")),1),d("div",{class:"right",onClick:o[0]||(o[0]=e=>s.$router.push("/editOptional"))},[u(n,{name:"bianji"})])])):I("",!0),d("div",F,[d("div",{class:"mainItem",onClick:h},[d("div",null,m(s._t18("home_currencyName",["latcoin"])),1),d("div",N,[0===p(v).firstIcon?(l(),y(n,{key:0,name:"moren",class:"itemImg"})):I("",!0),1===p(v).firstIcon?(l(),y(n,{key:1,name:"gao",class:"itemImg"})):I("",!0),2===p(v).firstIcon?(l(),y(n,{key:2,name:"di",class:"itemImg"})):I("",!0)])]),d("div",{class:"mainItem",onClick:g},[d("div",null,m(s._t18("home_newPrice",["latcoin"])),1),d("div",U,[0===p(v).secondIcon?(l(),y(n,{key:0,name:"moren",class:"itemImg"})):I("",!0),1===p(v).secondIcon?(l(),y(n,{key:1,name:"gao",class:"itemImg"})):I("",!0),2===p(v).secondIcon?(l(),y(n,{key:2,name:"di",class:"itemImg"})):I("",!0)])]),d("div",{class:"mainItem",onClick:_},[d("div",null,m(s._t18("home_upDown",["latcoin"])),1),d("div",V,[0===p(v).thirdIcon?(l(),y(n,{key:0,name:"moren",class:"itemImg"})):I("",!0),1===p(v).thirdIcon?(l(),y(n,{key:1,name:"gao",class:"itemImg"})):I("",!0),2===p(v).thirdIcon?(l(),y(n,{key:2,name:"di",class:"itemImg"})):I("",!0)])])])])])])}}},[["__scopeId","data-v-d64fecfc"]]),D={class:"leftSide"},E={class:"leftSideHeader fw-bold"},H={class:"search"},z={class:"contain"},G=["placeholder"],J={class:"leftList"},K={key:0},M=e({__name:"leftSide",props:{headerList:{type:Array}},emits:["linkTo","close"],setup(e,{emit:i}){const I=o(),S=s(),q=f(),w=v(),B=e,T=h(""),x=h([]),A=g(()=>{let e=[];if(w.query.type)1==w.query.type?e=S.spotCoinList:2==w.query.type&&(e=S.contractCoinList);else if("/tradeU"==w.path)e=S.contractCoinList;else if("/tradeBB"==w.path)e=S.spotCoinList;else{let s=B.headerList[I.tradeFlag];"secondContract"==s.currentTab?e=S.secondContractCoinList:"spot"==s.currentTab?e=S.spotCoinList:"contract"==s.currentTab&&(e=S.contractCoinList)}return x.value=e,e}),O=i,F=e=>{x.value=e};return(e,s)=>{const o=t,i=c;return l(),r("div",D,[d("div",E,m(p(n)("quote")),1),d("div",H,[u(o,{name:"sousuo-h",class:"searchImg"}),d("div",z,[_(d("input",{type:"text","onUpdate:modelValue":s[0]||(s[0]=e=>k(T)?T.value=e:null),class:"inputSearch",placeholder:p(n)("search_currency"),onInput:s[1]||(s[1]=(...s)=>e.searchBtn&&e.searchBtn(...s))},null,40,G),[[C,p(T),void 0,{trim:!0}]])])]),u($,{list:A.value,onToSort:F},null,8,["list"]),d("div",J,[p(x).length?(l(),r("div",K,[(l(!0),r(L,null,b(p(P)(p(x),p(T)),(s,t)=>(l(),y(j,{key:t,currencyItem:s,showLeftImg:!!["fx"].includes(e._getConfig("_APP_ENV")),onClick:e=>(e=>{let s="";1==w.query.type?s="spot":2==w.query.type&&(s="contract"),w.query.type?q.replace("".concat(w.path,"?symbol=").concat(e.coin,"&type=").concat(w.query.type)):q.replace("".concat(w.path,"?symbol=").concat(e.coin)),a("event_tradeSymbolChange",{type:s,symbol:e.symbol,coin:e.coin,coinInfo:e}),O("close"),O("linkTo",e.coin)})(s)},null,8,["currencyItem","showLeftImg","onClick"]))),128))])):(l(),y(i,{key:1}))])])}}},[["__scopeId","data-v-d708c4bc"]]);export{M as L};
