/**
 * Type definitions for submission data structures
 * These replace the `any` types in entityTransformers.ts
 */

export interface ParkSubmissionData {
  name: string;
  slug: string;
  description?: string | null;
  park_type: string;
  status: string;
  opening_date?: string | null;
  opening_date_precision?: string | null;
  closing_date?: string | null;
  closing_date_precision?: string | null;
  website_url?: string | null;
  phone?: string | null;
  email?: string | null;
  operator_id?: string | null;
  property_owner_id?: string | null;
  location_id?: string | null;
  banner_image_url?: string | null;
  banner_image_id?: string | null;
  card_image_url?: string | null;
  card_image_id?: string | null;
  source_url?: string;
  submission_notes?: string;
  is_test_data?: boolean;
}

export interface RideSubmissionData {
  name: string;
  slug: string;
  description?: string | null;
  category: string;
  ride_sub_type?: string | null;
  status: string;
  park_id: string;
  ride_model_id?: string | null;
  manufacturer_id?: string | null;
  designer_id?: string | null;
  opening_date?: string | null;
  opening_date_precision?: string | null;
  closing_date?: string | null;
  closing_date_precision?: string | null;
  height_requirement?: number | null;
  age_requirement?: number | null;
  capacity_per_hour?: number | null;
  duration_seconds?: number | null;
  max_speed_kmh?: number | null;
  max_height_meters?: number | null;
  length_meters?: number | null;
  drop_height_meters?: number | null;
  inversions?: number | null;
  max_g_force?: number | null;
  coaster_type?: string | null;
  seating_type?: string | null;
  intensity_level?: string | null;
  track_material?: string[] | null;
  support_material?: string[] | null;
  propulsion_method?: string[] | null;
  // Water ride specific
  water_depth_cm?: number | null;
  splash_height_meters?: number | null;
  wetness_level?: string | null;
  flume_type?: string | null;
  boat_capacity?: number | null;
  // Dark ride specific
  theme_name?: string | null;
  story_description?: string | null;
  show_duration_seconds?: number | null;
  animatronics_count?: number | null;
  projection_type?: string | null;
  ride_system?: string | null;
  scenes_count?: number | null;
  // Flat ride specific
  rotation_type?: string | null;
  motion_pattern?: string | null;
  platform_count?: number | null;
  swing_angle_degrees?: number | null;
  rotation_speed_rpm?: number | null;
  arm_length_meters?: number | null;
  max_height_reached_meters?: number | null;
  // Kiddie ride specific
  min_age?: number | null;
  max_age?: number | null;
  educational_theme?: string | null;
  character_theme?: string | null;
  // Transportation ride specific
  transport_type?: string | null;
  route_length_meters?: number | null;
  stations_count?: number | null;
  vehicle_capacity?: number | null;
  vehicles_count?: number | null;
  round_trip_duration_seconds?: number | null;
  // Images
  banner_image_url?: string | null;
  banner_image_id?: string | null;
  card_image_url?: string | null;
  card_image_id?: string | null;
  image_url?: string | null;
  source_url?: string;
  submission_notes?: string;
  is_test_data?: boolean;
}

export interface CompanySubmissionData {
  name: string;
  slug: string;
  company_type: 'manufacturer' | 'operator' | 'designer' | 'property_owner';
  description?: string | null;
  person_type?: 'company' | 'individual' | 'firm' | 'organization';
  founded_year?: number | null; // Legacy field
  founded_date?: string | null;
  founded_date_precision?: string | null;
  headquarters_location?: string | null;
  website_url?: string | null;
  logo_url?: string | null;
  banner_image_url?: string | null;
  banner_image_id?: string | null;
  card_image_url?: string | null;
  card_image_id?: string | null;
  source_url?: string;
  submission_notes?: string;
  is_test_data?: boolean;
}

export interface RideModelSubmissionData {
  name: string;
  slug: string;
  manufacturer_id: string;
  category: string;
  ride_type?: string | null;
  description?: string | null;
  banner_image_url?: string | null;
  banner_image_id?: string | null;
  card_image_url?: string | null;
  card_image_id?: string | null;
  source_url?: string;
  submission_notes?: string;
  is_test_data?: boolean;
}

export interface TimelineEventItemData {
  entity_id: string;
  entity_type: 'park' | 'ride' | 'company' | 'ride_model';
  event_type: string;
  event_date: string; // ISO date
  event_date_precision: 'day' | 'month' | 'year';
  title: string;
  description?: string | null;
  from_value?: string | null;
  to_value?: string | null;
  from_entity_id?: string | null;
  to_entity_id?: string | null;
  from_location_id?: string | null;
  to_location_id?: string | null;
  display_order?: number;
  is_public?: boolean;
}
