import * as React from 'react'; import type { JSX } from 'react'; import { DataFrameFieldIndex, DisplayValue } from '@grafana/data'; import { LegendDisplayMode, LegendPlacement, 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; } export interface VizLegendTableProps extends VizLegendBaseProps { sortBy?: string; sortDesc?: boolean; onToggleSort?: (sortBy: string) => void; isSortable?: boolean; } 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; }