import "./charge_lines.css"; import { type ReactNode } from "react"; import type * as React from "react"; import { useRender } from "@base-ui/react/use-render"; import { type StyleProps } from "./style_props"; export interface ChargeLineProps extends StyleProps { label: string; /** A basis or period. Never a problem: that belongs on the control that can fix it. */ meta?: string; /** * `quantity × unitPrice` derives the amount, which is never typed. Leave both out for a flat * line. */ quantity?: number | null; unitPrice?: number | null; /** * Ignored when priced. `null` is a cost nobody stated and renders as a dash, never zero, which * reads as free; pass `0` for a price set to nothing. */ amount?: number | null; onAmountChange?: (next: number | null) => void | Promise; /** Unconditional and `disabled` when idle. */ amountActions?: ReactNode; /** Belongs to the charge, so it rides the charge's row. */ extra?: ReactNode; warning?: string; onQuantityChange?: (next: number | null) => void | Promise; onUnitPriceChange?: (next: number | null) => void | Promise; /** * An `InlineButton` riding the price field. Pass it unconditionally, `disabled` when idle: a * conditional verb narrows the field on some rows and breaks the shared price column. */ unitPriceActions?: ReactNode; /** A fixed slot, so the money column holds whether or not a row has one. */ action?: ReactNode; /** * Editors become values and no verb is drawn: a disabled verb on an unchangeable figure repeats * it. */ locked?: boolean; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } export interface ChargeLinesProps extends StyleProps { /** Absent is a record not yet priced; `empty` speaks for it. */ children?: ReactNode; /** * Where the total answers a different question from the heading ("Payable", "Owed now"). Omit for * the pack's "Total". */ totalLabel?: string; /** * Given, a `totalLabel` that only repeats it becomes "Total": the band cannot see its heading. */ heading?: string; /** * The sum of the lines on screen. `null` where there is nothing to sum draws the none mark; a * zero would claim lines that come to nothing. */ total: number | null; /** * An ISO code for every figure in the band. A currency, not a formatter, because a numeric field * must parse back the string it prints. */ currency: string; action?: ReactNode; empty?: ReactNode; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } export declare function ChargeLines({ children, totalLabel, heading, total, currency, action, empty, testID, render, ref, ...props }: ChargeLinesProps): React.JSX.Element; export declare function ChargeLine({ label, meta, quantity, unitPrice, amount, onAmountChange, onQuantityChange, onUnitPriceChange, unitPriceActions, amountActions, extra, warning, action, locked, testID, render, ref, ...props }: ChargeLineProps): React.JSX.Element;