/// Use case: Récupérer les approbations en attente
library get_pending_approvals;

import 'package:dartz/dartz.dart';
import 'package:injectable/injectable.dart';
import '../../../../core/error/failures.dart';
import '../entities/transaction_approval.dart';
import '../repositories/finance_workflow_repository.dart';

@lazySingleton
class GetPendingApprovals {
  final FinanceWorkflowRepository repository;

  GetPendingApprovals(this.repository);

  Future<Either<Failure, List<TransactionApproval>>> call({
    String? organizationId,
  }) async {
    return await repository.getPendingApprovals(
      organizationId: organizationId,
    );
  }
}
