import{_ as C,i as h,q as w,c as x,d as y,f as n,w as r,g as t,P as k,F as v,aJ as L,aK as V,K as f}from"./index-BV0H45HW.js";import{C as N}from"./index-BRaRnE7I.js";import"./index-BtHEBb5f.js";import{P}from"./index-C4X6YiFO.js";import{C as T}from"./index-B7M1Z4gS.js";const U={__name:"index",setup(F){const l=h.global.t;let o=w({show:!1,niList:[],selectedValues:[],loading:!0}),u;const d=()=>{o.show=!1;const s=o.selectedValues[0];p(s)},m=()=>{o.show=!1};async function p(s){try{const{code:e,message:a}=await V({ni:s});e===200?u=f({type:"success",message:l("toolsCenter.transferSuccess"),className:"bottom-notify",position:"bottom"}):u=f({type:"danger",message:a||l("toolsCenter.transferFailed"),className:"bottom-notify",position:"bottom"})}catch(e){console.error(l("toolsCenter.transferError"),e)}}async function g(){try{o.loading=!0;const{data:s}=await L();o.niList=s.filter(e=>e[1]&&!e[0].startsWith("br")&&!e[0].startsWith("veth")).map(e=>({text:`${e[0]} —— ${e[1]}`,value:e[0]}))}catch(s){console.log("error",s)}finally{o.loading=!1}}return g(),(s,e)=>{const a=T,_=P,b=k,i=N;return y(),x(v,null,[n(i,null,{default:r(()=>[n(a,{"is-link":"",title:t(l)("toolsCenter.cameraTransfer"),onClick:e[0]||(e[0]=c=>t(o).show=!0),label:t(l)("toolsCenter.cameraTransferLabel"),icon:"exchange"},null,8,["title","label"]),n(b,{show:t(o).show,"onUpdate:show":e[2]||(e[2]=c=>t(o).show=c),"destroy-on-close":"",round:"",position:"bottom"},{default:r(()=>[n(_,{"show-toolbar":"",title:t(l)("toolsCenter.selectTransferNic"),columns:t(o).niList,loading:t(o).loading,modelValue:t(o).selectedValues,"onUpdate:modelValue":e[1]||(e[1]=c=>t(o).selectedValues=c),"confirm-button-text":t(l)("toolsCenter.confirm"),"cancel-button-text":t(l)("toolsCenter.cancel"),onConfirm:d,onCancel:m},null,8,["title","columns","loading","modelValue","confirm-button-text","cancel-button-text"])]),_:1},8,["show"])]),_:1}),n(i,null,{default:r(()=>[n(a,{"is-link":"",title:t(l)("toolsCenter.logPackaging"),label:t(l)("toolsCenter.logPackagingLabel"),icon:"send-gift-o",to:"/tools/log"},null,8,["title","label"])]),_:1}),n(i,null,{default:r(()=>[n(a,{"is-link":"",title:t(l)("toolsCenter.versionUpdate"),label:t(l)("toolsCenter.versionUpdateLabel"),icon:"description-o",to:"/tools/upgrade"},null,8,["title","label"])]),_:1}),n(i,null,{default:r(()=>[n(a,{"is-link":"",title:"空间清理",label:"清理感知主机硬盘空间",icon:"brush-o",to:"/tools/clear"})]),_:1})],64)}}},q=C(U,[["__scopeId","data-v-ae06a3f5"]]);export{q as default};
