using System.Collections;
using System.Collections.Generic;
using System.Linq;
using TMPro;
using UnityEngine;
using UnityEngine.UI;

public class labelItem : MonoBehaviour
{
    // Start is called before the first frame update
    private string __title = "";
    public string Title
    {
        set
        {
            if (__title.Equals(value)) return;
            __title = value;
            var obj = transform.Find("title").gameObject;
            obj.GetComponent<TextMeshProUGUI>().text = __title;
            RectTransform rectTransform = obj.GetComponent<RectTransform>();
            float width = rectTransform.sizeDelta.x;
        }
        get
        {
            return __title;
        }
    }
    private bool __isSelect = false;
    public bool select
    {
        set
        {
            __isSelect = value;
            var button = transform.Find("hidBtn").GetComponent<Button>();
            button.interactable = !__isSelect;
            
        }
        get
        {
            return __isSelect;
        }
    }
    System.Random random = new System.Random();
    private string radomstrsbyling(string chars, int length)
    {
        return new string(Enumerable.Repeat(chars, length).Select(s => s[random.Next(chars.Length)]).ToArray());
    }
    void Start()
    {
    }

    // Update is called once per frame
    void Update()
    {
        
    }
    public void OnBtnClick()
    {
        utilsTools.sendEventObjectParams("switchImageLabel", this.__title);
    }
    
}
