import type * as React from 'react'; import type { JSX, ReactNode } from 'react'; import { type DataFrameFieldIndex, type DisplayValue } from '@grafana/data'; import { type LegendOverflow, type LegendDisplayMode, type LegendPlacement, type LineStyle } from '@grafana/schema'; export declare enum SeriesVisibilityChangeBehavior { Isolate = 0, Hide = 1 } export interface VizLegendBaseProps { placement: LegendPlacement; className?: string; items: Array>; thresholdItems?: Array>; mappingItems?: Array>; seriesVisibilityChangeBehavior?: SeriesVisibilityChangeBehavior; onLabelClick?: (item: VizLegendItem, event: React.MouseEvent) => void; itemRenderer?: (item: VizLegendItem, index: number) => JSX.Element; onLabelMouseOver?: (item: VizLegendItem, event: React.MouseEvent | React.FocusEvent) => void; onLabelMouseOut?: (item: VizLegendItem, event: React.MouseEvent | React.FocusEvent) => void; readonly?: boolean; limit?: number; filterAction?: ReactNode; } export interface VizLegendTableProps extends VizLegendBaseProps { sortBy?: string; sortDesc?: boolean; onToggleSort?: (sortBy: string) => void; isSortable?: boolean; overflow?: LegendOverflow; } export interface LegendProps extends VizLegendBaseProps, VizLegendTableProps { displayMode?: LegendDisplayMode; } export interface VizLegendItem { getItemKey?: () => string; label: string; color?: string; gradient?: string; yAxis: number; disabled?: boolean; getDisplayValues?: () => DisplayValue[]; fieldIndex?: DataFrameFieldIndex; fieldName?: string; data?: T; lineStyle?: LineStyle; }