import{u as B,s as o}from"./store-F66kEjW2.js";import{s as N,c as $,o as _,a as A}from"./index-3qA-WN0K.js";import{d as I,a2 as P,K as f,aq as v,e as l,f as r,j as g,L as u,u as e,N as U,t as n,i as s,m as d,F as k,y,am as m,C as b}from"./vue-A59npLRR.js";import{_ as D}from"./index-EwE51S_X.js";import"./echarts-cxb9vJr1.js";const O={key:0,class:"order-info"},z={class:"order-info-item"},E={class:"order-info-item"},F={class:"order-info-item"},M={class:"order-info-item"},j={key:0,class:"order-price"},q={key:1,class:"order-price"},K={class:"order-footer"},L={class:"order-agreement"},S={href:"https://doc.buildadmin.com/guide/other/appendix/templateAgreement.html",target:"_blank",rel:"noopener noreferrer"},T={class:"order-info-buttons"},W=I({__name:"buy",setup(G){const{t}=P(),h=B();return(H,a)=>{const C=f("el-alert"),V=f("el-checkbox"),c=f("el-button"),w=f("el-dialog"),p=v("blur"),x=v("loading");return l(),r("div",null,[g(w,{modelValue:e(o).dialog.buy,"onUpdate:modelValue":a[6]||(a[6]=i=>e(o).dialog.buy=i),class:"buy-dialog",title:e(t)("module.Confirm order info"),top:"20vh",width:"28%"},{default:u(()=>[m((l(),r("div",null,[g(C,{title:e(t)("module.Module installation warning"),type:"error",center:!0,closable:!1},null,8,["title"]),e(U)(e(o).buy.info)?b("",!0):(l(),r("div",O,[s("div",z,n(e(t)("module.Order title"))+":"+n(e(o).buy.info.title),1),s("div",E,n(e(t)("module.Order No"))+":"+n(e(o).buy.info.sn),1),s("div",F,n(e(t)("module.Purchase user"))+":"+n(e(N)(e(h))),1),s("div",M,[d(n(e(t)("module.Order price"))+": ",1),e(o).buy.info.purchased?(l(),r("span",q,n(e(t)("module.Purchased, can be installed directly")),1)):(l(),r("span",j,n(e($)(e(o).buy.info.amount,e(o).buy.info.pay.money?1:0)),1))]),s("div",K,[s("div",L,[g(V,{modelValue:e(o).buy.agreement,"onUpdate:modelValue":a[0]||(a[0]=i=>e(o).buy.agreement=i),size:"small",label:""},null,8,["modelValue"]),s("span",null,[d(n(e(t)("module.Understand and agree"))+"《 ",1),s("a",S,n(e(t)("module.Module purchase and use agreement")),1),d(" 》 ")])]),s("div",T,[e(o).buy.info.purchased?m((l(),y(c,{key:1,loading:e(o).loading.common,onClick:a[5]||(a[5]=i=>e(A)(e(o).buy.info.uid,e(o).buy.info.id)),type:"warning"},{default:u(()=>[d(n(e(t)("module.Install now")),1)]),_:1},8,["loading"])),[[p]]):(l(),r(k,{key:0},[e(o).buy.info.pay.score?m((l(),y(c,{key:0,loading:e(o).loading.common,onClick:a[1]||(a[1]=i=>e(_)("score")),type:"warning"},{default:u(()=>[d(n(e(t)("module.Point payment")),1)]),_:1},8,["loading"])),[[p]]):b("",!0),e(o).buy.info.pay.money?(l(),r(k,{key:1},[m((l(),y(c,{loading:e(o).loading.common,onClick:a[2]||(a[2]=i=>e(_)("balance")),type:"warning"},{default:u(()=>[d(n(e(t)("module.Balance payment")),1)]),_:1},8,["loading"])),[[p]]),m((l(),y(c,{loading:e(o).loading.common,onClick:a[3]||(a[3]=i=>e(_)("wx")),type:"success"},{default:u(()=>[d(n(e(t)("module.Wechat payment")),1)]),_:1},8,["loading"])),[[p]]),m((l(),y(c,{loading:e(o).loading.common,onClick:a[4]||(a[4]=i=>e(_)("zfb")),type:"primary"},{default:u(()=>[d(n(e(t)("module.Alipay payment")),1)]),_:1},8,["loading"])),[[p]])],64)):b("",!0)],64))])])]))])),[[x,e(o).loading.buy]])]),_:1},8,["modelValue","title"])])}}}),Z=D(W,[["__scopeId","data-v-314ecbc7"]]);export{Z as default};