part of 'timer_bloc.dart';

abstract class TimerState extends Equatable {
  final int duration;

  TimerState(this.duration, [List props = const []]);

  @override
  List<Object> get props => [];
}

class TickStart extends TimerState {
  TickStart(int duration) : super(duration);
  @override
  String toString() => 'Start { duration: $duration }';
}

class TimerRunning extends TimerState {
  TimerRunning(int duration) : super(duration);

  @override
  String toString() => 'Running { duration: $duration }';
}

class TimerReady extends TimerState {
  TimerReady(int duration) : super(duration);

  @override
  String toString() => 'Ready { duration: $duration }';
}

class TimerPaused extends TimerState {
  TimerPaused(int duration) : super(duration);

  @override
  String toString() => 'Paused { duration: $duration }';
}

class TimerFinished extends TimerState {
  TimerFinished(int duration) : super(duration);

  @override
  String toString() => 'Finished { duration: $duration }';
}

class TimerError extends TimerState {
  final String message;
  TimerError(int duration, {required this.message}) : super(duration);
}
