using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;

[Serializable]
//abstract - changed for Unity Inspector visualisation requirements
public class RequiredSubjectData : IModelMapper<RequiredSubject>
{
    protected virtual string SPRITE_LOCALIZATION => "Sprites/Object Sprites/";
    protected virtual string MODEL_LOCALIZATION => "";

    [SerializeField]
    public int RequiredAmount;

    [SerializeField]
    public string RequiredObjectName;

    public RequiredSubjectData(int requiredAmount)
    {
        RequiredAmount = requiredAmount;
    }

    public RequiredSubjectData(int requiredAmount, string requiredObjectName)
    {
        RequiredAmount = requiredAmount;

        RequiredObjectName = requiredObjectName;
    }

    public RequiredSubjectData(RequiredSubject requiredSubject)
    {
        RequiredAmount = requiredSubject.RequiredAmount;

        RequiredObjectName = requiredSubject.RequiredObject.name;  // NAME of the PREFAB
    }

    // abstract
    public virtual RequiredSubject MapDataToObject(string prefarbAssetName) { return new RequiredSubject(0); } // { return new RequiredSubject(RequiredAmount, RequiredObjectName); }

    // abstarct
    public virtual RequiredSubject MapDataToObject() { return new RequiredSubject(0); } // { return new RequiredSubject(RequiredAmount, RequiredObjectName); }
}