import{s as l,h as $}from"./index-EFlNRwTR.js";import{B as y,I as s,X as V,C as c,D as r,G as f,u as i,Z as C,U as u,H as n,P as a,W as b,_ as k,O as D,V as B}from"./vue-DweYBrEc.js";import{_ as F}from"./index-fNs72j9w.js";import"./index-CLJRKiC0.js";import"./terminal-B3G_hUkG.js";const N={class:"install-conflict"},U={class:"install-title"},I={class:"install-title"},E={key:0},H=y({__name:"installConflict",setup(T){const w=()=>{l.loading.common=!0;let e={},d={};for(const o in l.common.fileConflict)e[l.common.fileConflict[o].oldFile]=l.common.fileConflict[o].solution;for(const o in l.common.dependConflict)typeof d[l.common.dependConflict[o].env]>"u"&&(d[l.common.dependConflict[o].env]={}),d[l.common.dependConflict[o].env][l.common.dependConflict[o].depend]=l.common.dependConflict[o].solution;$(l.common.uid,0,"",!1,{dependConflict:d,fileConflict:e,conflictHandle:!0})};return(e,d)=>{const o=s("el-table-column"),m=s("el-option"),_=s("el-select"),v=s("el-table"),g=s("el-button"),h=V("blur");return c(),r("div",null,[f("div",N,[i(l).common.fileConflict.length>0?(c(),r(C,{key:0},[f("div",U,u(e.$t("module.File conflict")),1),n(v,{data:i(l).common.fileConflict,stripe:"",border:"",style:{width:"100%"}},{default:a(()=>[n(o,{prop:"newFile",label:e.$t("module.new file")},null,8,["label"]),n(o,{prop:"oldFile",label:e.$t("module.Existing files")},null,8,["label"]),n(o,{prop:"solution",width:"200",label:e.$t("module.Treatment scheme"),align:"center"},{default:a(t=>[n(_,{modelValue:t.row.solution,"onUpdate:modelValue":p=>t.row.solution=p},{default:a(()=>[n(m,{label:e.$t("module.Backup and overwrite existing files"),value:"cover"},null,8,["label"]),n(m,{label:e.$t("module.Discard new file"),value:"discard"},null,8,["label"])]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:1},8,["label"])]),_:1},8,["data"])],64)):b("",!0),i(l).common.dependConflict.length>0?(c(),r(C,{key:1},[f("div",I,u(e.$t("module.Dependency conflict")),1),n(v,{data:i(l).common.dependConflict,stripe:"",border:"",style:{width:"100%"}},{default:a(()=>[n(o,{prop:"env",label:e.$t("module.environment")},{default:a(t=>[t.row.env?(c(),r("span",E,u(e.$t("module.env "+t.row.env)),1)):b("",!0)]),_:1},8,["label"]),n(o,{prop:"newDepend",label:e.$t("module.New dependency")},null,8,["label"]),n(o,{prop:"oldDepend",label:e.$t("module.Existing dependencies")},null,8,["label"]),n(o,{prop:"solution",width:"200",label:e.$t("module.Treatment scheme"),align:"center"},{default:a(t=>[n(_,{modelValue:t.row.solution,"onUpdate:modelValue":p=>t.row.solution=p},{default:a(()=>[n(m,{label:e.$t("module.Overwrite existing dependencies"),value:"cover"},null,8,["label"]),n(m,{label:e.$t("module.Do not use new dependencies"),value:"discard"},null,8,["label"])]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:1},8,["label"])]),_:1},8,["data"])],64)):b("",!0)]),k((c(),D(g,{class:"install-done-button",loading:i(l).loading.common,disabled:i(l).loading.common,size:"large",type:"primary",onClick:w},{default:a(()=>[B(u(e.$t("Confirm")),1)]),_:1},8,["loading","disabled"])),[[h]])])}}}),W=F(H,[["__scopeId","data-v-2ee2b8d8"]]);export{W as default};
