import{u as m,b as _}from"./index-EFlNRwTR.js";import{a9 as f,_ as h}from"./index-fNs72j9w.js";import{B as w,a as v,I as n,C as i,D as c,G as a,U as t,H as u,P as g,Z as k,V as I,O as $}from"./vue-DweYBrEc.js";import"./index-CLJRKiC0.js";import"./terminal-B3G_hUkG.js";const C={class:"upload-install"},y={class:"tips"},B={class:"title"},S={class:"tip-item"},U={class:"tip-item"},b={class:"tip-item"},D={class:"el-upload__text"},T=w({__name:"uploadInstall",setup(V){const s=v({uploadState:"wait-file"}),p=e=>{if(!e||!e.raw)return;let d=new FormData;d.append("file",e.raw),f(d,{},!0).then(o=>{o.code==1&&m(o.data.file.url).then(l=>{s.uploadState="success",_(l.data.info.uid,0,!1,!!l.data.info.update)}).catch(()=>{s.uploadState="wait-file"})})};return(e,d)=>{const o=n("Icon"),l=n("el-result"),r=n("el-upload");return i(),c("div",C,[a("div",y,[a("div",B,t(e.$t("module.Local upload warning")),1),a("div",S,"1. "+t(e.$t("module.The module can modify and add system files")),1),a("div",U,"2. "+t(e.$t("module.The module can execute sql commands and codes")),1),a("div",b,"3. "+t(e.$t("module.The module can install new front and rear dependencies")),1)]),u(r,{class:"upload-module","show-file-list":!1,accept:".zip",drag:"","auto-upload":!1,onChange:p},{default:g(()=>[s.uploadState=="wait-file"?(i(),c(k,{key:0},[u(o,{size:"50px",color:"#909399",name:"el-icon-UploadFilled"}),a("div",D,[I(t(e.$t("module.Drag the module package file here"))+" ",1),a("em",null,t(e.$t("module.Click me to upload")),1)])],64)):(i(),$(l,{key:1,icon:"success","sub-title":e.$t("module.Uploaded, installation is about to start, please wait")},null,8,["sub-title"]))]),_:1})])}}}),q=h(T,[["__scopeId","data-v-534ee522"]]);export{q as default};
