import{o as a,a as e,h as l,e as s,g as t,t as o,l as c,q as u,f as n,u as d,w as i,k as r,y as v,aB as m,F as f,i as h,a2 as g,a3 as p,aC as _}from"./vendor-edc0678f.js";import{_ as b,c as y,f as L,q,a as w,u as x,w as C,ap as k,aq as I,j as E,b as j}from"./index-4c745ab9.js";import{C as N}from"./currentcyNum-ee931864.js";const S={class:"editLeft"},O={class:"leftNames"},V={class:"fw-bold"},B=b({__name:"editLeft",props:{showLeftImg:{type:Boolean,default:!0},data:{type:Object,default:()=>{}}},setup:c=>(u,n)=>{const d=y;return a(),e("div",S,[c.showLeftImg?(a(),l(d,{key:0,filePath:c.data.logo,class:"leftImg"},null,8,["filePath"])):s("",!0),t("div",O,[t("div",V,o(c.data.showSymbol),1)])])}},[["__scopeId","data-v-849a61e5"]]),F={class:"columnFlex"},P={class:"currencyList"},T={class:"item"},A=(a=>(g("data-v-2b4c19b0"),a=a(),p(),a))(()=>t("div",{class:"placeholder"},null,-1)),G={class:"editCon"},R={class:"right"},U=b({__name:"editOptional",setup(l){const s={name:L("quote_add")},g=c(!1),{_toast:p}=q();w().setTradeStatus(Number(-1));const b=x();c("");const y=c([]),S=c(null),O=c(!1),V=()=>{O.value=!O.value,S.value.toggleAll(O.value)},U=c([]),z=()=>{k(Q.value).then(a=>{"200"==a.code?(p("quote_addSuccess"),K(),b.getCoinList()):(v(a.msg),K())})},D=()=>{g.value&&I(J.value).then(a=>{"200"==a.code?(p("quote_addSuccess"),K(),b.getCoinList()):(v(a.msg),K())})},H=c(),J=c(),K=async()=>{var a;const e=await E();if(200==e.code){H.value=e.data;let l=[];null==(a=U.value)||a.forEach((a,e)=>{var s;null==(s=H.value)||s.forEach((e,s)=>{a.coin===e.coin&&l.push(a.coin)})}),y.value=l}};u(()=>{K(),U.value=b.secondContractCoinList});const M=a=>{g.value=a.length>0;let e=Object.values(a),l=[];e.forEach((a,e)=>{var s;null==(s=U.value)||s.forEach((e,s)=>{if(a===e.coin){let a={};a.coin=e.coin,a.icon=e.logo,l.push(a)}})}),Q.value=l;let s="";e.forEach((a,e)=>{var l;null==(l=H.value)||l.forEach((e,l)=>{a===e.coin&&(s=s+e.id+",")}),J.value=s})},Q=c([]);return(l,c)=>{const u=j,v=_,p=m;return a(),e("div",F,[n(C,{currentName:d(L)("quote_edit"),cuttentRight:s,onLinkTo:z},null,8,["currentName"]),t("div",P,[n(p,{modelValue:y.value,"onUpdate:modelValue":c[0]||(c[0]=a=>y.value=a),shape:"square",onChange:M,ref_key:"checkboxGroup",ref:S},{default:i(()=>[(a(!0),e(f,null,h(U.value,(l,s)=>(a(),e("div",{class:"itemEvery",key:s},[t("div",T,[n(B,{data:l},null,8,["data"]),n(N,{data:l},null,8,["data"]),n(v,{name:l.coin},{icon:i(a=>[n(u,{class:"rightImg",name:a.checked?"gou-x":"gou-w"},null,8,["name"])]),_:2},1032,["name"])])]))),128))]),_:1},8,["modelValue"])]),A,t("div",G,[t("div",{class:"left",onClick:D},[n(u,{name:g.value?"sanchu16x18-x":"sanchu16x18-w",class:"chooseImg"},null,8,["name"]),t("div",{style:r({color:g.value?"#17ac74":"#bcbcbc",marginLeft:"10px"})},o(d(L)("quote_del")),5)]),t("div",R,[n(u,{name:O.value?"gou-x":"gou-w",class:"chooseImg",onClick:V},null,8,["name"]),t("div",null,o(d(L)("quote_all")),1)])])])}}},[["__scopeId","data-v-2b4c19b0"]]);export{U as default};
