import 'package:dartz/dartz.dart';
import '../../repositories/auth_repository.dart';
import '../../../data/models/auth/auth_user.dart';
import '../../../core/errors/failures.dart';
import '../base_usecase.dart';

/// 현재 로그인한 사용자 정보 조회 UseCase (AuthRepository 기반)
class GetCurrentUserUseCase extends UseCase<AuthUser, NoParams> {
  final AuthRepository _authRepository;

  GetCurrentUserUseCase(this._authRepository);

  @override
  Future<Either<Failure, AuthUser>> call(NoParams params) async {
    return await _authRepository.getCurrentUser();
  }
}
