using UnityEditor;


namespace UnityEngine.UI
{
    [CustomEditor(typeof(UXTextMeshPro), true)]
    [CanEditMultipleObjects]
    public class UXTextMeshProEditor : TMPro.EditorUtilities.TMP_EditorPanelUI
    {
        private SerializedProperty text;
        private SerializedProperty localizationID;

        protected override void OnEnable()
        {
            text = serializedObject.FindProperty("m_text");
            localizationID = serializedObject.FindProperty("m_localizationID");
            base.OnEnable();
        }

        public override void OnInspectorGUI()
        {
            serializedObject.Update();
            bool isPlay = Application.isPlaying;


            // Key选择逻辑
            EditorGUILayout.PropertyField(localizationID);

            //
            // // 显示预览信息
            // EditorGUI.BeginDisabledGroup(true);
            // {
            //     EditorGUILayout.PropertyField(localizationID);
            //     if (!string.IsNullOrEmpty(localizationID.stringValue))
            //     {
            //         var entry = _entries.Find(e => e.ID == localizationID.stringValue);
            //         if (entry != null)
            //         {
            //             EditorGUILayout.TextField("当前文本预览", entry.ChineseSimplified);
            //         }
            //     }
            // }
            // EditorGUI.EndDisabledGroup();

            serializedObject.ApplyModifiedProperties();
            base.OnInspectorGUI();
        }
    }
}
