import type { PublicEvent, PublicEventTicketType, PublicEventTicketTypeAvailability } from '../../../blocks/events/shared/types';
import type { OccurrenceContext } from '../../../blocks/event-registration.shared';
import type { AvailablePass, AvailableMembership, EligibilityEventTicketType } from '../../api/types';
export type { PublicEvent, OccurrenceContext };
export type { FormData } from '../../shared';
/**
 * Guest details for additional attendees (when "collect all attendee details" is enabled)
 */
export type Guest = {
    name: string;
    email: string | null;
    phone: string | null;
};
/**
 * Guest validation errors - maps guest index to error messages
 */
export type GuestErrors = Record<number, {
    /** Error message for name field */
    name?: string;
}>;
export type RegistrationStep = 'select-event' | 'select-tickets' | 'enter-details' | 'select-payment' | 'submitting' | 'redirecting' | 'verifying-payment' | 'verifying-timeout' | 'payment-failed' | 'success' | 'error';
export type RegistrationResult = {
    status: 'confirmed' | 'waitlist';
    /**
     * Optional success copy overrides (e.g. idempotent "already registered" responses).
     * When omitted, the block-level `successMessage`/default copy is used.
     */
    title?: string;
    message?: string;
    variant?: 'success' | 'info';
};
export type RegistrationAttendanceMode = 'in_person' | 'online';
/**
 * Eligibility data for an event registration.
 * Transformed from API response for component use.
 */
export type EligibilityData = {
    /** Whether the event is free (no payment required) */
    isFree: boolean;
    /** Whether the user has any payment/registration options available */
    eligible: boolean;
    /** Whether the selected event/ticket type currently requires payment. */
    requiresPayment: boolean;
    /** Persisted pricing mode for the underlying event series. */
    pricingMode?: 'single' | 'ticket_types';
    /** Selected ticket type echoed back from the eligibility API, if any. */
    selectedTicketTypeId?: string | null;
    /** Public ticket types available for selection in ticket-type mode. */
    ticketTypes?: EligibilityEventTicketType[];
    /** Whether the event is currently full for the requested ticket count */
    isFull: boolean;
    /** Whether waitlists are enabled for this event */
    waitlistEnabled: boolean;
    /** Whether this registration can join the waitlist instead of paying */
    canJoinWaitlist: boolean;
    /** Event price in cents (null if free) */
    price: number | null;
    /** Price currency code */
    currency: string;
    /** Whether passes require authentication to view */
    requiresAuthForPasses: boolean;
    /** Whether memberships require authentication to view */
    requiresAuthForMemberships: boolean;
    /** User's eligible passes for this event */
    eligiblePasses: Array<{
        id: string;
        passName: string;
        creditsRemaining: number;
    }>;
    /** User's eligible memberships for this event */
    eligibleMemberships: Array<{
        id: string;
        membershipName: string;
    }>;
    /** Whether the event accepts direct payment */
    canPayDirectly: boolean;
    /** Whether the event accepts passes */
    eventAcceptsPasses: boolean;
    /** Whether the event accepts memberships */
    eventAcceptsMemberships: boolean;
    /** Passes available for purchase (upsell) */
    availablePasses: AvailablePass[];
    /** Memberships available for purchase (upsell) */
    availableMemberships: AvailableMembership[];
};
export type { EligibilityEventTicketType, PublicEventTicketType, PublicEventTicketTypeAvailability };
export type RegistrationEvent = Omit<PublicEvent, 'id' | 'occurrenceId' | 'ticketTypes'> & {
    publicEventId: string;
    registrationOccurrenceId: string;
    ticketTypes: PublicEventTicketType[];
};
/**
 * Payment selection state for the summary bar.
 * Used to show product info (pass/membership) in the summary.
 * Set by the registration flow state machine and updated by PaymentSelectionStep.
 */
export type PaymentSelection = {
    /** Selected payment method (null if not yet selected) */
    method: 'free' | 'pass' | 'membership' | 'stripe' | 'pass_bundle' | 'membership_bundle' | null;
    /** Pass ID if method is 'pass' */
    passId?: string;
    /** Membership ID if method is 'membership' */
    membershipId?: string;
    /** Bundle pass ID if method is 'pass_bundle' */
    bundlePassId?: string;
    /** Bundle membership ID if method is 'membership_bundle' */
    bundleMembershipId?: string;
    /** Product name for summary bar display */
    productName?: string;
    /** Product description for summary bar display */
    productDescription?: string;
    /** Product price in cents (for bundles) */
    productPrice?: number;
    /** Product currency code */
    productCurrency?: string;
    /** Payment interval for memberships (e.g., 'month', 'year') */
    productInterval?: string;
};
/**
 * State reported by PaymentSelectionStep for parent to render footer actions.
 */
export type PaymentStepState = {
    /** Current status of the payment step */
    status: 'loading' | 'error' | 'not-eligible' | 'ready';
    /** Whether the continue button should be enabled */
    canContinue: boolean;
    /** Text for the continue button */
    buttonText: string;
    /** Whether login prompt should be shown (not in footer, but affects state) */
    showLoginPrompt: boolean;
};
export type EventRegistrationClientProps = {
    /** @deprecated Site ID is now provided by BlockApiProvider context */
    siteId?: string;
    occurrenceContext?: OccurrenceContext | null;
    contentEntry?: {
        id: string;
        slug: string;
        contentTypeSlug: string;
    } | null;
    events?: PublicEvent[] | null;
    maxTickets?: string;
    showVenue?: boolean;
    showCapacity?: boolean;
    successMessage?: string;
    waitlistMessage?: string;
    buttonText?: string;
    buttonVariant?: 'primary' | 'secondary' | 'outline';
    className?: string;
    /**
     * @deprecated Custom endpoints no longer supported - API client handles routing
     */
    registrationEndpoint?: string;
    /**
     * @deprecated Custom endpoints no longer supported - API client handles routing
     */
    eligibilityEndpoint?: string;
    /**
     * @deprecated Custom endpoints no longer supported - API client handles routing
     */
    checkoutEndpoint?: string;
    /** Server-passed spam protection flag. Falls back to NEXT_PUBLIC_SPAM_PROTECTION_ENABLED. */
    spamProtectionEnabled?: boolean;
    /**
     * @deprecated Stage is now controlled by BlockApiProvider's isPreview config
     */
    stage?: 'preview' | 'published';
    /** Support email to display on timeout step */
    supportEmail?: string;
};
