System.register(["./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785","./index-legacy-DQdImDha.js?v=1773287522785","./useTableColumns-legacy-DP6ypvsQ.js?v=1773287522785","./useLoading-legacy-IiShPpjk.js?v=1773287522785","./useRestart-legacy-Cael4e2a.js?v=1773287522785","./naive-ui-legacy-BW82sq8q.js?v=1773287522785"],(function(t,e){"use strict";var n,s,i,o,a,u,c,l,r,d,_,k,p,y,g,f,m,v;return{setters:[t=>{n=t.a4,s=t.R,i=t.r,o=t.e,a=t.a0,u=t.j,c=t.F},t=>{l=t.C,r=t.a5,d=t.Z,_=t.i,k=t.h,p=t.a6},t=>{y=t.u},t=>{g=t.u},t=>{f=t.u},t=>{m=t.ab,v=t.u}],execute:function(){t("u",n("diskStore",(()=>{const{t:t}=s(),{loading:e,setLoading:n}=g(),D=i({device:"",mountpoint:"",fstype:"",total:0,used:0,free:0,used_percent:0,inodes_total:0,inodes_used:0,inodes_free:0,inodes_used_percent:0,is_group_quota:!1,is_user_quota:!1,is_default:!1,account_allocate:0,account_percent:0}),h=o({data:[]}),A=i(!1),w=i([{title:t("Account.Disk.disk_810348-0"),key:"mountpoint"},{title:t("Account.Disk.disk_810348-1"),key:"device"},{title:t("Account.Disk.disk_810348-9"),key:"is_group_quota",render:e=>e.is_user_quota?a("span",null,[t("Account.Disk.disk_810348-10")]):a("div",null,[a("span",{class:"text-warning"},[t("Account.Disk.disk_810348-11")]),u(" | "),a("span",{class:"text-primary cursor-pointer",onClick:()=>async function(t){await r(t),j()}(e.mountpoint)},[t("Account.Disk.disk_810348-12")])])},{title:t("Account.Disk.disk_810348-2"),key:"total",width:120,render:t=>l(t.total)},{title:t("Account.Disk.disk_810348-3"),key:"used",render:t=>{const e=Math.round(t.used_percent);return a(c,null,[a("div",{class:"mb-[.2rem]"},[e,u("% / "),l(t.used)]),a(m,{height:10,color:C(e),percentage:e,showIndicator:!1},null)])}},y({title:t("Public.Table.Action"),align:"right",width:200,options:e=>[{label:t("Account.Disk.disk_810348-4"),show:e.is_default&&!A.value,disabled:!0},{label:"重启服务",show:e.is_default&&A.value,type:"warning",onClick:async()=>f()},{label:t("Account.Disk.disk_810348-5"),show:!e.is_default,onClick:async()=>{k({title:t("Account.Disk.disk_810348-6"),content:t("Account.Disk.disk_810348-7",[e.mountpoint]),onConfirm:async()=>{await p({mountpoint:e.mountpoint}),A.value=!0,j()}})}}]})]),b=v(),C=t=>{const e=Math.round(t);return e>80?b.value.errorColor:e>60?b.value.warningColor:b.value.primaryColor},j=async()=>{try{n(!0);const t=await d();if(_(t)){h.data=t.message;const e=t.message.find((t=>t.is_default));if(e){const t={...e};t.account_percent=Math.round(t.account_allocate/t.total*100),D.value=t}}}finally{n(!1)}};return{loading:e,DefaultDisk:D,init:j,columns:w,table:h,diskColor:C}})))}}}));
