import 'package:equatable/equatable.dart';

abstract class SessionEvent extends Equatable {
  const SessionEvent();

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

class SessionStarted extends SessionEvent {
  final String token;

  const SessionStarted(this.token);

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

class SessionExpired extends SessionEvent {}

class SessionRefreshed extends SessionEvent {
  final String newToken;

  const SessionRefreshed(this.newToken);

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

class SessionEnded extends SessionEvent {}

class SessionRestored extends SessionEvent {
  final String token;
  final DateTime expiresAt;

  const SessionRestored({required this.token, required this.expiresAt});

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