import{_ as e,q as a,e as l,P as s,w as i,f as t,i as n}from"./index-4c745ab9.js";import{L as u,d,$ as c,an as o,c as r,l as p,o as m,a as v,f as _,u as f,g,m as h,t as y,j as b,C as x,B as P,F as j,a2 as k,a3 as C,y as A}from"./vendor-edc0678f.js";import{u as N}from"./useFreeze-8df38998.js";import{p as M}from"./index-cd1e483a.js";const O={class:"content1"},S={class:"jine"},U=(e=>(k("data-v-82790a3b"),e=e(),C(),e))(()=>g("span",null,"(USDT)",-1)),q={class:"ipt"},D=["placeholder"],F={class:"shouyi"},I={class:"ff-num"},L={class:"ff-num"},T={class:"ff-num"},V={class:"content2"},z={class:"left"},B={class:"right ff-num"},E={class:"left"},$={key:0,class:"right ff-num"},w={key:1,class:"right ff-num"},G=e({__name:"pledgeDetail",setup(e){const{_isFreeze:k}=N(),{_toast:C}=a(),G=u(),J=d(),R=c(JSON.parse(decodeURI(G.query.data))),W=l(),{asset:H}=o(W),K=r(()=>H.value.filter((e,a)=>"1"==e.type&&"usdt"==e.symbol)[0].availableAmount),Q=p("");let X=()=>{Q.value=K.value};const Y=()=>{let e={planId:R.id,amount:Q.value};""==Q.value||Q.value>R.limitMax||Q.value<R.limitMin?C("pledge_buy_error"):M(e).then(e=>{"200"==e.code?(C("Purchase_successful"),setTimeout(()=>{J.push("/pledge/pledgeOrder")},500)):A(e.msg)})},Z=()=>{s.includes(__config._APP_ENV)?k(s)&&Y():Y()};return(e,a)=>{const l=i;return m(),v(j,null,[_(l,{currentName:f(t)("host.detail")},null,8,["currentName"]),g("div",O,[g("div",S,[g("div",null,[g("div",null,[h(y(f(t)("pledge_Subscription_amount"))+" ",1),U]),g("p",{onClick:a[0]||(a[0]=a=>e.$router.push("/recharge"))},y(f(t)("pledge_deposit_funds")),1)]),g("div",q,[b(g("input",{"onUpdate:modelValue":a[1]||(a[1]=e=>P(Q)?Q.value=e:null),type:"number",placeholder:"".concat(f(t)("pledge_purchasing_price",["aams"])),class:"ff-num"},null,8,D),[[x,f(Q)]]),g("p",{onClick:a[2]||(a[2]=e=>f(X)())},y(f(t)("pledge_maximum")),1)])]),g("div",F,[g("div",null,[g("p",null,y(f(t)("pledge_quota")),1),g("p",I,y(f(R).limitMin)+"~"+y(f(R).limitMax),1)]),g("div",null,[g("p",null,y(f(t)("host_dailyrateof_return")),1),g("p",L,y(f(R).minOdds)+"%~"+y(f(R).maxOdds)+"%",1)]),g("div",null,[g("p",null,y(f(t)("pledge_cycle"))+"("+y(f(t)("pledge_day"))+")",1),g("p",T,y(f(R).days),1)])])]),g("div",V,[g("div",null,[g("div",null,[g("div",z,y(f(t)("pledge_Available_Balance")),1),g("div",B,y(f(n)(f(K)))+" USDT",1)]),g("div",null,[g("div",E,y(f(t)("pledge_Available_times")),1),["dev"].includes(e._getConfig("_APP_ENV"))?(m(),v("div",$,y("".concat(f(R).buyPurchase,"/").concat(f(R).timeLimit)),1)):(m(),v("div",w,y("".concat(f(R).timeLimit)),1))])]),g("div",{class:"btn",onClick:Z},y(f(t)("btnConfirm",["bitmake"])),1)])],64)}}},[["__scopeId","data-v-82790a3b"]]);export{G as default};
