import{c as e,s,g as t,r as l,q as o,a6 as a,v as i,x as r,z as n,e as d,B as u,K as c,F as p,b0 as f,N as m,y as v,A as h,L as x,C as g,az as b,bc as w,b5 as j,bd as y}from"./base-lib.js?v=1761009159";import{a as _,b as k}from"./index48.js?v=1761009159";import{u as N,_ as S}from"./utils-lib.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./validator.js?v=1761009159";import"./index106.js?v=1761009159";import"./column.js?v=1761009159";import"./index112.js?v=1761009159";import"./index107.js?v=1761009159";import"./store3.js?v=1761009159";import"./store4.js?v=1761009159";import"./config.js?v=1761009159";import"./store5.js?v=1761009159";import"./hooks.js?v=1761009159";const H={class:"module-ui flex"},z={class:"flex flex-row items-end justify-between w-full"},L={class:"pb-[.6rem] text-base truncate block disk-list-title"},T={class:"text-base text-secondary font-400 font-alibaba-bold disk-list-desc"},q={class:"flex flex-col justify-center items-center h-full"},A=S(e({__name:"disk-main",props:{list:{default:()=>[]}},emits:["update:visible","openPopover","show","hide"],setup(e,{emit:S}){const{mainWidth:A}=N(),B=_();s(B);const C=t(()=>A.value<=1600?130:144),F=l(12),I=t(()=>F.value+4),K=l(null);let P=null;function W(e,s=120){P&&clearTimeout(P),P=setTimeout(()=>{K.value=e},s)}o(()=>{});const $=(e,s)=>{if(null!==K.value&&K.value!==s)return"var(--el-fill-color-dark)";const{range:t}=e.info;return Number(t)>90?"var(--el-color-danger)":Number(t)>80?"var(--el-color-warning)":"var(--el-color-primary)"},D=e=>C.value-e*I.value*2,E=e=>{const s=D(e);return{left:(C.value-s)/2+"px",top:(C.value-s)/2+"px"}};return o(()=>{B.init()}),a(B.$reset),(e,s)=>{const t=b,l=w,o=j,a=y;return i(),r("div",H,[n("div",z,[d(a,{span:24,class:"w-full"},{default:u(()=>[d(l,{span:16,xl:16},{default:u(()=>[n("div",{class:c(["h-full flex-2 gap-y-[10px]",2===e.list.length?"grid grid-cols-1 grid-rows-2":"grid grid-cols-2 grid-rows-2"])},[(i(!0),r(p,null,f(e.list,(e,l)=>(i(),m(t,{key:e.info.title+"-"+l,trigger:"hover",width:400,placement:"bottom-start",teleported:!1,"popper-class":"el-popover-shadow","hide-after":0,onShow:e=>W(l),onHide:s[0]||(s[0]=e=>W(null))},{reference:u(()=>{var t,o,a,d;return[n("div",{class:c(["flex flex-col justify-end cursor-pointer",{"is-inactive":null!==v(K)&&v(K)!==l}])},[n("span",L,h(e.info.title),1),n("span",{class:"text-subtitleLarge font-700 leading-[1.2] disk-list-range",style:x({color:$(e,l)})},h(e.info.range)+"%",5),n("span",T,["object"==typeof e.info.desc&&"disk"===e.info.type?(i(),r(p,{key:0},[n("span",{style:x({color:e.info.color})},[n("span",null,h(null==(t=e.info.desc)?void 0:t.used)+h(null==(o=e.info.desc)?void 0:o.used_unit),1)],4),s[2]||(s[2]=n("span",null,"/",-1)),n("span",null,h(null==(a=e.info.desc)?void 0:a.total)+h(null==(d=e.info.desc)?void 0:d.total_unit),1)],64)):(i(),r(p,{key:1},[g(h(e.info.desc),1)],64))])],2)]}),default:u(()=>[d(k,{item:e},null,8,["item"])]),_:2},1032,["onShow"]))),128))],2)]),_:1}),d(l,{span:8,xl:8},{default:u(()=>[n("div",q,[n("div",{class:"flex relative",style:x({width:v(C)+"px",height:v(C)+"px"})},[(i(!0),r(p,null,f(e.list,(e,l)=>(i(),m(t,{key:e.info.title,trigger:"hover",width:400,placement:"bottom-start",teleported:!1,"popper-class":"el-popover-shadow","show-after":100,"hide-after":0,transition:"none",onShow:e=>W(l),onHide:s[1]||(s[1]=e=>W(null))},{reference:u(()=>[n("div",{class:"flex absolute",style:x(E(l))},[d(o,{class:c(["cursor-pointer",{"mount-progress":"None"===e.data.path}]),type:"circle","show-text":!1,width:D(l),"stroke-width":v(F),color:$(e,l),percentage:e.info.range||0},null,8,["class","width","stroke-width","color","percentage"])],4)]),default:u(()=>[d(k,{item:e},null,8,["item"])]),_:2},1032,["onShow"]))),128))],4)])]),_:1})]),_:1})])])}}}),[["__scopeId","data-v-6ca127bd"]]);export{A as default};
