const e=require("./unrefElement.js"),t=require("./useResizeObserver.js");let n=require("vue");function r(r,i={width:0,height:0},a={}){let{box:o=`content-box`}=a,s=(0,n.shallowRef)(i.width),c=(0,n.shallowRef)(i.height);return t.useResizeObserver(r,([e])=>{let t=o===`border-box`?e.borderBoxSize:o===`content-box`?e.contentBoxSize:e.devicePixelContentBoxSize;t?(s.value=t.reduce((e,{inlineSize:t})=>e+t,0),c.value=t.reduce((e,{blockSize:t})=>e+t,0)):(s.value=e.contentRect.width,c.value=e.contentRect.height)},a),(0,n.watch)(()=>e.unrefElement(r),e=>{s.value=e?i.width:0,c.value=e?i.height:0}),{width:s,height:c}}exports.useElementSize=r;