import 'package:krow_core/core.dart';
import '../repositories/settings_repository_interface.dart';

/// Use case handles the user sign out process.
///
/// This use case delegates the sign out logic to the [SettingsRepositoryInterface].
class SignOutUseCase implements NoInputUseCase<void> {
  final SettingsRepositoryInterface _repository;

  /// Creates a [SignOutUseCase].
  ///
  /// Requires a [SettingsRepositoryInterface] to perform the sign out operation.
  SignOutUseCase(this._repository);

  @override
  Future<void> call() {
    return _repository.signOut();
  }
}
