import '../../../api/mhsl/customTimetableEvent/customTimetableEvent.dart';
import '../../../api/webuntis/queries/getTimetable/getTimetableResponse.dart';

class ArbitraryAppointment {
  GetTimetableResponseObject? webuntis;
  CustomTimetableEvent? custom;

  ArbitraryAppointment({this.webuntis, this.custom}) {}

  bool hasWebuntis() {
    return webuntis != null;
  }

  bool hasCustom() {
    return custom != null;
  }

  void handlers(void Function(GetTimetableResponseObject webuntisData) webuntis, void Function(CustomTimetableEvent customData) custom) {
    if(hasWebuntis()) webuntis(this.webuntis!);
    if(hasCustom()) custom(this.custom!);
  }
}