import { ReactiveElement } from "./reactive-element.js"; //#region src/destroy-mixin.d.ts interface Destroyable { readonly destroyed: boolean; destroy(): void; destroyCallback(): void; } /** * Mixin that adds a deferred destruction lifecycle to a `ReactiveElement`. * * On disconnect, schedules destruction after two animation frames. * If the element reconnects before the frames fire (e.g. DOM shuffling, * framework reconciliation), the `isConnected` check prevents destruction. * * The `keep-alive` attribute prevents automatic destruction entirely — * call `destroy()` manually when done. * * Subclasses override `destroyCallback()` (calling `super.destroyCallback()`) * to release heavy resources like stores or imperative APIs. * * Mirrors `addController`/`removeController` to track controllers * (needed because `ReactiveElement.#controllers` is hard-private), * calls `hostDestroyed()` on all tracked controllers in `destroyCallback`, * and guards `performUpdate()` so no updates run after destruction. */ declare function DestroyMixin ReactiveElement>(SuperClass: Base): Base & (new (...args: any[]) => Destroyable); //#endregion export { DestroyMixin, Destroyable }; //# sourceMappingURL=destroy-mixin.d.ts.map