import "./totals_line.css"; import type * as React from "react"; import { useRender } from "@base-ui/react/use-render"; import { type MetricFormat, type MetricTone } from "./metric"; import { type StyleProps } from "./style_props"; export interface TotalsLineItem { /** Label that reads AFTER the value ("below minimum", "stock value"). */ label: string; value: number | string | null | undefined; format?: MetricFormat; currency?: string; /** Override the tag this item is formatted in. Unset, it is the READER's — * see the note on the component. */ locale?: string; emptyLabel?: string; tone?: MetricTone; /** Abbreviate large values (≥1 triệu → "486 tr"). */ compact?: boolean; /** Optional ±% trend chip. */ trend?: number | null; /** What this metric means — the ⓘ next to the value opens it in a popover. */ info?: string; /** * Swatch colour, when this line is ALSO the legend for a chart above it — * typically a split `Progress` whose segments are these same aggregates. * `LegendItem` holds no `info`, so reaching for it costs the popovers that * explain what a bucket includes. Pass the SAME value the segment uses. */ color?: string; } export interface TotalsLineProps extends StyleProps { items: TotalsLineItem[]; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } /** * A LIGHT, inline "value label" summary of the CURRENT view, recomputed from the * FILTERED rows. * * **It summarizes a SET, and it goes with the set it summarizes.** Every item is * an aggregate over the rows in view. Nesting counts as a set: a record that * gathers children may carry one above THAT list. * * **A count here is a PROMISE that the subset is reachable.** An item the reader * would act on — anything tinted `warning`/`danger`, any "N missing / N overdue" * — names a set the strip renders as text with no press target, so the band * ABOVE must carry the filter that isolates it: the same split, the same words. * A neutral total promises nothing and needs no filter. * * **Never on a record's identity band, reporting that record's own state.** A * derived verdict about one record is a checklist, and a record does not carry * one (`docs/catalog.md`); work state belongs to `Pipeline`, a field's problem to * a `Callout` on the field that can fix it. * * **It formats in the READER's locale, because the rows it sums do.** An item * with no `locale` of its own takes the active pack's tag — the same one * `MoneyCell` and `DateCell` take in the register above — rather than the money * formatter's home-market fallback. */ export declare function TotalsLine(props: TotalsLineProps): React.ReactElement>;