/**
 * Unified Program System Types
 *
 * Base interfaces and types for the Unified Program System that handles
 * events, podcasts, and webinars through a single set of generic components.
 *
 * Design Goals:
 *   1. Maximum Reuse: Single set of components works for all program types
 *   2. Type Safety: TypeScript generics ensure correct data shapes
 *   3. Configuration-Driven: Program types defined via configuration objects
 *   4. Admin Consistency: Same patterns work for public pages and admin CRUD
 *
 * Lifted from `lib/types/program-types.ts` in the hub. The pure transform
 * helpers (`transformEventToProgram`, `transformPodcastToProgram`,
 * `transformWebinarToProgram`) also move here — they're pure shape
 * mappers with no DB / state access.
 */
import type { ReactNode } from 'react';
/**
 * Host/Speaker information for programs
 */
export interface ProgramHost {
    id?: string;
    name: string;
    email?: string;
    avatar_url?: string;
    bio?: string;
    role?: string;
}
/**
 * Raw database row from luma_events table
 * Note: Many fields are optional to support partial queries
 * where not all columns are selected. The hosts field uses
 * unknown to accommodate JSON parsing from the database.
 */
export interface LumaEventRow {
    id: string;
    name: string;
    description?: string | null;
    cover_url?: string | null;
    start_at: string;
    end_at: string;
    timezone?: string | null;
    location_name?: string | null;
    location_full_address?: string | null;
    geo_latitude?: number | null;
    geo_longitude?: number | null;
    meeting_url?: string | null;
    event_url?: string | null;
    guest_count?: number | null;
    visibility?: string | null;
    hosts?: ProgramHost[] | null;
    platform_id: string;
    luma_api_id: string;
    is_deleted?: boolean;
}
/**
 * Raw database row from podcast_episodes table
 * Note: Many fields are optional to support partial queries
 * where not all columns are selected.
 */
export interface PodcastEpisodeRow {
    id: string;
    title: string;
    description?: string | null;
    cover_url?: string | null;
    published_at?: string | null;
    created_at: string;
    external_url?: string | null;
    hosts?: ProgramHost[] | null;
    platform_id: string;
    podbean_episode_id: string;
    podbean_podcast_id: string;
    audio_url?: string | null;
    /** Podbean-supplied source video URL (was `video_url` pre-rename). */
    main_video_url?: string | null;
    media_type?: 'audio' | 'video' | null;
    duration_seconds?: number | null;
    status?: string | null;
    is_deleted?: boolean;
    cover_image_override?: string | null;
    custom_video_url?: string | null;
}
/**
 * Raw database row from webinars table
 * Note: Many fields are optional to support partial queries
 * where not all columns are selected.
 */
export interface WebinarRow {
    id: string;
    title: string;
    description?: string | null;
    cover_url?: string | null;
    start_at: string;
    end_at?: string | null;
    timezone?: string | null;
    registration_url?: string | null;
    hosts?: ProgramHost[] | null;
    platform_id: string;
    livestorm_event_id: string;
    is_deleted?: boolean;
    /** Livestorm-supplied recording URL (was `recording_url` pre-rename). */
    main_video_url?: string | null;
    custom_video_url?: string | null;
    display_date_override?: string | null;
    cover_image_override?: string | null;
}
/**
 * Base interface that all program items must implement
 * This enables the generic components to work across events, podcasts, and webinars
 */
export interface BaseProgramItem {
    id: string;
    title: string;
    description: string | null;
    cover_url: string | null;
    date: string;
    external_url?: string | null;
    hosts?: ProgramHost[] | null;
}
/**
 * Event-specific fields (from luma_events table)
 */
export interface EventItem extends BaseProgramItem {
    luma_api_id: string;
    end_at: string;
    timezone?: string | null;
    location_name?: string | null;
    location_full_address?: string | null;
    geo_latitude?: number | null;
    geo_longitude?: number | null;
    meeting_url?: string | null;
    event_url?: string | null;
    guest_count?: number | null;
    visibility?: string | null;
    is_deleted: boolean;
}
/**
 * Podcast episode fields (from podcast_episodes table)
 * Updated for Podbean video podcast support
 */
