import { LessonsDeskView } from './lessons-desk-view'
import { LessonsInstructorView } from './lessons-instructor-view'

interface LessonsStationProps {
  permissions: string[]
}

export function LessonsStation({ permissions }: LessonsStationProps) {
  const canEdit = permissions.includes('lessons.edit') || permissions.includes('lessons.admin')

  // Front desk (admin/edit) gets desk view with full overview
  // Instructor (view only) gets focused instructor view
  if (canEdit) {
    return <LessonsDeskView canEdit={canEdit} />
  }

  return <LessonsInstructorView canEdit={false} />
}
