import 'package:krow_domain/krow_domain.dart';

/// Interface for the Client Authentication Repository.
///
/// This abstraction defines the core authentication operations required for
/// the client application, allowing the presentation layer to work with
/// different data sources (e.g., Supabase, Firebase, or Mock) without
/// depending on specific implementations.
abstract class AuthRepositoryInterface {
  /// Signs in an existing client user using their email and password.
  ///
  /// Returns a [User] object upon successful authentication.
  /// Throws an exception if authentication fails.
  Future<User> signInWithEmail({
    required String email,
    required String password,
  });

  /// Registers a new client user with their business details.
  ///
  /// Takes [companyName], [email], and [password] to create a new account.
  /// Returns the newly created [User].
  Future<User> signUpWithEmail({
    required String companyName,
    required String email,
    required String password,
  });

  /// Authenticates using an OAuth provider.
  ///
  /// [provider] can be 'google' or 'apple'.
  /// Returns a [User] upon successful social login.
  Future<User> signInWithSocial({required String provider});

  /// Terminates the current user session and clears authentication tokens.
  Future<void> signOut();
}
