import { IProduct } from './FavoriteInterfaces';
import { IProductFavorites } from '@assets/js-shop/GraphQLInterfaces';

export class Utils {
   static findProductInFavorites(items: IProductFavorites[], product: IProduct): IProductFavorites {
      for (const index in items) {
         const item = items[index];
         if (product.productId === item.productId) {
            return item;
         }
      }

      return null;
   }
}
