import{r as o}from"./index-BX768Frx.js";const e={base:0,sm:640,md:768,lg:1024,xl:1280,"2xl":1536,"3xl":1920};function m(){const[a,l]=o.useState("base");o.useEffect(()=>{const i=Object.entries(e).filter(([t])=>t!=="base").map(([t,n])=>({bp:t,query:window.matchMedia(`(min-width: ${n}px)`)})),r=()=>{const t=i.filter(({query:n})=>n.matches).map(({bp:n})=>n);l(t[t.length-1]??"base")};return r(),i.forEach(({query:t})=>t.addEventListener("change",r)),()=>{i.forEach(({query:t})=>t.removeEventListener("change",r))}},[]);const s=e[a];return{breakpoint:a,isSmDown:s<e.sm,isMdDown:s<e.md,isLgDown:s<e.lg,isXlDown:s<e.xl,is2xlDown:s<e["2xl"],is3xlDown:s<e["3xl"],isSmUp:s>=e.sm,isMdUp:s>=e.md,isLgUp:s>=e.lg,isXlUp:s>=e.xl,is2xlUp:s>=e["2xl"],is3xlUp:s>=e["3xl"]}}export{m as u};
