using System;

namespace NBF
{
    public abstract class BaseAttribute : Attribute
    {
    }

    [AttributeUsage(AttributeTargets.Class)]
    public class UIBindAttribute : BaseAttribute
    {
        public int Id;

        public UIBindAttribute(int id)
        {
            this.Id = id;
        }
    }

    [AttributeUsage(AttributeTargets.Method)]
    public class UIExtensionAutoBindAttribute : BaseAttribute
    {
    }

    [AttributeUsage(AttributeTargets.Field)]
    public class InputIconAttribute : BaseAttribute
    {
        public string KeyBoardIcon;
        public string ControllerIcon;

        /// <summary>
        /// 
        /// </summary>
        /// <param name="keyBoardIcon">键盘图标</param>
        /// <param name="controllerIcon">控制器图标</param>
        public InputIconAttribute(string keyBoardIcon, string controllerIcon)
        {
            KeyBoardIcon = keyBoardIcon;
            ControllerIcon = controllerIcon;
        }
    }


    [AttributeUsage(AttributeTargets.Field | AttributeTargets.Class, AllowMultiple = true)]
    public class TitleAttribute : BaseAttribute
    {
        public string Title;

        public TitleAttribute(string title)
        {
            Title = title;
        }
    }

    [AttributeUsage(AttributeTargets.Field | AttributeTargets.Class, AllowMultiple = true)]
    public class DescriptionAttribute : BaseAttribute
    {
        public string Description;

        public DescriptionAttribute(string description)
        {
            Description = description;
        }
    }

    [AttributeUsage(AttributeTargets.Field | AttributeTargets.Class, AllowMultiple = true)]
    public class SortAttribute : BaseAttribute
    {
        public int Sort;

        public SortAttribute(int sort)
        {
            Sort = sort;
        }
    }

    [AttributeUsage(AttributeTargets.Method)]
    public class InputInvokeAttribute : BaseAttribute
    {
        public string Name;
        public string Key;
        public UIInputButtonShowMode Mode;

        public InputInvokeAttribute(string name, UIInputButtonShowMode mode = UIInputButtonShowMode.None,
            string key = "")
        {
            Name = name;
            Key = key;
            Mode = mode;
        }
    }
}