import 'package:krow_core/core.dart';
import 'package:krow_domain/krow_domain.dart';
import '../repositories/home_repository_interface.dart';

/// Use case to fetch dashboard data for the client home screen.
///
/// This use case coordinates with the [HomeRepositoryInterface] to retrieve
/// the [HomeDashboardData] required for the dashboard display.
class GetDashboardDataUseCase implements NoInputUseCase<HomeDashboardData> {
  final HomeRepositoryInterface _repository;

  /// Creates a [GetDashboardDataUseCase].
  GetDashboardDataUseCase(this._repository);

  @override
  Future<HomeDashboardData> call() {
    return _repository.getDashboardData();
  }
}
