import "./totals_line.css"; import type * as React from "react"; import { useRender } from "@base-ui/react/use-render"; import { type MetricFormat, type MetricProps, type MetricTone } from "./metric"; import { type TrendProps } from "./trend"; import { type StyleProps } from "./style_props"; /** The way to the counted rows — a URL (a real anchor) or an in-app act; a neutral total takes none. */ type TotalsLineDoor = { href: string; onPress?: never; pressed?: never; } | { onPress: () => void; /** The press holds: the figure's condition narrows the rows now, and pressing again lets it go. */ pressed?: boolean; href?: never; } | { href?: never; onPress?: never; pressed?: never; }; export type TotalsLineItem = TotalsLineFigure & TotalsLineDoor; interface TotalsLineFigure { /** Reads after the value ("below minimum", "stock value"). */ label: string; value: number | string | null | undefined; format?: MetricFormat; currency?: string; /** As `Metric`'s: a plain figure's unit, read in its ladder's largest rung where `compact`. */ unit?: MetricProps["unit"]; /** Unset, the reader's tag (see the component). */ locale?: string; emptyLabel?: string; tone?: MetricTone; /** Abbreviates large values (≥1 triệu → "486 tr"). */ compact?: boolean; trend?: number | null; /** Which way `trend`'s change is good, as `Trend`'s. */ goodDirection?: TrendProps["goodDirection"]; info?: string; /** A swatch when this line is also the legend for a chart above (typically a split `Progress`); * `LegendItem` has no `info`. Pass the segment's value. */ color?: string; } export interface TotalsLineProps extends StyleProps { items: TotalsLineItem[]; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } /** A light inline summary of the current view, recomputed from the filtered rows, placed with the set it * summarises (a record's child list may carry one). An actionable count (warning/danger, "N overdue") * promises its rows are reachable, so it carries `href` or `onPress`. Never on a record's identity band * about that record — that is a checklist, `Pipeline` or a `Callout`. Formats in the reader's pack tag, * like `MoneyCell` and `DateCell`. */ export declare function TotalsLine(props: TotalsLineProps): React.ReactElement>; export {};