import { ElementRef, OnChanges, OnInit } from '@angular/core'; import * as i0 from "@angular/core"; /** * Abstract base class for widget components that need to be lazily loaded * with SSR support. This class handles the common lifecycle patterns: * - Browser detection for SSR compatibility * - Lazy loading of widgets * - DOM manipulation (appending to element) * - Lifecycle coordination between loading, setup, and event listeners * * Derived components must implement: * - loadWidget(): Dynamic import and instantiation of the specific widget * - setupWebComponent(): Configure attributes and properties on the widget * - setupEventListeners(): Attach event listeners to the widget */ export declare abstract class BaseLazyWidgetComponent implements OnInit, OnChanges { protected elementRef: ElementRef; protected platformId: object; protected webComponent?: HTMLElement; constructor(elementRef: ElementRef, platformId: object); ngOnInit(): Promise; ngOnChanges(): void; /** * Load the widget module dynamically. This method should: * 1. Dynamically import the widget module * 2. Instantiate the widget * 3. Return the widget as an HTMLElement * 4. Handle errors appropriately * * @returns The instantiated widget element, or null if loading failed */ protected abstract loadWidget(): Promise; /** * Configure the web component by setting attributes and properties. * This is called after the widget is loaded and whenever inputs change. */ protected abstract setupWebComponent(): void; /** * Attach event listeners to the web component. * This is called once after the view is initialized. */ protected abstract setupEventListeners(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; }