
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() => webuntis != null;

  bool hasCustom() => custom != null;

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