import 'package:flutter/material.dart';

import 'lesson_status.dart';

class LessonColor {
  static const Color regular = Color.fromARGB(255, 153, 51, 51);
  static const Color ongoing = Color.fromARGB(255, 200, 51, 51);
  static const Color cancelled = Color(0xff000000);
  static const Color irregular = Color(0xff8F19B3);
  static const Color teacherChanged = Color(0xFF29639B);
  static const Color event = Color(0xff2E7D32);
  // Petrol-Türkis für Sonder-Lesson-Types (Aufsicht, Sprechstunde, …) —
  // hebt sie deutlich von regulärem Unterricht (Marianum-Rot) und Events
  // (Grün) ab, ohne den Status-übergreifenden Farb-Code zu verwässern.
  static const Color duty = Color(0xff00796B);
  static const Color parseFallback = Color(0xff404040);

  static Color forStatus(LessonStatus status) {
    switch (status) {
      case LessonStatus.cancelled:
        return cancelled;
      case LessonStatus.event:
        return event;
      case LessonStatus.irregular:
        return irregular;
      case LessonStatus.teacherChanged:
        return teacherChanged;
      case LessonStatus.duty:
        return duty;
      case LessonStatus.past:
      case LessonStatus.regular:
        return regular;
      case LessonStatus.ongoing:
        return ongoing;
    }
  }
}
