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