/** Browsing payloads (technical-plan 4.9): categories, course cards, coaches. */

export interface CategoryDto {
  key: string
  title: string
  /** lucide icon name, e.g. */
  icon: string | null
  courses_count: number
}

export interface CourseCoachDto {
  name: string
  slug: string | null
  field: string | null
  verified: boolean
  avatar: string | null
  critique_price: number | null
}

/** A course card (home lists, explore, a coach's courses). */
export interface CourseCardDto {
  id: number
  title: string
  slug: string | null
  subtitle: string | null
  category: { key: string; title: string; icon: string | null } | null
  level: { value: string; label: string } | null
  medium: { key: string; label: string } | null
  hours: number | null
  coproduced: boolean
  coach_name: string | null
  coach: CourseCoachDto | null
  description: string | null
  price: number
  start_date: string | null
  end_date: string | null
  is_purchasable: boolean
  cover: string | null
  lessons_count: number | null
  progress_percent: number | null
  owned?: boolean | null
}

/** A coach card (home, explore). */
export interface CoachCardDto {
  name: string
  slug: string
  field: string | null
  verified: boolean
  avatar: string | null
  cover: string | null
  critique_price: number | null
  courses_count: number | null
}

/** A coach's public profile (GET /v1/coaches/{slug}). */
export interface CoachProfileDto extends CoachCardDto {
  bio: string | null
  courses_count: number
  learners_count: number
  courses: CourseCardDto[]
  can_message?: boolean
}
