'use client'

import { Course, Lesson, Enrollment } from '@/lib/sdk/academy/types'

interface CourseStatsProps {
  course: Course
  sortedLessons: Lesson[]
  enrollments: Enrollment[]
  completedEnrollments: number
}

export function CourseStats({ course, sortedLessons, enrollments, completedEnrollments }: CourseStatsProps) {
  return (
    <div className="grid grid-cols-4 gap-4">
      <div className="bg-white rounded-xl border border-gray-200 p-4">
        <div className="text-sm text-gray-500">Lektionen</div>
        <div className="text-2xl font-bold text-gray-900">{sortedLessons.length}</div>
      </div>
      <div className="bg-white rounded-xl border border-gray-200 p-4">
        <div className="text-sm text-gray-500">Dauer</div>
        <div className="text-2xl font-bold text-gray-900">{course.durationMinutes} Min.</div>
      </div>
      <div className="bg-white rounded-xl border border-gray-200 p-4">
        <div className="text-sm text-gray-500">Teilnehmer</div>
        <div className="text-2xl font-bold text-blue-600">{enrollments.length}</div>
      </div>
      <div className="bg-white rounded-xl border border-gray-200 p-4">
        <div className="text-sm text-gray-500">Abgeschlossen</div>
        <div className="text-2xl font-bold text-green-600">{completedEnrollments}</div>
      </div>
    </div>
  )
}
