import { ControlApi } from '../api/ControlApi'; import { BaseValidatedClass } from '../BaseValidatedClass'; import { ImmutableHtmlNode } from '../modifications/ImmutableNode'; export declare class Control extends BaseValidatedClass { /** Provides access to editor functionalities specific to this UI control instance. */ api: ControlApi; /** List of methods that must be implemented by subclasses */ private static readonly REQUIRED_METHODS; constructor(); /** * @description Allows to determine if control should be visible or hidden in control panel. * Called on every node modification. */ isVisible(_node: ImmutableHtmlNode): boolean; /** * Optional hook called when the control is initially rendered. * Use this for setup tasks like attaching event listeners to the control's template elements. */ onRender(): void; /** * Optional cleanup hook called when the control is being destroyed. * Use this to remove event listeners or perform other cleanup tasks. */ onDestroy(): void; /** * Gets the unique identifier for this UI control type. * This ID is used for registration and referencing. * @returns A unique string ID. */ getId(): string; /** * Gets the HTML template string that defines the structure of this UI control, * typically containing one or more UI elements (e.g., ``, ``). * @returns An HTML string. */ getTemplate(): string; /** * Hook called whenever the underlying template node associated with this control's context * (e.g., the selected block's HTMLnode) is updated. * Implement this to react to changes in the block/structure and update the control's UI elements accordingly. * @param node - The updated immutable HTML node representing the control's context. */ onTemplateNodeUpdated(_node: ImmutableHtmlNode): void; /** * Lifecycle hook called when any part of the document template has changed. * This can be frequent; use cautiously for performance-sensitive operations. * @param _node - The immutable HTML node representing current node instance */ onDocumentChanged(_node: ImmutableHtmlNode): void; }