export type Theme = '亲子' | '情侣' | '朋友' | '银发' | '研学'
export type Interest = '自然风光' | '文化场馆' | '生态科普' | '美食' | '摄影'
export type Duration = 'half_day' | 'full_day'
export type Pace = 'relaxed' | 'moderate' | 'compact'
export type Transport = 'walking' | 'driving' | 'public_transport'
export type BudgetLevel = 'economy' | 'standard' | 'quality'

export interface TravelPreferences {
  destination: '深圳市光明区'
  themes: Theme[]
  duration: Duration
  pace: Pace
  interests: Interest[]
  adults: number
  children: number
  childAges: number[]
  transport: Transport
  budgetLevel: BudgetLevel
  extraRequirements: string
}

export interface ItineraryItem {
  startTime: string
  endTime: string
  placeId: string
  placeName: string
  activity: string
  reason: string
  transferFromPreviousMinutes: number | null
  tips: string[]
}

export interface ItinerarySource {
  placeId: string
  sourceName: string
  sourceUrl: string
  updatedAt: string
}

export interface Itinerary {
  title: string
  summary: string
  totalMinutes: number
  estimatedCostText: string
  items: ItineraryItem[]
  notes: string[]
  sources: ItinerarySource[]
}

export interface PlanResponse {
  conversationId: string
  assistantMessage: string
  itinerary: Itinerary
  changeSummary?: string | null
}

export interface APIError {
  detail?: string
}
