import React from 'react';
import type { EnhancedItem } from '../services/types.js';
import type { AsChildChildren, AsChildRenderFunction } from '@wix/headless-utils/react';
import { type MoneyProps } from '@wix/headless-components/react';
export interface ItemRootProps {
children: React.ReactNode;
item?: EnhancedItem;
}
export interface ItemNameProps {
/** Whether to render as a child component */
asChild?: boolean;
/** Custom render function when using asChild */
children?: AsChildChildren<{
name: string;
}>;
/** CSS classes to apply to the default element */
className?: string;
}
export interface ItemDescriptionProps {
/** Whether to render as a child component */
asChild?: boolean;
/** Custom render function when using asChild */
children?: AsChildChildren<{
description: string;
}>;
/** CSS classes to apply to the default element */
className?: string;
}
export interface ItemPriceProps {
/** Whether to render as a child component */
asChild?: boolean;
/** Custom render function when using asChild */
children?: MoneyProps['children'];
/** CSS classes to apply to the default element */
className?: string;
}
export interface ItemVariantsRepeaterProps {
children: React.ReactNode;
}
export interface ItemLabelsRepeaterProps {
children: React.ReactNode;
}
export interface ItemModifierGroupsRepeaterProps {
children: React.ReactNode;
}
export interface ItemFeaturedProps {
/** Whether to render as a child component */
asChild?: boolean;
/** Custom render function when using asChild */
children?: AsChildChildren<{
featured: boolean;
}>;
/** CSS classes to apply to the default element */
className?: string;
}
/**
* Root component that provides item context to its children.
*
* @warning Do not use this component directly if it's inside a repeater.
* Use the repeater component (e.g., Section.ItemsRepeater) instead, which will
* automatically render this Root component for each item.
*/
export declare function Root(props: ItemRootProps): import("react/jsx-runtime").JSX.Element | null;
/**
* Displays the item name with customizable rendering following the documented API.
*
* @component
* @example
* ```tsx
* // Default usage
*
*
* // asChild with primitive
*
*
*
*
* // asChild with react component
*
* {React.forwardRef(({name, ...props}, ref) => (
*
* {name}
*
* ))}
*
* ```
*/
export declare const Name: React.ForwardRefExoticComponent>;
/**
* Displays the item description with customizable rendering following the documented API.
*
* @component
* @example
* ```tsx
* // Default usage
*
*
* // asChild with primitive
*
*
*
*
* // asChild with react component
*
* {React.forwardRef(({description, ...props}, ref) => (
*
* {description}
*
* ))}
*
* ```
*/
export declare const Description: React.ForwardRefExoticComponent>;
/**
* Displays the item price with customizable rendering following the documented API.
*
* @component
* @example
* ```tsx
* // Default usage
*
*
* // asChild with primitive
*
*
*
*
* // asChild with react component
*
* {React.forwardRef(({amount, currency, formattedMoney, formattedMoneyParts, ...props}, ref) => (
*
* {formattedMoney}
*
* ))}
*
* ```
*/
export declare const Price: React.ForwardRefExoticComponent>;
export interface ItemImagesProps {
/** Whether to render as a child component */
asChild?: boolean;
/** Custom render function when using asChild */
children?: AsChildRenderFunction<{
images: string[];
altText: string;
}>;
/** CSS classes to apply to the default element */
className?: string;
/** CSS classes to apply to the previous button */
previousClassName?: string;
/** CSS classes to apply to the next button */
nextClassName?: string;
/** CSS classes to apply to the indicator */
indicatorClassName?: string;
/** CSS classes to apply to the previous chevron icon */
previousIconClassName?: string;
/** CSS classes to apply to the next chevron icon */
nextIconClassName?: string;
}
/**
* Displays item images intelligently based on available images.
* - No images: returns null
* - Single image: renders WixMediaImage
* - Multiple images: renders MediaGallery
*
* @component
* @example
* ```tsx
* // Default usage
*
*
* // With custom gallery controls styling
*
*
* // asChild with primitive
*
*
*
*
* // asChild with custom component
*
* {React.forwardRef(({images, altText, ...props}, ref) => (
*