import React from 'react';
import { type LineItem } from '../services/common-types.js';
import { AsChildChildren } from '@wix/headless-utils/react';
export interface LineItemRootProps {
/** Whether to render as a child component */
asChild?: boolean;
/** Custom render function when using asChild */
children: AsChildChildren<{
item: LineItem;
}>;
/** The line item data */
item: LineItem;
/** CSS classes to apply to the default element */
className?: string;
/** Additional HTML attributes */
[key: string]: any;
}
/**
* Root component for a cart line item that provides the LineItem context to its children
*
* @example
* ```tsx
*
*
*
*
*
* ```
*/
export declare const Root: React.ForwardRefExoticComponent & React.RefAttributes>;
/**
* Props for LineItem Title component
*/
export interface TitleProps {
/** Whether to render as a child component */
asChild?: boolean;
/** Custom render function when using asChild */
children?: AsChildChildren<{
title: string;
}>;
/** CSS classes to apply to the default element */
className?: string;
/** Additional HTML attributes */
[key: string]: any;
}
/**
* Displays the line item title/product name with customizable rendering options following the V2 API.
*
* @component
* @example
* ```tsx
* // Default usage
*
*
* // asChild with primitive element
*
*
*
*
* // asChild with React component
*
* {React.forwardRef(({title, ...props}, ref) => (
*
* {title}
*
* ))}
*
* ```
*/
export declare const Title: React.ForwardRefExoticComponent & React.RefAttributes>;
/**
* Props for LineItem Image component
*/
export interface ImageProps {
asChild?: boolean;
children?: AsChildChildren<{
src: string;
alt: string;
}>;
className?: string;
[key: string]: any;
}
/**
* Displays the line item product image using WixMediaImage for optimization.
* Supports custom rendering via asChild pattern with specific src/alt props.
*
* @component
* @example
* ```tsx
* // Default usage with WixMediaImage
*
*
* // Custom rendering with specific props
*
* {React.forwardRef(({ src, alt }, ref) => (
*
* ))}
*
* ```
*/
export declare const Image: React.ForwardRefExoticComponent & React.RefAttributes>;
/**
* Props for LineItem Quantity component
*/
export interface QuantityProps {
/** Whether to render as a child component */
asChild?: boolean;
/** Child components for quantity controls */
children: AsChildChildren<{
quantity: number;
updateQuantity: (quantity: number) => void;
}>;
/** How much to increment/decrement (default: 1) */
steps?: number;
/** CSS classes to apply to the default element */
className?: string;
/** Additional HTML attributes */
[key: string]: any;
}
/**
* Container for line item quantity selection controls.
* Wraps children with Quantity.Root and connects to line item context for quantity operations.
*
* @component
* @example
* ```tsx
* // Default usage with quantity controls
*
*
*
*
*
*
* ```
*/
export declare const Quantity: React.ForwardRefExoticComponent & React.RefAttributes>;
/**
* Props for LineItem SelectedOptions component
*/
export interface SelectedOptionsProps {
/** Whether to render as a child component */
asChild?: boolean;
/** Custom render function when using asChild */
children?: AsChildChildren<{
selectedOptions: Array<{
name: string;
value: string | {
color: string;
};
}>;
}>;
/** CSS classes to apply to the default element */
className?: string;
/** Additional HTML attributes */
[key: string]: any;
}
/**
* Container for selected options display. Does not render when there are no selected options.
*
* @component
* @example
* ```tsx
* // Default usage
*
*
*
*
* // asChild with primitive element
*
*
*
*
* // asChild with React component
*
* {React.forwardRef((props, ref) => (
*
* ))}
*
* ```
*/
export declare const SelectedOptions: React.ForwardRefExoticComponent & React.RefAttributes>;
/**
* Props for LineItem SelectedOptionRepeater component
*/
export interface SelectedOptionRepeaterProps {
children: React.ReactNode;
}
/**
* Renders a list of selected options. Maps over selected options and renders SelectedOption.Root for each.
*
* @component
* @example
* ```tsx
* // Default usage
*
*
*
*
* ```
*/
export declare function SelectedOptionRepeater(props: SelectedOptionRepeaterProps): React.ReactNode;
export declare namespace SelectedOptionRepeater {
var displayName: string;
}