import { type DisplayStateConfigInterface } from '../../../_abstract/display-state-manager'; export type RangeLegendColor = [number, number, number, number] | string; export interface RangeColorLegendConfigInterface extends DisplayStateConfigInterface { /** * Whether to hide the legend. * Default: `false` */ hidden?: boolean; /** * The label for the color legend. * @default undefined */ label?: string; /** * The label formatter function to format the color legend label. * @param n - The value to format. * @returns The formatted label string. * @default undefined */ labelFormatter?: (n: number) => string; /** * The array of colors to use for the color legend. Can be an array of `[number, number, number, number]` or `string` * @default undefined */ extent?: RangeLegendColor[]; /** * The labels to use for the minimum and maximum values of the color legend. * @default undefined */ extentLabels?: [number | string, number | string]; /** * Whether to enable event handling for the color legend. * @default true */ enableEvents?: boolean; /** * Whether to show sublabels for the minimum and maximum values of the color legend. * @default false */ showSublabels?: boolean; /** * The label to use for the minimum value of the color legend. * @default 'min' */ minSubLabel?: string; /** * The label to use for the maximum value of the color legend. * @default 'max' */ maxSubLabel?: string; /** * Whether to use display colors `extent` as discrete segments or continuous gradient. * @default false */ discreteColors?: boolean; /** * Callback function that is called when the color legend is clicked. * @param e - The click event object. */ onClick?: (e: Event) => void; /** * Callback function that is called when the minimum value of the color legend is clicked. * @param color - The color of the minimum value, or undefined if no color is associated. * @param value - The value of the minimum, or undefined if no value is associated. * @param e - The click event object. */ onMinClick?: (color: RangeLegendColor | undefined, value: number | string | undefined, e: Event) => void; /** * Callback function that is called when the maximum value of the color legend is clicked. * @param color - The color of the maximum value, or undefined if no color is associated. * @param value - The value of the maximum, or undefined if no value is associated. * @param e - The click event object. */ onMaxClick?: (color: RangeLegendColor | undefined, value: number | string | undefined, e: Event) => void; /** * Callback function that is called when the color legend is hovered over. * @param e - The hover event object. */ onHover?: (e: Event) => void; } export declare const defaultRangeColorLegendConfig: RangeColorLegendConfigInterface;