import { RangeColorLegendConfigInterface, RangeLegendColor } from './config'; import { DisplayStateManager } from '../../../_abstract/display-state-manager'; /** * Represents a range color legend component that displays a color gradient and labels for the minimum and maximum values. * * The `RangeColorLegend` class is responsible for creating and managing the visual elements of the range color legend, * including the color gradient, minimum and maximum value labels, and optional event handlers. * * The legend can be configured with various options, such as the color extent, label formatting, and event callbacks. * The legend also provides methods to show, hide, and update the configuration of the legend. */ export declare class RangeColorLegend extends DisplayStateManager { private _config; private _containerNode; private _legend; private _legendElements; private _gradientElement; private _extentElements; private _isHidden; /** * Constructs a new `RangeColorLegend` instance with the provided container node and optional configuration. * * The `RangeColorLegend` is responsible for creating and managing the visual elements of the range color legend, * including the color gradient, minimum and maximum value labels, and optional event handlers. * * @param containerNode - The HTML element that will contain the range color legend. * @param config - An optional configuration object that can be used to customize the behavior and appearance of the legend. */ constructor(containerNode: HTMLElement, config?: RangeColorLegendConfigInterface); /** * Gets the minimum and maximum extent elements of the range color legend. * @returns The minimum and maximum extent elements, or `null` if they have not been created yet. */ get extentElements(): { min: HTMLElement; max: HTMLElement; } | null; /** * Gets the current configuration for the range color legend. * @returns The current configuration object for the range color legend. */ get config(): RangeColorLegendConfigInterface; /** * Hides the range color legend by removing the 'enabled' class and adding the 'disabled' class to the legend element. */ hide(): void; /** * Shows the range color legend by removing the 'disabled' class and adding the 'enabled' class to the legend element. */ show(): void; /** * Sets the configuration for the range color legend. * * @param config - An optional configuration object that can be used to customize the behavior and appearance of the legend. */ setConfig(config?: RangeColorLegendConfigInterface): void; /** * Destroys the range color legend by removing event listeners and removing the legend and fallback elements from the container node. */ destroy(): void; /** * Sets the text content of the fallback div to 'Data loading...' to indicate that data is currently being loaded. */ setLoadingState(): void; private _createElements; private _createLegend; private _createLabelExtent; private _createGradientElement; private _updateLegend; private _updateGradient; private _updateLabelWrapper; private _updateSublabel; private _formatLabel; private _handleClick; private _handleHover; private _getColor; private _handleColorElementClick; private _handleColorElementHover; } export type { RangeColorLegendConfigInterface, RangeLegendColor };