System.register(["./vue-legacy.js?v=1763625242172","./page_layout-legacy.js?v=1763625242172","./public-legacy.js?v=1763625242172","./naive-legacy.js?v=1763625242172"],(function(t,e){"use strict";var n,i,s,o,a,c,u,l,r,d,_,k,p,y,g,f,m,v;return{setters:[t=>{n=t.Z,i=t.P,s=t.r,o=t.e,a=t.X,c=t.j,u=t.F},t=>{l=t.n,r=t.ao,d=t.ap,_=t.aq,k=t.ah,p=t.c},t=>{y=t.d,g=t.f,f=t.j,m=t.a},t=>{v=t.bH}],execute:function(){t("u",n("diskStore",(()=>{const{t:t}=i(),{loading:e,setLoading:n}=y(),D=s({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=s(!1),w=s([{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")]),c(" | "),a("span",{class:"text-primary cursor-pointer",onClick:()=>async function(t){await _(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(u,null,[a("div",{class:"mb-[.2rem]"},[e,c("% / "),l(t.used)]),a(v,{height:10,color:C(e),percentage:e,showIndicator:!1},null)])}},g({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()=>{m({title:t("Account.Disk.disk_810348-6"),content:t("Account.Disk.disk_810348-7",[e.mountpoint]),onConfirm:async()=>{await r({mountpoint:e.mountpoint}),A.value=!0,j()}})}}]})]),b=d(),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 k();if(p(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}})))}}}));
