/**
 * Shared types for event display blocks
 */
import type { LocationCoordinates } from '@riverbankcms/core';
import type { Media } from '../../../../lib/media';
import type { BlockBookingPaymentTerms } from '../../shared/bookingPaymentTerms';
import type { PublicTeamMemberSummary } from '../../shared/teamMembers';
import type { CoursePricing } from '../../courses/shared/types';
import type { EventBlockKind, EventScheduleScope, EventSurfacePreset, EventSurfaceScope } from './filtering';
/**
 * Geographic coordinates for venue location
 */
export type VenueLocation = LocationCoordinates;
/**
 * Venue information for events
 */
export type EventVenue = {
    id: string;
    name: string;
    address: string | null;
    location: VenueLocation | null;
};
/**
 * Category information for events (for filtering)
 */
export type EventCategory = {
    id: string;
    name: string;
    color: string | null;
};
/**
 * Pricing type for events
 */
export type PricingType = "free" | "paid" | "pass_only" | "membership_only";
/**
 * Access restriction type for events
 */
export type AccessRestriction = "none" | "category";
export type PublicEventTicketTypeAvailability = {
    kind: "available";
    remainingCapacity: number | null;
} | {
    kind: "unavailable";
    reason: "inactive" | "not_on_sale_yet" | "sale_ended" | "sold_out" | "event_sold_out";
    remainingCapacity: number | null;
};
export type PublicEventTicketType = {
    id: string;
    siteId: string;
    eventSeriesId: string;
    name: string;
    description: string | null;
    priceAmount: number;
    isActive: boolean;
    sortOrder: number;
    capacityMode: "limited" | "unlimited";
    capacityLimit: number | null;
    attendanceScope?: "in_person" | "online" | "both";
    saleStartsAt: string | null;
    saleEndsAt: string | null;
    availability: PublicEventTicketTypeAvailability;
    createdAt: string;
    updatedAt: string;
};
export type PublicEventAttendanceMode = "in_person" | "online";
export type PublicEventAttendanceModeAvailability = {
    mode: PublicEventAttendanceMode;
    capacity: number | null;
    registeredCount: number;
    availableSpots: number | null;
    waitlistEnabled: boolean;
};
/**
 * Public event data from the API
 * Used by Event Spotlight, Event Calendar, and Event Listing blocks
 */
export type PublicEvent = {
    /** Discriminator for consumers (e.g. course sessions are not individually registerable). */
    kind?: "event" | "course_session";
    /** Canonical event-series preset when this is an event occurrence. */
    eventPreset?: "event" | EventSurfacePreset;
    /** Whether this occurrence belongs to a recurring or one-off series. */
    scheduleScope?: Exclude<EventScheduleScope, "any">;
    id: string;
    /** Always the occurrence ID (stable pagination cursor) */
    occurrenceId: string;
    seriesId: string;
    title: string;
    description: string | null;
    presentation?: {
        cardTitleOverride?: string | null;
        summary?: string | null;
        image?: Media | null;
        tags?: string[];
        ctaLabel?: string | null;
        badges?: string[];
    };
    slug: string;
    /** Canonical URL path (includes any required date segments for occurrences) */
    path: string;
    /** Whether this event requires registration (drop-in events return false). */
    requiresRegistration: boolean;
    /** How people can attend this event. */
    deliveryMode: "in_person" | "online" | "hybrid";
    /** Per-mode availability used by registration flows. */
    attendanceModes: PublicEventAttendanceModeAvailability[];
    startsAt: string;
    endsAt: string;
    capacity: number | null;
    registeredCount: number;
    availableSpots: number | null;
    /** Whether waitlist registration is available when the event is full. */
    waitlistEnabled: boolean;
    venue: EventVenue | null;
    /** Event category for filtering (from event_series.event_category_id) */
    eventCategory: EventCategory | null;
    teamMembers?: PublicTeamMemberSummary[];
    /** Event series status: 'active' events accept registrations, 'draft' events only in preview mode */
    status?: "active" | "draft" | "archived";
    /** Effective IANA timezone identifier for this event (venue override > site default). */
    timeZone: string;
    /** How attendance is paid for */
    pricingType: PricingType;
    /** Price in cents (when pricingType is 'paid') */
    price: number | null;
    /** Currency code (ISO 4217), defaults to 'USD' */
    currency: string;
    /** Shared booking payment-terms model for appointments/events/courses. */
    paymentTerms: BlockBookingPaymentTerms;
    /** Persisted pricing mode: legacy single-price or explicit ticket types. */
    pricingMode?: "single" | "ticket_types";
    /** Named ticket options when the series uses ticket-type pricing. */
    ticketTypes?: PublicEventTicketType[];
    /** Access restriction type */
    accessRestriction: AccessRestriction;
    /** Event category IDs when accessRestriction is 'category' */
    allowedCategoryIds: string[];
    /** Whether guest details are required for additional attendees */
    requireGuestDetails?: boolean;
    /** Whether the event accepts pass redemptions (from event series settings) */
    acceptsPasses?: boolean;
    /** Whether the event accepts membership access (from event series settings) */
    acceptsMemberships?: boolean;
    /** Course metadata when this occurrence is part of a paid-upfront course. */
    course?: {
        id: string;
        pricing?: CoursePricing;
        /** Course price in cents (paid once for all sessions) */
        priceCents: number | null;
        currency: string;
        /** True if the course has not started yet */
        enrollmentOpen: boolean;
    } | null;
};
/**
 * Card variant options for event display
 */
export type CardVariant = "default" | "variant1" | "variant2";
/**
 * Card orientation options for event display
 * - vertical: Standard card layout with image on top (grid mode)
 * - horizontal: Image on left, content on right (stack mode)
 */
export type CardOrientation = "vertical" | "horizontal";
/**
 * Button variant options for event actions
 */
export type ButtonVariant = "primary" | "secondary" | "outline" | "link";
/**
 * Layout options for event lists
 */
export type EventLayout = "grid" | "stack" | "compact";
/**
 * Column options for grid layouts
 */
export type ColumnOption = "2" | "3" | "4";
/**
 * Calendar view options
 */
export type CalendarView = "month" | "week";
/**
 * Week start day options
 */
export type WeekStart = "sunday" | "monday";
/**
 * Display mode options for the enhanced event-calendar block
 * - combined: Tabbed view with List + Calendar tabs (default)
 * - month: Full month calendar only
 * - week: Week calendar only
 * - list: List of events only (with load-more pagination)
 */
export type DisplayMode = "combined" | "month" | "week" | "list" | "timetable";
/**
 * Filter auto-show options
 * - auto: Show filter when site has >1 category with upcoming events
 * - always: Always show filter
 * - never: Never show filter
 */
export type FilterAutoShow = "auto" | "always" | "never";
/**
 * Calendar tab view options for Combined mode
 * - both: Show toggle for month/week
 * - month: Month view only
 * - week: Week view only
 */
export type CalendarTabViews = "both" | "month" | "week";
export type { EventBlockKind, EventScheduleScope, EventSurfacePreset, EventSurfaceScope };
