import type { FC, HTMLAttributes, Ref } from 'react'; import type { TestableProps } from '../../../utils/testId'; import type { ChartColor } from '../types'; export interface HorizontalBarDatum { /** Legend label, React key, and `data-name` hook. */ name: string; /** Segment size; proportional to the bar total. */ value: number; /** Built-in palette; resolves via `resolveChartColor`. Omitted → auto-assigned by index. */ color?: ChartColor; /** Tailwind `bg-*` escape hatch; wins over `color` (inline fill is skipped). */ className?: string; } export interface HorizontalBarProps extends HTMLAttributes, TestableProps { ref?: Ref; /** Segments + legend. One array drives both, so colors stay in sync. */ data: HorizontalBarDatum[]; /** Headline number, rendered as `value.toLocaleString('en-US')`. Omitted → header hidden. */ value?: number; /** Delta chip. Rendered as an internal Badge (arrow + number). Omitted → no chip. */ delta?: { value: number; trend?: 'up' | 'down'; }; /** Bar denominator. `> sum(data.value)` → grey remainder tail. Default: `sum(data.value)`. */ total?: number; /** Show/hide the legend. Default: true. */ legend?: boolean; } export declare const HorizontalBar: FC;