"use client"
import{useEffect as o,useState as h}from"react";function w(){let[t,i]=h(null),[e,d]=h(null);return o(()=>{let n=()=>{window.matchMedia("(max-width: 640px)").matches?i("mobile"):window.matchMedia("(min-width: 641px) and (max-width: 1024px)").matches?i("tablet"):i("desktop"),d({width:window.innerWidth,height:window.innerHeight})};return n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}},[]),{device:t,width:e==null?void 0:e.width,height:e==null?void 0:e.height,isMobile:t==="mobile",isTablet:t==="tablet",isDesktop:t==="desktop"}}export{w as a};
