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) => ( *
* {images.length > 0 && ( * images.length === 1 ? ( * * ) : ( * ({ image: img })) }}> * * * * * ) * )} *
* ))} *
* * // Custom render function * * {({ images, altText }) => ( *
* {images.length > 0 && ( * images.length === 1 ? ( * * ) : ( * ({ image: img })) }}> * * * * * * ) * )} *
* )} *
* ``` */ export declare const Images: React.ForwardRefExoticComponent>; /** * Displays the item featured status with customizable rendering. * * @component * @example * ```tsx * // Default usage * * * // asChild with primitive * * * * * // asChild with react component * * {React.forwardRef(({featured, ...props}, ref) => ( * * ))} * * * // Custom render function * * {({ featured }) => ( * * )} * * ``` */ export declare const Featured: React.ForwardRefExoticComponent>; /** * Repeater component for rendering individual variants. * * @component * @example * ```tsx * * {({ variant, index }) => ( *
*

{variant.name}

*

* {variant.priceInfo?.formattedPrice || 'No price'} *

*
* )} *
* ``` */ export declare const VariantsRepeater: React.ForwardRefExoticComponent>; export declare const LabelsRepeater: { (props: ItemLabelsRepeaterProps): import("react/jsx-runtime").JSX.Element | null; displayName: string; }; export declare const ModifierGroupsRepeater: { (props: ItemModifierGroupsRepeaterProps): import("react/jsx-runtime").JSX.Element | null; displayName: string; }; /** * Item namespace containing all item components * following the compound component pattern: Item.Root, Item.Name, Item.Description, etc. */ export declare const Item: { /** Item root component */ readonly Root: typeof Root; /** Item name component */ readonly Name: React.ForwardRefExoticComponent>; /** Item description component */ readonly Description: React.ForwardRefExoticComponent>; /** Item price component */ readonly Price: React.ForwardRefExoticComponent>; /** Item images component (intelligent single/multiple) */ readonly Images: React.ForwardRefExoticComponent>; /** Item featured component */ readonly Featured: React.ForwardRefExoticComponent>; /** Item variants repeater component */ readonly VariantsRepeater: React.ForwardRefExoticComponent>; /** Item labels repeater component */ readonly LabelsRepeater: { (props: ItemLabelsRepeaterProps): import("react/jsx-runtime").JSX.Element | null; displayName: string; }; /** Item modifier groups repeater component */ readonly ModifierGroupsRepeater: { (props: ItemModifierGroupsRepeaterProps): import("react/jsx-runtime").JSX.Element | null; displayName: string; }; };