import type { PriceFormat } from "../Commerce/commerceTypes"; /** "static" flows in the page; "bottom" sticks to the bottom edge of its scroll container (CSS sticky, never fixed). */ export type BagBarPosition = "static" | "bottom"; /** Visible copy; override every string for another language. */ export interface BagBarLabels { /** Accessible name of the bar landmark. */ region: string; /** Label next to the amount; default "Total". */ total: string; /** Text of the price-details link; default "View price details". */ viewDetails: string; /** Primary action text used when `ctaLabel` is not set; default "Place order". */ cta: string; } /** Mobile bottom bar: the payable total with a price-details link on the left and the one primary action on the right. */ export interface BagBarProps extends PriceFormat { /** Payable amount in major currency units, formatted with `currency` and `locale`. */ total: number; /** Muted line beside the total, e.g. "Inclusive of all taxes". */ note?: string; /** Shows the "View price details" link; use it to scroll to or open the breakdown. */ onViewDetails?: () => void; /** Primary action label, e.g. "Place order" or "Checkout". */ ctaLabel?: string; /** Fires when the primary action is pressed. */ onCta?: () => void; /** Disables the primary action; default false. */ ctaDisabled?: boolean; /** Spinner on the primary action while the order is being placed. */ ctaLoading?: boolean; /** "static" flows in the page, "bottom" sticks to the container's bottom edge; default "static". */ position?: BagBarPosition; /** Stacking order when `position` is "bottom"; above page content, below dialogs by default. */ zIndex?: number; /** Per-string copy overrides; unset keys keep the English defaults. */ labels?: Partial; "data-testid"?: string; }