import { Product } from '@/domain/entities';
import { IProductRepository } from '@/application/ports/IProductRepository';

/**
 * USE CASE — Load one product for the product detail page
 */
export class GetProductBySlugUseCase {
  constructor(private readonly products: IProductRepository) {}

  execute(slug: string): Product | undefined {
    return this.products.findBySlug(slug);
  }
}