using ActionGame.GameResources.Models;
using ActionGame.RawResources.Manager;
using Microsoft.Xna.Framework.Graphics;
using System;
using static ActionGame.GameResources.Models.ItemDefinition;


namespace ActionGame.GameArtifacts.Models.Items
{
    public class Item
    {
        public Int32 Key { get; set; }
        public String Name { get; set; }
        public ItemType ItemType { get; set; }
        public Texture2D Texture { get; set; }
        public String Description { get; set; }
        public Boolean IsFixedPower { get; set; }
        public Int32 Power { get; set; }
        public Int32 MaxCapacity { get; set; }


        public Item()
        {

        }


        public Item(ItemDefinition definition, IRawContentManager rawContentManager)
        {
            this.Key = definition.Key;
            this.Name = definition.Name;
            this.ItemType = (ItemType)definition.ItemTypeKey;
            this.Texture = rawContentManager.TextureRepository.GetContent(definition.TextureKey);
            this.Description = definition.Description;
            this.IsFixedPower = definition.IsFixedPower;
            this.Power = definition.Power;
            this.MaxCapacity = definition.MaxCapacity;
        }


    }
}
