import type { ApiEvent, Event, EventDate, EventDeliveryMode } from "./types/event.js"; /** Map raw v6 API event to the normalized Event shape. */ export declare function mapApiEvent(raw: ApiEvent): Event; /** * Sessions a customer can actually book: must have an id, be flagged * available, and not be expired or full. */ export declare function getAvailableEventDates(event: Event): EventDate[]; /** First bookable session, or first session, or null when none exist. */ export declare function getPrimaryEventDate(event: Event): EventDate | null; /** True when the event has at least one bookable session and isn't past/cancelled. */ export declare function isEventBookable(event: Event): boolean; /** * Maximum allowed quantity for a registration, clamped by both the * event-level cap and the session's remaining quota. */ export declare function getMaxOrderQuantity(event: Event, date: EventDate | null): number; /** Sort upcoming events by primary session start time, ascending. */ export declare function sortEventsForDisplay(events: Event[]): Event[]; export interface FormatEventPriceOptions { /** BCP-47 locale; defaults to "en". */ locale?: string; /** Label shown when `event.isFree`. Defaults to "Free". */ freeLabel?: string; } export declare function formatEventPrice(event: Event, opts?: FormatEventPriceOptions): string; /** True when the payable price is below the regular list price. */ export declare function eventHasPromoPrice(event: Pick): boolean; export interface FormatEventDateOptions { /** BCP-47 locale; defaults to "en". */ locale?: string; /** IANA time zone, e.g. "Asia/Hong_Kong". Defaults to runtime tz. */ timeZone?: string; /** Label shown when date is null/invalid. Defaults to "TBA". */ fallbackLabel?: string; /** Optional suffix appended after time-of-day output (e.g. "HKT"). */ timezoneLabel?: string; } export declare function formatEventDate(date: EventDate | null, opts?: FormatEventDateOptions): string; export declare function getDeliveryModeLabel(mode: EventDeliveryMode): string; export interface EventAvailabilityLabels { cancelled?: string; past?: string; full?: string; open?: string; } export declare function getEventAvailabilityLabel(event: Event, labels?: EventAvailabilityLabels): string; /** * Strip HTML tags and decode common entities. Use when an `Event.description` * may contain HTML (it falls back to `content` when `introduction` is empty). * * Not a sanitizer — for `innerHTML` rendering, use a real sanitizer like * DOMPurify. Use this only when the destination is plain text. */ export declare function stripHtml(value: string | null | undefined): string; //# sourceMappingURL=events.d.ts.map