using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.UI;

public class RaritySummaryView : MonoBehaviour
{
    [SerializeField] private List<RarityStockView> rarityStockViews;
    
    public void SetHasRarity(List<(ProductRarity rarity, int price, int stock)> dataList)
    {
        foreach (var data in dataList)
        {
            rarityStockViews.First(x => x.Rarity == data.rarity)?.SetText(data.price, data.stock);
        }
    }
}