import React from 'react'; import type { EnhancedModifier } from '../services/types.js'; import { type AsChildChildren } from '@wix/headless-utils/react'; import { type MoneyProps } from '@wix/headless-components/react'; export interface ModifierRootProps { modifier?: EnhancedModifier; children: React.ReactNode; } /** * Root component that provides modifier context to its children. * * @warning Do not use this component directly if it's inside a repeater. * Use the repeater component (e.g., ModifierGroup.ModifiersRepeater) instead, which will * automatically render this Root component for each modifier. */ export declare const Root: (props: ModifierRootProps) => import("react/jsx-runtime").JSX.Element | null; export interface ModifierNameProps { /** 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 ModifierPriceProps { /** 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; } /** * Displays the modifier 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 modifier 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>; /** * Modifier namespace containing all modifier components * following the compound component pattern: ModifierComponent.Root, ModifierComponent.Name, ModifierComponent.Price */ export declare const ModifierComponent: { /** Modifier root component */ readonly Root: (props: ModifierRootProps) => import("react/jsx-runtime").JSX.Element | null; /** Modifier name component */ readonly Name: React.ForwardRefExoticComponent>; /** Modifier price component */ readonly Price: React.ForwardRefExoticComponent>; };