import { type MoneyProps } from '@wix/headless-components/react'; import { type AsChildChildren } from '@wix/headless-utils/react'; import React from 'react'; import { type InvoiceItem } from '../services/invoice-item-service.js'; /** * Props for the InvoiceItem Root component. */ export interface RootProps { /** Invoice item */ invoiceItem: InvoiceItem; /** Whether to render as a child component */ asChild?: boolean; /** Child components */ children: React.ReactNode; /** CSS classes to apply to the default element */ className?: string; } /** * Root container that provides invoice item service context to all child components. * Must be used as the top-level InvoiceItem component. * * @order 1 * @component * @example * ```tsx * import { InvoiceItem } from '@wix/events/components'; * * function InvoiceItemComponent({ invoiceItem }) { * return ( * * * * * * * ); * } * ``` */ export declare const Root: React.ForwardRefExoticComponent>; /** * Props for the InvoiceItem Name component. */ export interface NameProps { /** Whether to render as a child component */ asChild?: boolean; /** Custom render function when using asChild */ children?: AsChildChildren<{ /** Invoice item name */ name: string; }>; /** CSS classes to apply to the default element */ className?: string; } /** * Displays the invoice item name. * * @component * @example * ```tsx * // Default usage * * * // asChild with primitive * * * * * // asChild with React component * * {React.forwardRef(({ name, ...props }, ref) => ( * * {name} * * ))} * * ``` */ export declare const Name: React.ForwardRefExoticComponent>; /** * Props for the InvoiceItem Price component. */ export interface PriceProps extends Omit { } /** * Displays the invoice item price. * * @component * @example * ```tsx * // Default usage * * * // asChild with primitive * * * * * // asChild with React component * * {React.forwardRef(({ formattedMoney, formattedMoneyParts, ...props }, ref) => ( * * Price: {formattedMoney} * * ))} * * ``` */ export declare const Price: React.ForwardRefExoticComponent>; /** * Props for the InvoiceItem Quantity component. */ export interface QuantityProps { /** Whether to render as a child component */ asChild?: boolean; /** Custom render function when using asChild */ children?: AsChildChildren<{ /** Invoice item quantity */ quantity: number; }>; /** CSS classes to apply to the default element */ className?: string; } /** * Displays the invoice item quantity. * * @component * @example * ```tsx * // Default usage * * * // asChild with primitive * * * * * // asChild with React component * * {React.forwardRef(({ quantity, ...props }, ref) => ( * * Qty: {quantity} * * ))} * * ``` */ export declare const Quantity: React.ForwardRefExoticComponent>; /** * Props for the InvoiceItem Total component. */ export interface TotalProps extends Omit { } /** * Displays the invoice item total amount. * * @component * @example * ```tsx * // Default usage * * * // asChild with primitive * * * * * // asChild with React component * * {React.forwardRef(({ formattedMoney, formattedMoneyParts, ...props }, ref) => ( * * Total: {formattedMoney} * * ))} * * ``` */ export declare const Total: React.ForwardRefExoticComponent>;
* Price: {formattedMoney} *
* Total: {formattedMoney} *