using JetBrains.Annotations;
using JohnsonUtils.Utilities;
using UnityEngine;

namespace JohnsonUtils.Canvases
{
    public abstract class UIComponentBase : MonoBehaviour
    {
        public void Show() => gameObject.Show();

        public void Hide() => gameObject.Hide();

        [PublicAPI]
        public void ToggleDisplay() => gameObject.SetActive(!gameObject.activeInHierarchy);

        public void SetActive(bool active) => gameObject.SetActive(active);
    }
}