using UnityEngine;

namespace MaskShop
{
    /// <summary>
    /// Represents a mask request with specific parameters
    /// </summary>
    [System.Serializable]
    public class MaskRequest
    {
        public MaskMood mood;
        public MaskPalette palette;
        public MaskTexture texture;
        public MaskGimmick gimmick;

        public string requestText;

        /// <summary>
        /// Constructor for a complete mask request
        /// </summary>
        public MaskRequest(MaskMood mood, MaskPalette palette, MaskTexture texture, MaskGimmick gimmick)
        {
            this.mood = mood;
            this.palette = palette;
            this.texture = texture;
            this.gimmick = gimmick;
        }

        /// <summary>
        /// Checks if a specific parameter was requested (not null)
        /// </summary>
        public bool HasMood() => mood != null;
        public bool HasPalette() => palette != null;
        public bool HasTexture() => texture != null;
        public bool HasGimmick() => gimmick != null;

        /// <summary>
        /// Returns how many parameters were requested
        /// </summary>
        public int GetRequestedParametersCount()
        {
            int count = 0;
            if (HasMood()) count++;
            if (HasPalette()) count++;
            if (HasTexture()) count++;
            if (HasGimmick()) count++;
            return count;
        }
    }
}