import{x as B,T as b,_ as S}from"./index-fNs72j9w.js";import{s as a,f as z,g as D,h as F}from"./index-EFlNRwTR.js";import{B as M,aH as w,I as _,C as s,D as c,H as i,u as e,P as d,G as u,O as p,U as m,V as h}from"./vue-DweYBrEc.js";import"./index-CLJRKiC0.js";import"./terminal-B3G_hUkG.js";const N={key:0},T={class:"available-system-version"},j={class:"available-system-version-text"},A={key:1},E={key:0},H={key:0,class:"renewal-text"},L={key:1},O={key:2},$={class:"renewal"},G={class:"renewal-text"},P=M({__name:"commonSelectVersion",setup(R){const{t}=B.useI18n(),k=w(o=>(o=o.replace(/^v/,""),o=o.split(".").map(l=>l.padStart(2,"0")).join(""),parseInt(o))),x=o=>{const l=a.installedModule.find(r=>r.uid==a.common.uid);return!!(l&&(o=o.replace(/^v/,""),l.version=l.version.replace(/^v/,""),o==l.version))},v=w(o=>k(a.sysVersion)>parseInt(o)),g=(o,l,r)=>{a.dialog.common=!0,a.common.dialogTitle=t("module.Install"),D("download"),a.dialog.baAccount=!1,a.dialog.buy=!1,a.dialog.goodsInfo=!1,F(o,l,r,a.common.update)};return(o,l)=>{const r=_("el-table-column"),f=_("Icon"),y=_("el-button"),C=_("el-tooltip"),I=_("el-table");return s(),c("div",null,[i(I,{data:e(a).common.versions,class:"w100",stripe:""},{default:d(()=>[i(r,{property:"version",align:"center",label:e(t)("module.Version")},null,8,["label"]),i(r,{property:"short_describe","show-overflow-tooltip":!0,align:"center",label:e(t)("module.Description")},null,8,["label"]),i(r,{property:"available_system_version_text",align:"center",label:e(t)("module.Available system version")},{default:d(n=>[n.row.available_system_version&&e(a).sysVersion?(s(),c("div",N,[u("div",T,[e(v)(n.row.available_system_version)?(s(),p(f,{key:0,name:"el-icon-CircleCheckFilled",color:"var(--el-color-success)",size:"14"})):(s(),p(f,{key:1,name:"el-icon-CircleCloseFilled",size:"14",color:"var(--el-color-danger)"})),u("div",j,m(n.row.available_system_version_text),1)])])):(s(),c("div",A,"-"))]),_:1},8,["label"]),i(r,{property:"createtime_text",align:"center",label:e(t)("Create time")},null,8,["label"]),i(r,{label:e(t)("module.Install"),align:"center","min-width":140},{default:d(n=>[n.row.downloadable?(s(),c("div",E,[x(n.row.version)?(s(),c("div",H,m(e(t)("module.Current installed version")),1)):e(v)(n.row.available_system_version)?(s(),c("div",O,[i(y,{type:"primary",onClick:V=>g(n.row.uid,n.row.order_id,n.row.version)},{default:d(()=>[h(m(e(t)("module.Click to install")),1)]),_:2},1032,["onClick"])])):(s(),c("div",L,m(e(t)("module.Insufficient system version")),1))])):(s(),p(C,{key:1,effect:"dark",content:e(t)("module.Order expiration time",{expiration_time:e(b)(n.row.order_expiration_time),create_time:e(b)(n.row.createtime)}),placement:"top"},{default:d(()=>[u("div",$,[u("div",G,m(e(t)("module.Versions released beyond the authorization period")),1),i(y,{onClick:l[0]||(l[0]=V=>e(z)(!0)),type:"danger"},{default:d(()=>[h(m(e(t)("module.Renewal")),1)]),_:1})])]),_:2},1032,["content"]))]),_:1},8,["label"])]),_:1},8,["data"])])}}}),W=S(P,[["__scopeId","data-v-5678fe15"]]);export{W as default};
