import 'package:dartz/dartz.dart';
import '../../../services/auth_service.dart';
import '../../../core/errors/failures.dart';
import '../base_usecase.dart';

/// 로그아웃 UseCase
/// 사용자 로그아웃 처리 및 토큰 삭제
class LogoutUseCase extends UseCase<void, NoParams> {
  final AuthService _authService;

  LogoutUseCase(this._authService);

  @override
  Future<Either<Failure, void>> call(NoParams params) async {
    return await _authService.logout();
  }
}