import{j as e,g as i,q as c,bN as m,A as t}from"./index-CzUo07dn.js";const d=({percentage:s,text:r})=>e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"p-meter u-no-margin--bottom",children:e.jsx("div",{style:{width:`${s}%`}})}),e.jsx("div",{className:"p-text--small u-no-margin--bottom",children:r})]}),x=({pool:s,hasMeterBar:r})=>{var u;const{data:a}=i({queryKey:[c.storage,s.name,c.resources],queryFn:()=>m(s.name)});if(!a)return e.jsx(e.Fragment,{children:(u=s.config)==null?void 0:u.size});const n=a.space.total,o=a.space.used||0;return r?e.jsx(d,{percentage:100/n*o||0,text:`${t(o)} of ${t(n)} used`}):`${t(o)} of ${t(n)} used`};export{d as M,x as S};
