import { WishlistRepository } from '../repositories/wishlist.repository';

export class WishlistService {
  constructor(private readonly repository: WishlistRepository) {}

  getItems(): string[] {
    return this.repository.getAll();
  }

  addItem(productId: string): void {
    this.repository.add(productId);
  }

  removeItem(productId: string): void {
    this.repository.remove(productId);
  }

  isInWishlist(productId: string): boolean {
    return this.repository.has(productId);
  }
}
