import { type FC, type HTMLAttributes, type ReactNode, type Ref } from 'react'; import { type PieChartDatum } from './PieChartContext'; export interface PieChartCenterProps extends HTMLAttributes { ref?: Ref; } export declare const PieChartCenter: FC; export interface PieChartCenterValueProps extends HTMLAttributes { ref?: Ref; /** * When `true` (default), hovering a slice or legend row replaces `children` with the * hovered datum's value (formatted via `formatHoveredValue`). Set to `false` to keep * `children` visible regardless of hover state — useful when the centre value should * always reflect the unfiltered total. */ hoverSync?: boolean; /** * Formatter applied to the hovered datum when `hoverSync` is enabled. Defaults to * `datum.value.toLocaleString()`. Pass a custom formatter to keep the hover format * aligned with whatever formatter produced `children` (e.g. compact notation, units). */ formatHoveredValue?: (datum: PieChartDatum) => ReactNode; } export declare const PieChartCenterValue: FC; /** * CLDR plural categories supported by `Intl.PluralRules`. `other` is required as the * fallback for any category the rules object does not define. */ export interface PieChartCenterLabelPluralRules { zero?: ReactNode; one?: ReactNode; two?: ReactNode; few?: ReactNode; many?: ReactNode; other: ReactNode; /** BCP-47 locale tag forwarded to `Intl.PluralRules`. Defaults to `'en'`. */ locale?: string; } export interface PieChartCenterLabelProps extends HTMLAttributes { ref?: Ref; /** * When `true` (default), the label tracks the hovered slice/legend row — so a * `pluralize` rules object picks the form for the hovered datum's value rather than * the chart total. Has no effect when `pluralize` is omitted. */ hoverSync?: boolean; /** * Optional pluralization rules. When provided, the label content is selected from * the rules using `Intl.PluralRules` for the currently visible count (the hovered * datum's value when `hoverSync` is on, otherwise the chart total). When omitted, * `children` renders unchanged. */ pluralize?: PieChartCenterLabelPluralRules; } export declare const PieChartCenterLabel: FC;