/// Use case: Récupérer le suivi budgétaire
library get_budget_tracking;

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

@lazySingleton
class GetBudgetTracking {
  final FinanceWorkflowRepository repository;

  GetBudgetTracking(this.repository);

  Future<Either<Failure, Map<String, dynamic>>> call({
    required String budgetId,
  }) async {
    if (budgetId.isEmpty) {
      return Left(ValidationFailure('ID budget requis'));
    }

    return await repository.getBudgetTracking(budgetId: budgetId);
  }
}
