import{j as n,S as a,C as i,h as f,r as u}from"./vendor-ClLR6ncd.js";import{u as l}from"./usePrevious-BP64N3hu.js";const m=2e3;function g(e,s){const t=l(e),[c,o]=u.useState(!1),r=u.useRef();return u.useEffect(()=>{!t&&e&&(r.current&&clearTimeout(r.current),o(!0),r.current=setTimeout(()=>{o(!1)},s))},[t,e,s]),u.useEffect(()=>()=>{r.current&&clearTimeout(r.current)},[]),c}function T({isFetching:e,entityKind:s}){const t=g(e,m);return!e&&!t?null:n.jsxs(a,{direction:"row",alignItems:"center",spacing:1,children:[n.jsx(i,{size:24}),n.jsxs(f,{children:["Fetching ",s,"..."]})]})}export{T as S};
