using UnityEngine;
using UnityEngine.UI;

public class BulkOrderNotifyItemView : MonoBehaviour
{
    [SerializeField] private Text materialNameText;
    [SerializeField] private Text materialAmountText;
    [SerializeField] private Transform materialIconTarget;
    [SerializeField] private GameObject itemObject;
    [SerializeField] private GameObject disabledObject;

    public void SetData(string name, int amount, Transform prefab)
    {
        materialAmountText.text = amount.ToString();
        materialNameText.text = name;
        materialIconTarget.DestroyAllChildrens();
        Instantiate(prefab, materialIconTarget);
    }

    public void SetActive(bool active)
    {
        itemObject.SetActive(active);
        disabledObject.SetActive(!active);
    }
}