export interface PodcastItem extends BaseProgramItem {
    author_id?: string | null;
    podbean_episode_id: string;
    podbean_podcast_id: string;
    audio_url?: string | null;
    /** Podbean-supplied source video URL (was `video_url` pre-rename). */
    main_video_url?: string | null;
    media_type: 'audio' | 'video';
    duration_seconds?: number | null;
    status: string;
    published_at: string | null;
    is_deleted: boolean;
    podcast_url?: string | null;
    cover_image_override?: string | null;
    custom_video_url?: string | null;
    transcript?: string | null;
    transcript_words_data?: unknown;
    srt_content?: string | null;
    video_summary?: string | null;
    video_bites?: unknown[];
    highlight_video_url?: string | null;
    highlight_video_source?: string | null;
    highlight_video_thumbnail?: string | null;
    highlight_video_duration_ms?: number | null;
    main_video_thumbnail?: string | null;
    config?: Record<string, unknown>;
    custom_instructions?: string | null;
    seo_title?: string | null;
    seo_description?: string | null;
    seo_keywords?: string | null;
    ai_confidence_video_summary?: number | null;
    ai_confidence_transcript?: number | null;
}
/**
 * Webinar fields (from webinars table)
 */
export interface WebinarItem extends BaseProgramItem {
    author_id?: string | null;
    livestorm_event_id: string;
    start_at: string;
    end_at?: string | null;
    timezone?: string | null;
    registration_url?: string | null;
    is_deleted: boolean;
    /** Livestorm-supplied recording URL (was `recording_url` pre-rename). */
    main_video_url?: string | null;
    custom_video_url?: string | null;
    display_date_override?: string | null;
    cover_image_override?: string | null;
    transcript?: string | null;
    transcript_words_data?: unknown;
    srt_content?: string | null;
    video_summary?: string | null;
    video_bites?: unknown[];
    highlight_video_url?: string | null;
    highlight_video_source?: string | null;
    highlight_video_thumbnail?: string | null;
    highlight_video_duration_ms?: number | null;
    main_video_thumbnail?: string | null;
    config?: Record<string, unknown>;
    custom_instructions?: string | null;
    seo_title?: string | null;
    seo_description?: string | null;
    seo_keywords?: string | null;
    ai_confidence_video_summary?: number | null;
    ai_confidence_transcript?: number | null;
}
/**
 * Program type identifier
 */
export type ProgramType = 'event' | 'podcast' | 'webinar';
/**
 * Labels configuration for a program type
 */
export interface ProgramLabels {
    singular: string;
    plural: string;
    upcoming: string;
    upcomingSection: string;
    archive: string;
    empty: string;
}
/**
 * Configuration object that defines how a program type behaves
 * This is the core abstraction that enables generic components
 */
export interface ProgramConfig<T extends BaseProgramItem = BaseProgramItem> {
    type: ProgramType;
    labels: ProgramLabels;
    dateField: keyof T;
    table: string;
    apiEndpoint: string;
    icon: ReactNode;
    platformIcon?: ReactNode;
    externalLinkLabel: string;
    detailRoute: string;
    sortOrder?: 'asc' | 'desc';
    showInNav?: boolean;
    platformUrl?: string;
    heroCoverAspect?: 'landscape' | 'square';
}
/**
 * Generic response for program list queries
 */
export interface ProgramListResponse<T extends BaseProgramItem> {
    items: T[];
    count: number;
    hasMore?: boolean;
}
/**
 * Generic response for single program queries
 */
export interface ProgramItemResponse<T extends BaseProgramItem> {
    item: T;
    media?: ProgramMedia[];
}
/**
 * Program media (photos, videos, etc.)
 */
export interface ProgramMedia {
    id: string;
    program_id: string;
    media_type: 'image' | 'video' | 'audio';
    media_url: string;
    title?: string | null;
    description?: string | null;
    display_order: number;
    created_at: string;
}
/**
 * Filter options for program queries
 */
export interface ProgramFilter {
    filter: 'upcoming' | 'past' | 'all';
    limit?: number;
    offset?: number;
    search?: string;
}
/**
 * Admin query options
 */
export interface AdminProgramFilter extends ProgramFilter {
    includeDeleted?: boolean;
    sortBy?: string;
    sortOrder?: 'asc' | 'desc';
}
/**
 * Transform a database event row to EventItem
 */
export declare function transformEventToProgram(event: LumaEventRow): EventItem;
/**
 * Transform a database podcast row to PodcastItem
 */
export declare function transformPodcastToProgram(episode: PodcastEpisodeRow): PodcastItem;
/**
 * Transform a database webinar row to WebinarItem
 * Uses display_date_override for date field when available (for backdating)
 * Uses cover_image_override for cover_url when available
 */
export declare function transformWebinarToProgram(webinar: WebinarRow): WebinarItem;
//# sourceMappingURL=program-types.d.ts.map