"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),d=require("./unrefElement.js"),b=require("./useResizeObserver.js");function v(h,t={width:0,height:0},i={}){const{box:l="content-box"}=i,o=s.shallowRef(t.width),u=s.shallowRef(t.height);return b.useResizeObserver(h,([e])=>{const n=l==="border-box"?e.borderBoxSize:l==="content-box"?e.contentBoxSize:e.devicePixelContentBoxSize;n?(o.value=n.reduce((c,{inlineSize:r})=>c+r,0),u.value=n.reduce((c,{blockSize:r})=>c+r,0)):(o.value=e.contentRect.width,u.value=e.contentRect.height)},i),s.watch(()=>d.unrefElement(h),e=>{o.value=e?t.width:0,u.value=e?t.height:0}),{width:o,height:u}}exports.useElementSize=v;
