"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../../utils/deviceType.js"),t=require("react"),u=o=>{const{getDeviceType:e,getHeight:i}=o||{},[w,s]=t.useState(()=>({width:typeof window<"u"?window.innerWidth:0,...i&&{height:typeof window<"u"?window.innerHeight:0},...e&&{deviceType:typeof window<"u"?d.default():"desktop"}}));return t.useEffect(()=>{const n=()=>{s(r=>({...r,width:window.innerWidth,...i&&{height:window.innerHeight},...e&&{deviceType:d.default()}}))};return typeof window<"u"&&(window.addEventListener("resize",n),n()),()=>{typeof window<"u"&&window.removeEventListener("resize",n)}},[i,e]),w};exports.useWindowDimensionsAndDevice=u;
