import 'package:equatable/equatable.dart';

/// Enum representing common break durations in minutes.
enum BreakDuration {
  /// No break.
  none(0),

  /// 10 minutes break.
  ten(10),

  /// 15 minutes break.
  fifteen(15),

  /// 20 minutes break.
  twenty(20),

  /// 30 minutes break.
  thirty(30),

  /// 45 minutes break.
  fortyFive(45),

  /// 60 minutes break.
  sixty(60);

  /// The duration in minutes.
  final int minutes;

  const BreakDuration(this.minutes);
}

/// Represents a break configuration for a shift.
class Break extends Equatable {
  const Break({
    required this.duration,
    required this.isBreakPaid,
  });

  /// The duration of the break.
  final BreakDuration duration;

  /// Whether the break is paid or unpaid.
  final bool isBreakPaid;

  @override
  List<Object?> get props => <Object?>[duration, isBreakPaid];
}
