/** * TimeSlotList - High-level component for displaying time slot list information * Provides components for displaying timezone and time slot data */ import React from 'react'; import { ListVariant } from '@wix/headless-components/react'; import { AsChildChildren } from '@wix/headless-utils/react'; import type { TimeSlotListServiceConfig } from '../../services/time-slot-list/time-slot-list.def.js'; export type { StartDateProps as TimeSlotStartDateProps, EndDateProps as TimeSlotEndDateProps, DurationProps as TimeSlotDurationProps, SelectProps as TimeSlotSelectProps, LocationNameProps as TimeSlotLocationNameProps, StaffMembersProps as TimeSlotStaffMembersProps, StaffMemberRepeaterProps as TimeSlotStaffMemberRepeaterProps, StaffMemberNameProps as TimeSlotStaffMemberNameProps, SelectStaffMemberProps as TimeSlotSelectStaffMemberProps, ClearStaffSelectionProps as TimeSlotClearStaffSelectionProps, } from './TimeSlot.js'; /** * TimeSlot with required id field for GenericList */ export declare const TestIds: { readonly timeSlotListRoot: "time-slot-list-root"; readonly timeSlotListTimeSlots: "time-slot-list-time-slots"; readonly timeSlotListTimeSlot: "time-slot-list-time-slot"; readonly timeSlotListTimezone: "time-slot-list-timezone"; readonly timeSlotListLoadMore: "time-slot-list-load-more"; readonly timeSlotListContinue: "time-slot-list-continue"; readonly timeSlotListDateRangeInput: "time-slot-list-date-range-input"; }; /** * Render props for TimeSlotList.Timezone component */ export interface TimezoneRenderProps { /** Raw IANA timezone string (e.g., "America/New_York") */ timezone: string | undefined; /** User-friendly display name (e.g., "Eastern Standard Time") */ displayName: string; } /** * Props for TimeSlotList.Timezone component */ export interface TimezoneProps { asChild?: boolean; children?: AsChildChildren; className?: string; } /** * Displays the current timezone with customizable rendering. * * @component * @example * ```tsx * // Default usage - shows display name * * * // asChild with render function for custom formatting * * {({ timezone, displayName }) => ( * * {displayName} // "Eastern Standard Time" * * )} * * ``` */ export declare const Timezone: React.ForwardRefExoticComponent>; /** * Props for TimeSlotList.Root component */ export interface RootProps { children: React.ReactNode; config: TimeSlotListServiceConfig; className?: string; variant?: ListVariant; } /** * Root component that provides the TimeSlotList service context. * * @order 1 * @component * @example * ```tsx * import { TimeSlotList } from '@wix/bookings/components'; * * function TimeSlotsPage({ config }) { * return ( * * * * {children} * * * * ); * } * ``` */ export declare const Root: React.ForwardRefExoticComponent>; /** * Props for TimeSlotList.TimeSlots component */ export interface TimeSlotsProps { children: React.ReactNode; /** Content to display when no time slots are available */ emptyState?: React.ReactNode; /** Content to display while time slots are loading */ loadingState?: React.ReactNode; /** Content to display when an error occurs while loading time slots */ errorState?: React.ReactNode; className?: string; } /** * Container for the time slots list with empty state and loading state support. * Wraps GenericList.Items. Follows List Container Level pattern. * * @component * @example * ```tsx * No slots available} * loadingState={
Loading...
} * > * * {children} * *
* ``` */ export declare const TimeSlots: React.ForwardRefExoticComponent>; /** * Props for TimeSlotList.TimeSlotRepeater component */ export interface TimeSlotRepeaterProps { children: React.ReactNode; } export declare const TimeSlotRepeater: React.ForwardRefExoticComponent>; /** * Props for TimeSlotList.Actions.LoadMore component */ export interface LoadMoreProps { /** Children content */ children?: React.ReactNode; /** Whether to render as a child component */ asChild?: boolean; /** CSS classes to apply to the button */ className?: string; /** The label to display inside the button */ label?: string; /** The loading state to display inside the button */ loadingState?: React.ReactNode; } /** * Displays a button to load more time slots. Not rendered if no more slots are left to load. * Follows the architecture rules - does not support asChild as it's a simple trigger component. * * @component * @example * ```tsx * * * * ``` */ export declare const LoadMore: React.ForwardRefExoticComponent>; /** * Actions namespace for TimeSlotList */ export declare const Actions: { LoadMore: React.ForwardRefExoticComponent>; }; /** * Props for DateRange.Input component */ export interface DateRangeInputProps extends Omit, 'children' | 'type' | 'value' | 'defaultValue'> { /** Whether to render as a child component */ asChild?: boolean; /** Children for custom rendering */ children?: AsChildChildren<{ startDate: Date; endDate: Date; onChange: (start: Date, end: Date) => void; /** IANA timezone string for the time slots (e.g., "America/New_York") */ timezone: string | undefined; }>; } /** * DateRange namespace for TimeSlotList date range filter */ export declare const DateRange: { Input: React.ForwardRefExoticComponent>; }; /** * TimeSlot namespace containing components for displaying individual time slot data. * These components must be used within TimeSlotList.TimeSlotRepeater. * * @example * ```tsx * * * * * * // Location selection - visible when slot is selected * * * * * * * * // Staff member selection - visible when slot is selected * * * * * * * * ``` */ export declare const TimeSlot: { StartDate: React.ForwardRefExoticComponent>; EndDate: React.ForwardRefExoticComponent>; Duration: React.ForwardRefExoticComponent>; Actions: { Select: React.ForwardRefExoticComponent>; ClearStaffSelection: React.ForwardRefExoticComponent>; }; Location: { Name: React.ForwardRefExoticComponent>; }; StaffMembers: React.ForwardRefExoticComponent>; StaffMemberRepeater: React.ForwardRefExoticComponent>; StaffMember: { Name: React.ForwardRefExoticComponent>; Actions: { Select: React.ForwardRefExoticComponent>; }; }; };