import 'package:krow_core/core.dart';
import 'package:krow_domain/krow_domain.dart';
import '../arguments/sign_in_with_social_arguments.dart';
import '../repositories/auth_repository_interface.dart';

/// Use case for signing in a client via social providers (Google/Apple).
class SignInWithSocialUseCase
    implements UseCase<SignInWithSocialArguments, User> {
  final AuthRepositoryInterface _repository;

  const SignInWithSocialUseCase(this._repository);

  /// Executes the social sign-in operation.
  @override
  Future<User> call(SignInWithSocialArguments params) {
    return _repository.signInWithSocial(provider: params.provider);
  }
}
