import{_ as a,r as e,f as t,E as s,o as n,c as l,d as r,a as i,W as m,t as d,p as u,v as o,e as c,x as p,az as y,S as v,bn as x}from"./index-BhrLSE9x.js";import{O as f,C as w,_ as b,R as g}from"./CryptoReceivingAddress-BD3EbcaD.js";import{U as h}from"./UploadRechargeReceipt-BhhjSEEH.js";import{q as j,h as T,i as C}from"./el-statistic-Cg8urxXc.js";import"./el-overlay-C6ddMYf0.js";import"./vnode-dKTAikk0.js";import"./el-divider-DTwLgUWJ.js";import"./browser-BPaJHl0c.js";import"./raf-ClpXBvnZ.js";const I={class:"recharge-order-details-container my-mine-text-money flex flex-col gap-[16px]"},k={class:"my-mine-card"},_={class:"my-mine-card-header flex !flex-row justify-between items-center"},q={class:"my-mine-card-body"},D={class:"my-mine-card-title my-mine-card-title-lg flex flex-row justify-between items-center"},R={class:"amount"},A={class:"flex flex-row justify-between gap-[16px]"},O=a({__name:"RechargeOrderDetails",props:{data:{type:Object,default:()=>({})}},emits:["close"],setup(a,{emit:O}){const U=a,S=O,z=p(),E=y(),M=e(!1),W=e(0),B=e({}),F=e(-10),G=()=>{z.query.id?E.go(-1):S("close")},H=async()=>{const a=await T({id:B.value.id});if(1!==a.code)return s.error(a.messages);await K(),F.value=3},J=()=>{M.value=!1,F.value=1,K()},K=async()=>{const a=z.query.id||U.data.id,e=z.query.paymentType||U.data.paymentType,t=z.query.paymentId||U.data.paymentId,n=await C({id:a,paymentType:e,paymentId:t,url:""});if(1!==n.code)return s.error(n.message);B.value=n.data,F.value=n.data.status,(a=>{const e=new Date(a).getTime(),t=(new Date).getTime();W.value=Math.abs(Date.now()-e-t)})(n.data.expireTime,n.data.createTime)},L=()=>{K()};t((()=>{K(),P()}));const N=e({}),P=async()=>{const a=await j();if(1!==a.code)return s.error(a.message);U.data&&(N.value=a.data.find((a=>U.data.paymentId===a.paymentId)))};return(a,e)=>(n(),l("div",I,[r("div",k,[r("div",_,[e[4]||(e[4]=r("div",{class:"my-mine-card-title my-mine-card-title-xl"},"订单详情",-1)),r("button",{class:"my-mine-btn-primary text-[16px] flex flex-row justify-center items-center gap-[4px] w-[102px] h-[40px] !p-[0]",onClick:G},[i(v,{name:"recharge-backIcon"}),e[3]||(e[3]=m(" 返回 "))])]),r("div",q,[i(f,{status:F.value,countdown:W.value},null,8,["status","countdown"]),r("div",D,[r("div",R,[e[5]||(e[5]=m(" 充值金额 ")),r("p",null,d(B.value.rechargeAmount),1)]),r("div",A,[r("button",{class:"my-mine-btn-primary my-mine-text-primary my-mine-btn-disable w-[64px] h-[32px]",onClick:L},"刷新"),r("button",{class:"my-mine-btn-primary my-mine-text-primary my-mine-btn-disable w-[64px] h-[32px]",onClick:e[0]||(e[0]=a=>u(x)(B.value.rechargeAmount))}," 复制 ")])])])]),5!==B.value.paymentType&&4!==B.value.paymentType||0===B.value.status||3===B.value.status||4===B.value.status||1===B.value.status||5===B.value.status||6===B.value.status?c("",!0):(n(),o(w,{key:0,data:B.value},null,8,["data"])),5!==B.value.paymentType&&4!==B.value.paymentType?(n(),o(b,{key:1,data:B.value},null,8,["data"])):c("",!0),i(g,{onUpload:e[1]||(e[1]=a=>M.value=!0),onCancel:H,status:F.value,data:B.value,payment:N.value},null,8,["status","data","payment"]),i(h,{data:B.value,show:M.value,onClose:e[2]||(e[2]=a=>M.value=!1),onSuccess:J},null,8,["data","show"])]))}},[["__scopeId","data-v-d0217ca5"]]);export{O as default};
