import { SizeLegendConfigInterface } from './config'; import { DisplayStateManager } from '../../_abstract/display-state-manager'; /** * The `SizeLegend` class is responsible for rendering a size legend UI component. It provides methods to set the configuration, show/hide the legend, and handle user interactions. * * The legend displays a visual representation of the size scale, with minimum and maximum size indicators. It also supports optional labels and event handlers for click and hover interactions. * * The class takes a container node and an optional configuration object in the constructor. The configuration can be updated at any time using the `setConfig` method. */ export declare class SizeLegend extends DisplayStateManager { private _config; private _containerNode; private _legend; private _sizeElements; private _isHidden; /** * Constructs a new `SizeLegend` instance with the provided container node and optional configuration. * * @param containerNode - The HTML element that will contain the size legend. * @param config - An optional configuration object that will be used to initialize the size legend. */ constructor(containerNode: HTMLElement, config?: SizeLegendConfigInterface); /** * Hides the size legend by removing the 'enabled' class and adding the 'disabled' class to the legend element. */ hide(): void; /** * Shows the size legend by removing the 'disabled' class and adding the 'enabled' class to the legend element. */ show(): void; /** * Sets the configuration for the size legend. * * @param config - An optional configuration object that will be used to update the size legend. */ setConfig(config?: SizeLegendConfigInterface): void; /** * Sets the text content of the fallback div to 'Data loading...' to indicate that data is currently being loaded. */ setLoadingState(): void; /** * Destroys the size legend by removing event listeners and removing the legend and fallback message elements from the container node. */ destroy(): void; /** * Gets the min and max size elements used in the size legend. * @returns The min and max size elements, or null if they have not been created yet. */ get sizeElements(): { min: HTMLElement; max: HTMLElement; } | null; /** * Gets the current configuration for the size legend. * @returns The size legend configuration. */ get config(): SizeLegendConfigInterface; /** * Gets whether the size legend is currently hidden. * @returns `true` if the size legend is hidden, `false` otherwise. */ get isHidden(): boolean; private _createElements; private _createLegendElement; private _createSizeElement; private _updateLegend; private _updateSizeElement; private _updateSublabel; private _formatLabel; private _handleClick; private _handleHover; private _handleSizeElementHover; private _handleSizeElementClick; } export type { SizeLegendConfigInterface };