import { LitElement } from 'lit'; import { Replacement } from '../localization'; /** * Base class for all AC components. */ export declare class EnchantedAcBaseElement extends LitElement { id: string; localization?: Map; /** * The sessionStorage key used to control shadow root mode. Can be overridden by subclasses. */ static shadowRootModeKey: string; private static _shadowRootOptions; protected static useOpenShadowRoot(): ShadowRootMode; /** * Build shadow root options dynamically so subclasses can override shadowRootModeKey * and respect sessionStorage changes at runtime. * * Each class (base and subclasses) gets its own cached _shadowRootOptions property * created via Object.defineProperty. This ensures: * 1. Each subclass respects its own shadowRootModeKey override * 2. The same object reference is returned on subsequent calls, preventing Lit from * thinking the configuration changed and re-registering event listeners * * @returns The cached ShadowRootInit object for this specific class */ protected static getShadowRootOptions(): ShadowRootInit; /** * Lit reads this property when defining custom elements. * * Using a getter (instead of a static property) allows us to dynamically determine * the shadow root mode based on sessionStorage at class definition time, while still * caching the result via getShadowRootOptions() to maintain object reference stability. */ static get shadowRootOptions(): ShadowRootInit; /** * Setter to handle external assignments to shadowRootOptions (e.g., from test tooling). * The getter is authoritative, so assignments are ignored. */ static set shadowRootOptions(_value: ShadowRootInit); constructor(); disconnectedCallback(): void; connectedCallback(): void; getMessage(templateKey: string, _replacements?: Replacement[]): string; }