using TMPro;
using UnityEngine;
using UnityEngine.UI;

namespace QuizPleaseTest.Boot.UI
{
    public class BootStatusUIView : MonoBehaviour
    {
        [field: SerializeField] public TMP_Text StatusText { get; private set; }
        [field: SerializeField] public Slider ProgressSlider { get; private set; }

        public void SetStatus(string status)
        {
            if (StatusText == null)
            {
                return;
            }

            StatusText.text = status;
        }

        public void SetProgress(float progress)
        {
            if (ProgressSlider == null)
            {
                return;
            }

            ProgressSlider.value = Mathf.Clamp01(progress);
        }
    }
}
