using KitsuneCafe.Sys;
using UnityEditor;
using UnityEditor.UIElements;
using UnityEngine.UIElements;

namespace KitsuneCafe.Editor
{
  [CustomPropertyDrawer(typeof(Layer))]
  public class LayerPropertyDrawer : PropertyDrawer
  {
    public override VisualElement CreatePropertyGUI(SerializedProperty property)
    {
      var field = new LayerField(ObjectNames.NicifyVariableName(property.name));

      field.Bind(property.serializedObject);
      field.bindingPath = "index";
      return field;
    }
  }
}
