import { createContext, useContext } from 'react' import { DEFAULT_LEGEND_LABELS, type LegendLabels } from './labels' /** Per-panel configuration delivered by `Legend.Provider` to all containers. */ export interface LegendConfig { labels: LegendLabels } export const LegendConfigContext = createContext({ labels: DEFAULT_LEGEND_LABELS, }) export function useLegendConfig(): LegendConfig { return useContext(LegendConfigContext) }