import{s as n,j as E}from"./store-F66kEjW2.js";import{m as d,b as A}from"./index-3qA-WN0K.js";import{I as C,J as L,_ as w}from"./index-EwE51S_X.js";import{F as N}from"./index-r6iTpmP6.js";import{d as B,a2 as V,r as j,K as h,aq as y,e as s,f as l,i as a,u as e,t as o,am as S,C as m,m as i,j as g,L as D,y as M,as as P}from"./vue-A59npLRR.js";import"./echarts-cxb9vJr1.js";import"./index-K8IR974I.js";import"./baTable-MdxYOkAk.js";import"./index-XALue448.js";const W={class:"install-done"},F={class:"install-done-title"},R={key:0},U={key:1},q={key:2},z={key:3},J={class:"install-tis-box"},K={key:0,class:"depend-box"},O={key:0,class:"depend-loading"},G={class:"depend-tis"},H={key:0},Q={class:"color-red"},X={key:0},Y={key:1},Z={key:1,class:"color-green"},$={key:2,class:"exec-fail color-red"},ee={key:1,class:"depend-tis"},te={key:2},oe={key:0,class:"install-tis-box text-align-center"},ne={class:"install-tis"},se={class:"dependency-installation-fail-tips"},le={class:"install-tis-box"},ae={class:"install-tis"},de={class:"install-tis-box"},ie={class:"install-form"},me=B({__name:"commonDone",setup(ce){const{t}=V(),c=C(),u=j({rebuild:0}),r=()=>{c.toggle(!0)},b=()=>{n.dialog.common=!1,u.rebuild==1&&(c.toggle(!0),c.addTaskPM("web-build",!1,"",p=>{p==L.Success&&c.toggle(!1)}))},I=()=>{P.confirm(t("module.Is the command that failed on the WEB terminal executed manually or in other ways successfully?"),t("Reminder"),{confirmButtonText:t("module.yes"),cancelButtonText:t("Cancel"),type:"warning"}).then(()=>{n.loading.common=!0,E(n.common.uid).then(()=>{A(),n.loading.common=!1,n.common.dependInstallState="success"})})};return(p,_)=>{const k=h("el-link"),v=h("el-button"),f=y("loading"),x=y("blur");return s(),l("div",W,[a("div",F,[e(n).common.moduleState==e(d).INSTALLED?(s(),l("span",R,o(e(t)("module.Congratulations, module installation is complete")),1)):e(n).common.moduleState==e(d).DISABLE?(s(),l("span",U,o(e(t)("module.Module is disabled")),1)):e(n).common.moduleState==e(d).DEPENDENT_WAIT_INSTALL?(s(),l("span",q,o(e(t)("module.Congratulations, the code of the module is ready")),1)):(s(),l("span",z,o(e(t)("module.Unknown state")),1))]),a("div",J,[e(n).common.dependInstallState!="none"?(s(),l("div",K,[e(n).common.dependInstallState=="executing"?S((s(),l("div",O,null,512)),[[f,!0]]):m("",!0),a("div",G,[e(n).common.dependInstallState=="executing"?(s(),l("div",H,[a("span",Q,o(e(t)("module.Do not refresh the page!")),1),e(n).common.moduleState==e(d).DISABLE?(s(),l("span",X,o(e(t)("module.New adjustment of dependency detected")),1)):e(n).common.moduleState==e(d).DEPENDENT_WAIT_INSTALL?(s(),l("span",Y,o(e(t)("module.This module adds new dependencies")),1)):m("",!0),i(", "),a("span",null,o(e(t)("module.The built-in terminal of the system is automatically installing these dependencies, please wait~")),1),a("span",{class:"span-a",onClick:r},o(e(t)("module.View progress")),1)])):m("",!0),e(n).common.dependInstallState=="success"?(s(),l("div",Z,o(e(t)("module.Dependency installation completed~")),1)):m("",!0),e(n).common.dependInstallState=="fail"?(s(),l("div",$,[i(o(e(t)("module.Dependency installation fail 1"))+" ",1),a("span",{class:"span-a",onClick:r},o(e(t)("module.Dependency installation fail 2")),1),i(" "+o(e(t)("module.Dependency installation fail 3"))+" ",1),g(k,{target:"_blank",type:"primary",href:"https://wonderful-code.gitee.io/guide/install/manualOperation.html"},{default:D(()=>[i(o(e(t)("module.Dependency installation fail 4")),1)]),_:1})])):m("",!0)])])):e(n).common.moduleState==e(d).INSTALLED?(s(),l("div",ee,o(e(t)("module.This module does not add new dependencies")),1)):(s(),l("div",te,o(e(t)("module.There is no adjustment for system dependency")),1))]),e(n).common.dependInstallState=="fail"?(s(),l("div",oe,[a("div",ne,[i(o(e(t)("module.Dependency installation fail 5"))+" ",1),a("span",{class:"span-a",onClick:I},o(e(t)("module.Dependency installation fail 6")),1),i(" "+o(e(t)("module.Dependency installation fail 7"))+" ",1),a("span",se,o(e(t)("module.dependency-installation-fail-tips")),1)])])):m("",!0),a("div",le,[a("div",ae,o(e(t)("module.please"))+o(e(n).common.moduleState==e(d).DISABLE?"":e(t)("module.After installation 1"))+o(e(t)("module.Manually clean up the system and browser cache")),1)]),a("div",de,[a("div",ie,[g(N,{label:(e(n).common.moduleState==e(d).DISABLE?"":e(t)("module.After installation 2"))+e(t)("module.Automatically execute reissue command?"),modelValue:u.rebuild,"onUpdate:modelValue":_[0]||(_[0]=T=>u.rebuild=T),type:"radio",data:{content:{0:e(t)("module.no"),1:e(t)("module.yes")},childrenAttr:{border:!0}}},null,8,["label","modelValue","data"])])]),S((s(),M(v,{class:"install-done-button",disabled:!(e(n).common.dependInstallState!="executing"||e(n).common.moduleState==e(d).INSTALLED),size:"large",type:"primary",onClick:b},{default:D(()=>[i(o(e(n).common.moduleState==e(d).DISABLE?e(t)("Complete"):e(t)("module.End of installation")),1)]),_:1},8,["disabled"])),[[x],[f,e(n).loading.common]])])}}}),De=w(me,[["__scopeId","data-v-3007219f"]]);export{De as default};