import { type GenericListItemsProps, type GenericListRepeaterProps } from '@wix/headless-components/react';
import { type AsChildChildren } from '@wix/headless-utils/react';
import React from 'react';
import { type Event, type RichContent } from '../services/event-service.js';
import { type EventListServiceConfig } from '../services/event-list-service.js';
import { type OccurrenceListServiceConfig } from '../services/occurrence-list-service.js';
/**
* Props for the Event Root component.
*/
export interface RootProps {
/** Event */
event: Event;
/** Event list service configuration */
eventListServiceConfig?: EventListServiceConfig;
/** Occurrence list service configuration */
occurrenceListServiceConfig?: OccurrenceListServiceConfig;
/** Whether to render as a child component */
asChild?: boolean;
/** Child components that will have access to the event */
children: React.ReactNode;
/** CSS classes to apply to the default element */
className?: string;
}
/**
* Root container that provides event context to all child components.
* Must be used as the top-level Event component.
*
* @order 1
* @component
* @example
* ```tsx
* import { Event } from '@wix/events/components';
*
* function EventPage({ event }) {
* return (
*
*
*
*
*
*
*
*
* );
* }
* ```
*/
export declare const Root: React.ForwardRefExoticComponent>;
/**
* Props for the Event Slug component.
*/
export interface SlugProps {
/** Whether to render as a child component */
asChild?: boolean;
/** Custom render function when using asChild */
children?: AsChildChildren<{
/** Event slug */
slug: string;
}>;
/** CSS classes to apply to the default element */
className?: string;
}
/**
* Displays the event slug.
*
* @component
* @example
* ```tsx
* // Default usage
*
*
* // asChild with primitive
*
*
*
*
* // asChild with react component
*
* {React.forwardRef(({ slug, ...props }, ref) => (
*
* Event Details
*
* ))}
*
* ```
*/
export declare const Slug: React.ForwardRefExoticComponent>;
/**
* Props for the Event Type component.
*/
export interface TypeProps {
/** Custom render function */
children: AsChildChildren<{
/** Is event ticketed */
ticketed: boolean;
/** Is event RSVP */
rsvp: boolean;
/** Is event external */
external: boolean;
}>;
}
/**
* Provides event type information.
*
* @component
* @example
* ```tsx
* // asChild with react component
*
* {React.forwardRef(({ ticketed, rsvp, external, ...props }, ref) => (
*
* {ticketed ? 'Ticketed' : rsvp ? 'RSVP' : external ? 'External' : ''}
*
* ))}
*
* ```
*/
export declare const Type: React.ForwardRefExoticComponent>;
/**
* Props for the Event Image component.
*/
export interface ImageProps extends Omit, 'children'> {
/** Whether to render as a child component */
asChild?: boolean;
/** Custom render function when using asChild */
children?: AsChildChildren<{
/** Image source URL */
src: string;
/** Image width */
width?: number;
/** Image height */
height?: number;
/** Image alt text */
alt: string;
}>;
}
/**
* Displays the event image using WixMediaImage component.
*
* @component
* @example
* ```tsx
* // Default usage
*
*
* // asChild with primitive
*
*
*
*
* // asChild with react component
*
* {React.forwardRef(({ src, alt, width, height, ...props }, ref) => (
*
* ))}
*
* ```
*/
export declare const Image: React.ForwardRefExoticComponent>;
/**
* Props for the Event Title component.
*/
export interface TitleProps {
/** Whether to render as a child component */
asChild?: boolean;
/** Custom render function when using asChild */
children?: AsChildChildren<{
/** Event title */
title: string;
}>;
/** CSS classes to apply to the default element */
className?: string;
}
/**
* Displays the event title.
*
* @component
* @example
* ```tsx
* // Default usage
*
*
* // asChild with primitive
*
*
*
*
* // asChild with react component
*
* {React.forwardRef(({ title, ...props }, ref) => (
*
* {title}
*
* ))}
*
* ```
*/
export declare const Title: React.ForwardRefExoticComponent>;
/**
* Props for the Event Date component.
*/
export interface DateProps {
/** Whether to render as a child component */
asChild?: boolean;
/** Custom render function when using asChild */
children?: AsChildChildren<{
/** Event start date, null if TBD */
startDate: Date | null;
/** Event end date, null if TBD */
endDate: Date | null;
/** Event time zone ID, null if TBD */
timeZoneId: string | null;
/** Whether the event date and time is TBD */
dateAndTimeTbd: boolean;
/** Message to display if the event date and time is TBD */
dateAndTimeTbdMessage: string | null;
/** Whether to hide the end date */
hideEndDate: boolean;
/** Whether to show the time zone */
showTimeZone: boolean;
/** Formatted event date */
formattedDate: string;
}>;
/** CSS classes to apply to the default element */
className?: string;
/** Format of the event date */
format?: 'short' | 'full';
}
/**
* Displays the event date.
*
* @component
* @example
* ```tsx
* // Default usage
*
*
* // asChild with primitive
*
*
*
*
* // asChild with react component
*
* {React.forwardRef(({ startDate, endDate, timeZoneId, dateAndTimeTbd, dateAndTimeTbdMessage, hideEndDate, showTimeZone, formattedDate, ...props }, ref) => (
*
* {formattedDate}
*
* ))}
*
* ```
*/
export declare const Date: React.ForwardRefExoticComponent>;
/**
* Props for the Event Location component.
*/
export interface LocationProps {
/** Whether to render as a child component */
asChild?: boolean;
/** Custom render function when using asChild */
children?: AsChildChildren<{
/** Formatted event location */
formattedLocation: string;
/** Event location latitude (null if TBD) */
latitude: number | null;
/** Event location longitude (null if TBD) */
longitude: number | null;
}>;
/** CSS classes to apply to the default element */
className?: string;
/** Format of the event location */
format?: 'short' | 'full';
}
/**
* Displays the event location.
*
* @component
* @example
* ```tsx
* // Default usage
*
*
* // asChild with primitive
*
*
*
*
* // asChild with react component
*
* {React.forwardRef(({ formattedLocation, latitude, longitude, ...props }, ref) => (
*
* {formattedLocation}
*
* ))}
*
* ```
*/
export declare const Location: React.ForwardRefExoticComponent>;
/**
* Props for the Event ShortDescription component.
*/
export interface ShortDescriptionProps {
/** Whether to render as a child component */
asChild?: boolean;
/** Custom render function when using asChild */
children?: AsChildChildren<{
/** Event short description */
shortDescription: string;
}>;
/** CSS classes to apply to the default element */
className?: string;
}
/**
* Displays the event short description.
*
* @component
* @example
* ```tsx
* // Default usage
*
*
* // asChild with primitive
*
*
*
*
* // asChild with react component
*
* {React.forwardRef(({ shortDescription, ...props }, ref) => (
*
* {shortDescription}
*
* ))}
*
* ```
*/
export declare const ShortDescription: React.ForwardRefExoticComponent>;
/**
* Props for the Event Description component.
*/
export interface DescriptionProps {
/** Custom render function */
children?: AsChildChildren<{
/** Event description in rich content format */
description: RichContent;
}>;
}
/**
* Provides the event description. RicosViewer should be used to render the description.
*
* @component
* @example
* ```tsx
*
* {React.forwardRef(({ description, ...props }, ref) => (
*
* ))}
*
* ```
*/
export declare const Description: React.ForwardRefExoticComponent>;
/**
* Props for the Event RsvpButton component.
*/
export interface RsvpButtonProps {
/** Whether to render as a child component */
asChild?: boolean;
/** Custom render function when using asChild */
children?: AsChildChildren<{
/** Event slug */
slug: string;
/** Is event ticketed */
ticketed: boolean;
}>;
/** CSS classes to apply to the default element */
className?: string;
/** The label to display inside the button */
label?: React.ReactNode;
}
/**
* Displays the event RSVP button.
*
* @component
* @example
* ```tsx
* // Default usage
*
*
* // asChild with primitive
*
*
*
*
* // asChild with react component
*
* {React.forwardRef(({ slug, ticketed, ...props }, ref) => (
*
* ))}
*
* ```
*/
export declare const RsvpButton: React.ForwardRefExoticComponent>;
/**
* Props for the Event FacebookShare component.
*/
export interface FacebookShareProps {
/** Event page URL */
eventPageUrl: string;
/** Whether to render as a child component */
asChild?: boolean;
/** Custom render function when using asChild */
children?: AsChildChildren<{
/** Facebook share URL */
shareUrl: string;
}>;
/** CSS classes to apply to the default element */
className?: string;
}
/**
* Displays Facebook share element.
*
* @component
* @example
* ```tsx
* // Default usage
*
*
* // asChild with primitive
*
*
*
*
* // asChild with react component
*
* {React.forwardRef(({ shareUrl, ...props }, ref) => (
*
* ```
*/
export declare const FacebookShare: React.ForwardRefExoticComponent>;
/**
* Props for the Event LinkedInShare component.
*/
export interface LinkedInShareProps {
/** Event page URL */
eventPageUrl: string;
/** Whether to render as a child component */
asChild?: boolean;
/** Custom render function when using asChild */
children?: AsChildChildren<{
/** LinkedIn share URL */
shareUrl: string;
}>;
/** CSS classes to apply to the default element */
className?: string;
}
/**
* Displays LinkedIn share element.
*
* @component
* @example
* ```tsx
* // Default usage
*
*
* // asChild with primitive
*
*
*
*
* // asChild with react component
*
* {React.forwardRef(({ shareUrl, ...props }, ref) => (
*
* ```
*/
export declare const LinkedInShare: React.ForwardRefExoticComponent>;
/**
* Props for the Event XShare component.
*/
export interface XShareProps {
/** Event page URL */
eventPageUrl: string;
/** Whether to render as a child component */
asChild?: boolean;
/** Custom render function when using asChild */
children?: AsChildChildren<{
/** X share URL */
shareUrl: string;
}>;
/** CSS classes to apply to the default element */
className?: string;
}
/**
* Displays X share element.
*
* @component
* @example
* ```tsx
* // Default usage
*
*
* // asChild with primitive
*
*
*
*
* // asChild with react component
*
* {React.forwardRef(({ shareUrl, ...props }, ref) => (
*
* ```
*/
export declare const XShare: React.ForwardRefExoticComponent>;
/**
* Props for the Event AddToGoogleCalendar component.
*/
export interface AddToGoogleCalendarProps {
/** Whether to render as a child component */
asChild?: boolean;
/** Custom render function when using asChild */
children?: AsChildChildren<{
/** Google calendar URL */
url: string;
}>;
/** CSS classes to apply to the default element */
className?: string;
}
/**
* Displays link to add the event to Google calendar.
*
* @component
* @example
* ```tsx
* // Default usage
*
*
* // asChild with primitive
*
*
*
*
* // asChild with react component
*
* {React.forwardRef(({ url, ...props }, ref) => (
*
* ```
*/
export declare const AddToGoogleCalendar: React.ForwardRefExoticComponent>;
/**
* Props for the Event AddToIcsCalendar component.
*/
export interface AddToIcsCalendarProps {
/** Whether to render as a child component */
asChild?: boolean;
/** Custom render function when using asChild */
children?: AsChildChildren<{
/** ICS calendar URL */
url: string;
}>;
/** CSS classes to apply to the default element */
className?: string;
}
/**
* Displays link to add the event to ICS calendar.
*
* @component
* @example
* ```tsx
* // Default usage
*
*
* // asChild with primitive
*
*
*
*
* // asChild with react component
*
* {React.forwardRef(({ url, ...props }, ref) => (
*
* ```
*/
export declare const AddToIcsCalendar: React.ForwardRefExoticComponent>;
/**
* Props for the Event OtherEvents component.
*/
export interface OtherEventsProps extends GenericListItemsProps {
/** Number of other events to display, default: 3 */
count?: number;
}
/**
* Container for other events.
* Follows List Container Level pattern.
*
* @component
* @example
* ```tsx
*
*
*
*
*
*
* ```
*/
export declare const OtherEvents: React.ForwardRefExoticComponent>;
/**
* Props for the Event OtherEventRepeater component.
*/
export interface OtherEventRepeaterProps extends Omit, 'itemWrapper'> {
}
/**
* Repeater component that renders Event.Root for each event.
* Follows Repeater Level pattern.
*
* @component
* @example
* ```tsx
*
*
*
*
* ```
*/
export declare const OtherEventRepeater: React.ForwardRefExoticComponent>;
/**
* Props for the Event Form component.
*/
export interface FormProps {
/** Whether to render as a child component */
asChild?: boolean;
/** Child components */
children: React.ReactNode;
/** CSS classes to apply to the default element */
className?: string;
/** Thank you page URL */
thankYouPageUrl?: string;
}
/**
* Displays the event form.
*
* @component
* @example
* ```tsx
* import { Form } from '@wix/headless-forms/react';
*
*
*
*
*
*
* ```
*/
export declare const Form: React.ForwardRefExoticComponent>;