part of 'schedule_bloc.dart';

@immutable
sealed class ScheduleEvent {
  const ScheduleEvent();
}

class ScheduleInitEvent extends ScheduleEvent {
  const ScheduleInitEvent();
}

class ScheduleEventChangeMode extends ScheduleEvent {
  const ScheduleEventChangeMode({
    this.isInEditScheduleMode,
    this.isInScheduleAddMode,
    this.editedDate,
    this.isWeekly = false,
  });

  final bool? isInEditScheduleMode;
  final bool? isInScheduleAddMode;
  final DateTime? editedDate;
  final bool isWeekly;
}

class ScheduleEventSelectDates extends ScheduleEvent {
  const ScheduleEventSelectDates({required this.dates});

  final List<DateTime> dates;
}

class ScheduleEventAddSlot extends ScheduleEvent {
  const ScheduleEventAddSlot();
}

class ScheduleEventRemoveSlot extends ScheduleEvent {
  const ScheduleEventRemoveSlot({
    required this.slot,
    required this.slotIndex,
  });

  final ScheduleSlot slot;
  final int slotIndex;
}

class ScheduleEventDeleteSchedule extends ScheduleEvent {
  const ScheduleEventDeleteSchedule({
    required this.schedule,
  });

  final DaySchedule schedule;
}

class ScheduleEventEditSlot extends ScheduleEvent {
  const ScheduleEventEditSlot({
    required this.slot,
    required this.slotIndex,
    this.start,
    this.end,
  });

  final ScheduleSlot slot;
  final int slotIndex;
  final DateTime? start;
  final DateTime? end;
}

class ScheduleEventSave extends ScheduleEvent {
  const ScheduleEventSave();
}

class ScheduleEventCancel extends ScheduleEvent {
  const ScheduleEventCancel();
}
