using Intrepid.Core.Themes;
using Intrepid.Utilities;
using UnityEngine;
using UnityEngine.UI;

namespace Intrepid.Core.UI.Gauge
{
    public class GeneralGaugeUI : SimpleGaugeUI
    {
        [GroupInjections, SerializeField] private Image borderIn;
        [GroupInjections, SerializeField] private Image borderOut;

        public UIGaugeTheme Theme { get; set; }

        protected override void UpdateComponents()
        {
            base.UpdateComponents();
            Filling.color = Theme?.Filling ?? Color.cyan;
            CounterFilling.color = Theme?.CounterFilling ?? Color.magenta;
            borderIn.color = Theme?.BorderIn ?? Color.gray;
            borderOut.color = Theme?.BorderOut ?? Color.blue;
        }
    }
}