import{N as e,L as a,d as s,$ as t,l as c,a1 as i,y as n,c as l,o,a as r,f as d,g as u,u as p,t as _,w as m,F as g,j as y,C as v,B as h,e as f,i as b,aD as P}from"./vendor-edc0678f.js";/* empty css              */import{q as k,_ as x,f as N,i as q,aI as V,V as A,a as E,Q as w,ac as U,at as j,aJ as C,w as R,c as I}from"./index-4c745ab9.js";const L={class:"erweima"},D={class:"applyMes"},F={class:"address"},M={class:"top"},T={class:"bottom"},z={class:"fw-num"},B={class:"num"},J={class:"top"},Q={class:"bottom"},S=["placeholder"],$={class:"uploadImg"},G={class:"top"},H={class:"bottom"},K={key:0,class:"tip-list"},O={key:1,class:"tip-list"},W={key:1,class:"tip-list"},X={class:"tip"},Y=x({__name:"recharge-apply",setup(x){const{_toast:Y}=k(),{_copy:Z}=(()=>{const{_toast:a}=k(),{toClipboard:s}=e();return{_copy:async e=>{try{await s("".concat(e)),a("copy_success")}catch(t){a("copy_error")}}}})(),ee=a();s();const ae="".concat(N("recharge",["latcoin"])," ").concat(ee.query.type),se={iconRight:[{iconName:"jilu",clickTo:"/recharge-order"}]},te=t([{content:N("recharge_tip1")},{content:N("recharge_tip2")},{content:N("recharge_tip3")},{content:N("recharge_tip4")}]),ce=t([{content:N("recharge_tip5")}]),ie=c(""),ne=c([]),le=e=>{e.status="uploading";let a=new FormData;a.append("file",e.file),j(a).then(a=>{"200"==(a=a.data).code?(e.res=a.data.url,e.status="success"):(n(a.msg),ne.value=[])})},oe=i.debounce(()=>{if(!["coinsexpto"].includes(__config._APP_ENV)&&""==ie.value)return void Y("recharge_num");let e="";if(["coinsexpto"].includes(__config._APP_ENV));else{if(0==ne.value.length)return void Y("recharge_img");const a=ne.value[0]||{};if(e=a.res,"success"!=a.status)return void Y("recharge_img_load")}let a={};a=["coinsexpto"].includes(__config._APP_ENV)?{amount:0,type:ee.query.type,coin:ee.query.coin,address:de.value}:{amount:q(ie.value),type:ee.query.type,coin:ee.query.coin,filePath:e||"",address:de.value},V(a).then(e=>{"200"==e.code?(Y("recharge_success"),ie.value="",setTimeout(()=>{A("/recharge-order")},500)):n(e.msg)})},500),re=E(),de=l(()=>{let e=re.getRechargeList.find(e=>e.coinName==ee.query.type);return null==e?void 0:e.coinAddress}),ue=l(()=>{let e=re.getRechargeList.find(e=>e.coinName==ee.query.type);return(null==e?void 0:e.qrcodeUrl)||""});return(e,a)=>{const s=R,t=I,c=P;return o(),r(g,null,[d(s,{currentName:ae,cuttentRight:se}),u("div",L,[d(w,{address:p(de),qrcodeUrl:p(ue)},null,8,["address","qrcodeUrl"])]),u("div",D,[u("div",F,[u("p",M,_(p(N)("recharge_address",["bitmake"]))+"("+_(p(ee).query.type)+")",1),u("div",T,[d(U,{data:p(de),fontSize:"16px"},{copyMsg:m(()=>[u("span",z,_(p(de)),1)]),_:1},8,["data"])])]),["coinsexpto","rxce","gmtoin","aams","bitbyex","gmmoin"].includes(p(C)("_APP_ENV"))?f("",!0):(o(),r(g,{key:0},[u("div",B,[u("p",J,_(p(N)("recharge_number",["bitmake"])),1),u("div",Q,[y(u("input",{type:"number",placeholder:p(N)("recharge_input"),class:"ff-num","onUpdate:modelValue":a[0]||(a[0]=e=>h(ie)?ie.value=e:null)},null,8,S),[[v,p(ie)]])])]),u("div",$,[u("p",G,_(p(N)("recharge_imgUpload",["bitmake"])),1),d(c,{"after-read":le,"max-count":"1",modelValue:p(ne),"onUpdate:modelValue":a[1]||(a[1]=e=>h(ne)?ne.value=e:null)},{default:m(()=>[u("div",H,[d(t,{filePath:"defi/delete.png",name:"delete",class:"img"})])]),_:1},8,["modelValue"])])],64))]),["coinsexpto","rxce","bitbyex","gmmoin"].includes(p(C)("_APP_ENV"))?(o(),r(g,{key:0},[u("div",{class:"btn",onClick:a[2]||(a[2]=e=>p(Z)(p(de)))},[u("p",null,_(p(N)("copy")),1)]),["bitbyex"].includes(p(C)("_APP_ENV"))?(o(),r("div",K,[(o(!0),r(g,null,b(ce,(e,a)=>(o(),r("div",{class:"tip",key:a},_(e.content),1))),128))])):(o(),r("div",O,[(o(!0),r(g,null,b(te,(e,a)=>(o(),r("div",{class:"tip",key:a},_(a+1)+"."+_(e.content),1))),128))]))],64)):["gmtoin"].includes(p(C)("_APP_ENV"))?(o(),r("div",W,[u("div",X,_(p(N)("account_balance_info")),1)])):["aams","gmmoin"].includes(p(C)("_APP_ENV"))?(o(),r(g,{key:2},[],64)):(o(),r("div",{key:3,class:"btn",onClick:a[3]||(a[3]=(...e)=>p(oe)&&p(oe)(...e))},[u("p",null,_(p(N)("recharge_require",["bitmake"])),1)]))],64)}}},[["__scopeId","data-v-663eff59"]]);export{Y as default};
