import { VegaSlimmer } from '../../vega-slimmer/vega-slimmer-core'; import { Nullable } from '../../types/general'; /** * Abstract base slimmer with shared backdrop state. */ export declare abstract class SharedBackdropManager extends VegaSlimmer { private static backdropRef; private static consumers; private static visibilityIntents; private static consumerCount; private static visibilityIntentCount; /** * Register this consumer and ensure a shared backdrop exists. */ connectedCallback(): void; /** * Unregister this consumer and remove shared backdrop when last consumer disconnects. */ disconnectedCallback(): void; /** * Get current backdrop element. * * @returns {Nullable} Backdrop element or null. */ getBackdrop(): Nullable; /** * Get current connected consumer count. * * @returns {number} Consumer count. */ getConsumerCount(): number; /** * Clear all shared state and remove backdrop. */ clear(): void; /** * Set visibility intent for this slimmer consumer. * * @param {boolean} visible - Desired visibility. */ protected setVisibilityIntent(visible: boolean): void; /** * Whether this manager type handles backdrop existence lazily (on demand). * Override and return `true` in derived classes that create/remove the backdrop * per visibility cycle instead of at connectedCallback. * * @returns {boolean} False by default — backdrop is created eagerly at connect time. */ protected usesLazyBackdrop(): boolean; /** * Ensure a backdrop exists for this subclass and return it. * * @returns {HTMLVegaBackdropElement} Shared backdrop element. */ private ensureBackdrop; /** * Remove the shared backdrop for this subclass from the DOM. */ private removeBackdrop; /** * Sync shared backdrop `visible` based on current visibility intents. */ private syncVisibility; /** * Handles visibility sync for manager types that opt into lazy backdrop lifecycle. * When `shouldShow` is true the backdrop is created (if needed) and made visible. * When `shouldShow` is false the backdrop is removed from the DOM. * * @param {boolean} shouldShow - Whether the backdrop should be visible. */ private syncLazyBackdrop; /** * Reset stale static shared state when the tracked backdrop is no longer in the DOM. */ private resetStaleSharedState; /** * Create a backdrop element for the specific subclass use case. * * @param {Document} doc - The document reference. * @returns {HTMLVegaBackdropElement} The created backdrop element. */ protected abstract createBackdrop(doc: Document): HTMLVegaBackdropElement; }