﻿#if VRC_SDK_VRCSDK3
#if UNITY_EDITOR

using UnityEditor;
using UnityEngine;

namespace VRC.SDK3.Editor
{
    [CustomEditor(typeof(VRC.SDK3.Components.VRCStation))]
    public class VRCStationEditor3 : UnityEditor.Editor
    {
        //private void InspectorField(string propertyName, string humanName)
        //{
        //    SerializedProperty propertyField = serializedObject.FindProperty(propertyName);
        //    EditorGUILayout.PropertyField(propertyField, new GUIContent(humanName), true);
        //}

        //private SerializedProperty playerMobilityProperty;
        //private SerializedProperty disallowTheftProperty;
        //private SerializedProperty exactGunProperty;
        //private SerializedProperty exactGripProperty;
        //private SerializedProperty allowManipulationWhenEquippedProperty;
        //private SerializedProperty orientationProperty;
        //private SerializedProperty autoHoldProperty;
        //private SerializedProperty interactionTextProperty;
        //private SerializedProperty useTextProperty;
        //private SerializedProperty throwVelocityBoostMinSpeedProperty;
        //private SerializedProperty throwVelocityBoostScaleProperty;
        //private SerializedProperty pickupableProperty;
        //private SerializedProperty proximityProperty;

        public override void OnInspectorGUI()
        {
            // DrawDefaultInspector();

            //playerMobilityProperty = serializedObject.FindProperty("playerMobility");

        //    disallowTheftProperty = serializedObject.FindProperty("DisallowTheft");
        //    exactGunProperty = serializedObject.FindProperty("ExactGun");
        //    exactGripProperty = serializedObject.FindProperty("ExactGrip");
        //    allowManipulationWhenEquippedProperty = serializedObject.FindProperty("allowManipulationWhenEquipped");
        //    orientationProperty = serializedObject.FindProperty("orientation");
        //    autoHoldProperty = serializedObject.FindProperty("AutoHold");
        //    interactionTextProperty = serializedObject.FindProperty("InteractionText");
        //    useTextProperty = serializedObject.FindProperty("UseText");
        //    throwVelocityBoostMinSpeedProperty = serializedObject.FindProperty("ThrowVelocityBoostMinSpeed");
        //    throwVelocityBoostScaleProperty = serializedObject.FindProperty("ThrowVelocityBoostScale");
        //    pickupableProperty = serializedObject.FindProperty("pickupable");
        //    proximityProperty = serializedObject.FindProperty("proximity");

            EditorGUILayout.BeginVertical(GUILayout.MaxWidth(EditorGUIUtility.currentViewWidth - 30));

            //EditorGUILayout.PropertyField(playerMobilityProperty, new GUIContent("Player Mobility"));
        //    EditorGUILayout.PropertyField(disallowTheftProperty, new GUIContent("Disallow Theft"));
        //    EditorGUILayout.PropertyField(exactGunProperty, new GUIContent("Exact Gun"));
        //    EditorGUILayout.PropertyField(exactGripProperty, new GUIContent("Exact Grip"));
        //    EditorGUILayout.PropertyField(allowManipulationWhenEquippedProperty, new GUIContent("Allow Manipulation When Equipped"));
        //    EditorGUILayout.PropertyField(orientationProperty, new GUIContent("Orientation"));
        //    EditorGUILayout.PropertyField(autoHoldProperty, new GUIContent("AutoHold", "If the pickup is supposed to be aligned to the hand (i.e. orientation field is set to Gun or Grip), auto-detect means that it will be Equipped(not dropped when they release trigger),  otherwise just hold as a normal pickup."));
        //    EditorGUILayout.PropertyField(interactionTextProperty, new GUIContent("Interaction Text","Text displayed when user hovers over the pickup."));
        //    if (autoHoldProperty.enumValueIndex != (int)VRC.SDK3.Components.VRCPickup.AutoHoldMode.No)
        //        EditorGUILayout.PropertyField(useTextProperty, new GUIContent("Use Text", "Text to display describing action for clicking button, when this pickup is already being held."));
        //    EditorGUILayout.PropertyField(throwVelocityBoostMinSpeedProperty, new GUIContent("Throw Velocity Boost Min Speed"));
        //    EditorGUILayout.PropertyField(throwVelocityBoostScaleProperty, new GUIContent("Throw Velocity Boost Scale"));
        //    EditorGUILayout.PropertyField(pickupableProperty, new GUIContent("Pickupable"));
        //    EditorGUILayout.PropertyField(proximityProperty, new GUIContent("Proximity"));

            EditorGUILayout.EndVertical();

            //serializedObject.ApplyModifiedProperties();
        }
    }
}
#endif
#endif