using UnityEngine;

public class RarityView : MonoBehaviour
{
    [SerializeField] private GameObject normalObject;
    [SerializeField] private GameObject yellowObject;
    [SerializeField] private GameObject copperObject;
    [SerializeField] private GameObject silverObject;
    [SerializeField] private GameObject goldObject;
    [SerializeField] private GameObject rainbowObject;

    public void SetRarity(ProductRarity rarity)
    {
        if (normalObject != null)
        {
            normalObject.SetActive(rarity == ProductRarity.Normal);
        }
        yellowObject.SetActive(rarity == ProductRarity.Yellow);
        copperObject.SetActive(rarity == ProductRarity.Copper);
        silverObject.SetActive(rarity == ProductRarity.Silver);
        goldObject.SetActive(rarity == ProductRarity.Gold);
        rainbowObject.SetActive(rarity == ProductRarity.Rainbow);
    }
}
