using System.Collections.Generic;
using System.Linq;

namespace Monkey.Game
{

    public static class FemaleCharacterClothingManager
    {

        private const string FEMALE_CHARACTER_CLOTHING_GAME_OBJECT_PATH = "Ropa";

        static FemaleCharacterClothingManager()
        {

        }

        public static Assets._ReusableScripts.CuchiCuchi.Ropa.PiezasDeRopaLoader GetClothingLoader()
        {
            UnityEngine.GameObject femaleCharacterGameObject = FemaleCharacterManager.GetFemaleCharacterGameObject();

            if (femaleCharacterGameObject == null)
                return null;

            return femaleCharacterGameObject
                .transform
                .Find(FEMALE_CHARACTER_CLOTHING_GAME_OBJECT_PATH)
                .GetComponent<Assets._ReusableScripts.CuchiCuchi.Ropa.PiezasDeRopaLoader>();
        }

        public static List<Assets._ReusableScripts.CuchiCuchi.Ropa.PiezaDeRopaBase> GetClothings()
        {
            Assets._ReusableScripts.CuchiCuchi.Ropa.PiezasDeRopaLoader clothingLoader = GetClothingLoader();

            if (clothingLoader == null)
                return null;

            return clothingLoader.piezasPuestas.ToList();
        }

    }

}
