import '../domain/product_category.dart';
import '../domain/product_publishing_repository.dart';

/// Use case: retrieve all product categories from the store.
///
/// Delegates to [ProductPublishingRepository.getCategories] and returns the
/// list of [ProductCategory] objects.
class GetCategories {
  final ProductPublishingRepository _repository;

  const GetCategories(this._repository);

  Future<List<ProductCategory>> call() {
    return _repository.getCategories();
  }
}
