import { DeepMaybeObservable } from '@usels/core'; import { ConfigurableDocumentOrShadowRoot } from '../../shared/configurable.mjs'; import { MaybeEventTarget } from '../../types.mjs'; import '@legendapp/state'; type UseOnElementRemovalOptions = ConfigurableDocumentOrShadowRoot; /** * Framework-agnostic element-removal detector. * * Tracks the target element reactively (via `observe` on `get(target)`), then * watches the document/root for childList mutations. When a removed node is or * contains the tracked element, `callback` fires and the tracked reference is * cleared so the next mount → removal cycle fires again. */ declare function createOnElementRemoval(target: MaybeEventTarget, callback: (mutations: MutationRecord[]) => void, options?: DeepMaybeObservable): void; export { type UseOnElementRemovalOptions, createOnElementRemoval };