import 'package:equatable/equatable.dart';

/// Base class for all authentication events in the client feature.
abstract class ClientAuthEvent extends Equatable {
  const ClientAuthEvent();

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

/// Event dispatched when a user attempts to sign in with email and password.
class ClientSignInRequested extends ClientAuthEvent {

  const ClientSignInRequested({required this.email, required this.password});
  final String email;
  final String password;

  @override
  List<Object?> get props => <Object?>[email, password];
}

/// Event dispatched when a user attempts to create a new business account.
class ClientSignUpRequested extends ClientAuthEvent {

  const ClientSignUpRequested({
    required this.companyName,
    required this.email,
    required this.password,
  });
  final String companyName;
  final String email;
  final String password;

  @override
  List<Object?> get props => <Object?>[companyName, email, password];
}

/// Event dispatched for third-party authentication (Google/Apple).
class ClientSocialSignInRequested extends ClientAuthEvent {

  const ClientSocialSignInRequested({required this.provider});
  final String provider;

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

/// Event dispatched when the user requests to terminate their session.
class ClientSignOutRequested extends ClientAuthEvent {
  const ClientSignOutRequested();
}
