"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("vue"),b=require("./_configurable.js"),l=require("./tryOnScopeDispose.js"),a=require("./unrefElement.js"),f=require("./useSupported.js");function O(i,u,c={}){const{window:r=b.defaultWindow,...p}=c;let e;const s=f.useSupported(()=>r&&"ResizeObserver"in r),t=()=>{e&&(e.disconnect(),e=void 0)},d=v.watch(()=>a.unrefElement(i),n=>{t(),s.value&&r&&n&&(e=new ResizeObserver(u),e.observe(n,p))},{immediate:!0,flush:"post"}),o=()=>{t(),d()};return l.tryOnScopeDispose(o),{isSupported:s,stop:o}}exports.useResizeObserver=O;
