import { type GenericListItemsProps, type GenericListRepeaterProps, type MoneyProps } from '@wix/headless-components/react'; import { type AsChildChildren } from '@wix/headless-utils/react'; import React from 'react'; import { type TicketDefinition } from '../services/ticket-definition-service.js'; import { type PricingOption as PricingOptionType } from '../services/pricing-option-service.js'; /** * Props for the TicketDefinition Root component. */ export interface RootProps { /** Ticket definition */ ticketDefinition: TicketDefinition; /** Whether to render as a child component */ asChild?: boolean; /** Child components that will have access to the ticket definition */ children: React.ReactNode; /** CSS classes to apply to the default element */ className?: string; } /** * Root container that provides ticket definition context to all child components. * Must be used as the top-level TicketDefinition component. * * @order 1 * @component * @example * ```tsx * import { TicketDefinition } from '@wix/events/components'; * * function TicketDefinitionComponent({ ticketDefinition }) { * return ( * * * * * * * * * * * * * * * * * * ); * } * ``` */ export declare const Root: React.ForwardRefExoticComponent>; /** * Props for the TicketDefinition Name component. */ export interface NameProps { /** Whether to render as a child component */ asChild?: boolean; /** Custom render function when using asChild */ children?: AsChildChildren<{ /** Ticket definition name */ name: string; }>; /** CSS classes to apply to the default element */ className?: string; } /** * Displays the ticket definition 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 TicketDefinition Description component. */ export interface DescriptionProps { /** Whether to render as a child component */ asChild?: boolean; /** Custom render function when using asChild */ children?: AsChildChildren<{ /** Ticket definition description */ description: string; }>; /** CSS classes to apply to the default element */ className?: string; } /** * Displays the ticket definition description. Not rendered if there is no description. * * @component * @example * ```tsx * // Default usage * * * // asChild with primitive * *

* * * // asChild with react component * * {React.forwardRef(({ description, ...props }, ref) => ( *

* {description} *

* ))} *
* ``` */ export declare const Description: React.ForwardRefExoticComponent>; /** * Props for the TicketDefinition FixedPricing component. */ export interface FixedPricingProps extends Omit { } /** * Displays the fixed pricing for the ticket definition. Only renders when ticket definition has fixed price pricing method. * * @component * @example * ```tsx * // Default usage * * * // asChild with primitive * * * * * // asChild with react component * * {React.forwardRef(({ formattedMoney, formattedMoneyParts, ...props }, ref) => ( * * {formattedMoney} * * ))} * * ``` */ export declare const FixedPricing: React.ForwardRefExoticComponent>; /** * Props for the TicketDefinition GuestPricing component. */ export interface GuestPricingProps extends Omit { children?: AsChildChildren<{ /** Current price */ price: string | undefined; /** Minimum price */ minPrice: number; /** Formatted minimum price value */ formattedMinMoney: string; /** Formatted minimum price value parts */ formattedMinMoneyParts: Intl.NumberFormatPart[]; /** Function to set price */ setPrice: (price: string) => void; }>; } /** * Displays an input for guest pricing (pay-what-you-want). Only renders when ticket definition has guest price pricing method. * * @component * @example * ```tsx * // Default usage * * * // asChild with primitive * * * * * // asChild with react component * * {React.forwardRef(({ price, minPrice, formattedMinMoney, formattedMinMoneyParts, setPrice, ...props }, ref) => ( * * ))} * * ``` */ export declare const GuestPricing: React.ForwardRefExoticComponent>; /** * Props for the TicketDefinition PricingRange component. */ export interface PricingRangeProps extends Omit { children?: AsChildChildren<{ /** Formatted minimum price value */ formattedMinMoney: string; /** Formatted minimum price value parts */ formattedMinMoneyParts: Intl.NumberFormatPart[]; /** Formatted maximum price value */ formattedMaxMoney: string; /** Formatted maximum price value parts */ formattedMaxMoneyParts: Intl.NumberFormatPart[]; /** Formatted price range */ formattedPriceRange: string; }>; } /** * Displays the pricing range for the ticket definition. Only renders when ticket definition has pricing options. * * @component * @example * ```tsx * // Default usage * * * // asChild with primitive * * * * * // asChild with react component * * {React.forwardRef(({ formattedMinMoney, formattedMinMoneyParts, formattedMaxMoney, formattedMaxMoneyParts, formattedPriceRange, ...props }, ref) => ( * * From {formattedMinMoney} to {formattedMaxMoney} * * ))} * * ``` */ export declare const PricingRange: React.ForwardRefExoticComponent>; /** * Props for the TicketDefinition Tax component. */ export interface TaxProps extends Omit { children?: React.ReactNode | AsChildChildren<{ /** Tax name */ name: string; /** Tax rate */ rate: number; /** Whether tax is included in price */ included: boolean; /** Taxable value */ taxableValue: number; /** Tax value */ taxValue: number; formattedTaxableMoney: string; /** Formatted taxable value parts */ formattedTaxableMoneyParts: Intl.NumberFormatPart[]; formattedTaxMoney: string; /** Formatted tax value parts */ formattedTaxMoneyParts: Intl.NumberFormatPart[]; }>; } /** * Displays the tax for the ticket definition. Only renders when event has tax settings, ticket definition is not free and has no pricing options, or ticket definition has guest pricing and tax is applied to donations. * * @component * @example * ```tsx * // Default usage * * * // asChild with primitive * * * * * // asChild with react component * * {React.forwardRef(({ name, rate, included, taxableValue, taxValue, formattedTaxableMoney, formattedTaxableMoneyParts, formattedTaxMoney, formattedTaxMoneyParts, ...props }, ref) => ( * * {included ? `${name} included` : `+${formattedTaxMoney} ${name}`} * * ))} * * ``` */ export declare const Tax: React.ForwardRefExoticComponent>; /** * Props for the TicketDefinition Fee component. */ export interface FeeProps extends Omit { children?: React.ReactNode | AsChildChildren<{ /** Fee rate */ rate: number; /** Fee value */ value: number; /** Formatted fee value */ formattedMoney: string; /** Formatted fee value parts */ formattedMoneyParts: Intl.NumberFormatPart[]; }>; } /** * Displays the fee for the ticket definition. Only renders when ticket definition has fee enabled, is not free and has no pricing options. * * @component * @example * ```tsx * // Default usage * * * // asChild with primitive * * * * * // asChild with react component * * {React.forwardRef(({ rate, value, formattedMoney, formattedMoneyParts, ...props }, ref) => ( * * +{formattedMoney} service fee * * ))} * * ``` */ export declare const Fee: React.ForwardRefExoticComponent>; /** * Props for the TicketDefinition Remaining component. */ export interface RemainingProps { /** Whether to render as a child component */ asChild?: boolean; /** Custom render function when using asChild */ children?: AsChildChildren<{ /** Remaining tickets count */ remaining: number; }>; /** CSS classes to apply to the default element */ className?: string; } /** * Displays the remaining count. * * @component * @example * ```tsx * // Default usage * * * // asChild with primitive * * * * * // asChild with react component * * {React.forwardRef(({ remaining, ...props }, ref) => ( * * {remaining} remaining * * ))} * * ``` */ export declare const Remaining: React.ForwardRefExoticComponent>; /** * Props for the TicketDefinition SaleStartDate component. */ export interface SaleStartDateProps { /** Whether to render as a child component */ asChild?: boolean; /** Custom render function when using asChild */ children?: AsChildChildren<{ /** Sale start date */ startDate: Date; /** Formatted sale start date */ startDateFormatted: string; }>; /** CSS classes to apply to the default element */ className?: string; } /** * Displays the sale start date. Only renders when the sale is scheduled to start in the future. * * @component * @example * ```tsx * // Default usage * * * // asChild with primitive * * * * * // asChild with react component * * {React.forwardRef(({ startDate, startDateFormatted, ...props }, ref) => ( * * Sale starts: {startDateFormatted} * * ))} * * ``` */ export declare const SaleStartDate: React.ForwardRefExoticComponent>; /** * Props for the TicketDefinition SaleEndDate component. */ export interface SaleEndDateProps { /** Whether to render as a child component */ asChild?: boolean; /** Custom render function when using asChild */ children?: AsChildChildren<{ /** Sale end date */ endDate: Date; /** Formatted sale end date */ endDateFormatted: string; /** Whether sale has ended */ saleEnded: boolean; }>; /** CSS classes to apply to the default element */ className?: string; } /** * Displays the sale end date. Only renders when the sale has started or ended. * * @component * @example * ```tsx * // Default usage * * * // asChild with primitive * * * * * // asChild with react component * * {React.forwardRef(({ endDate, endDateFormatted, saleEnded, ...props }, ref) => ( * * {saleEnded ? 'Sale ended' : 'Sale ends'}: {endDateFormatted} * * ))} * * ``` */ export declare const SaleEndDate: React.ForwardRefExoticComponent>; /** * Props for the TicketDefinition Quantity component. */ export interface QuantityProps { /** Whether to render as a child component */ asChild?: boolean; /** Custom render function when using asChild */ children?: AsChildChildren<{ /** Array of quantity options */ options: number[]; /** Current quantity */ quantity: number; /** Maximum quantity allowed */ maxQuantity: number; /** Function to increment quantity */ increment: () => void; /** Function to decrement quantity */ decrement: () => void; /** Function to set specific quantity */ setQuantity: (quantity: number) => void; }>; /** CSS classes to apply to the default element */ className?: string; } /** * Displays a quantity selector for the ticket definition. Only renders when there are no pricing options, the sale has started, and the ticket definition is not sold out. * * @component * @example * ```tsx * // Default usage * * * // asChild with primitive * *