using UnityEngine;

namespace QuizPleaseTest.Common.UI
{
    public class UIView : MonoBehaviour
    {
        private bool _isInitialized;

        public virtual void Initialize()
        {
            if (_isInitialized)
            {
                return;
            }

            _isInitialized = true;
            gameObject.SetActive(true);
        }

        public virtual void Release()
        {
            if (!_isInitialized)
            {
                return;
            }

            _isInitialized = false;
            gameObject.SetActive(false);
        }
    }
}
