using System.Collections.Generic;
using Intrepid.Gameplay.Entities.Player.PDA.Inputs;
using Intrepid.Structures;
using Intrepid.Utilities;
using UnityEngine;

namespace Intrepid.Gameplay.Entities.Player.PDA.UI
{
    public class PDAOperationalSystemUI : PDAApplicationUI
    {
        [SerializeField, GroupInjections] private PDAApplicationSelectionUI applicationSelection;

        public override bool IsLoading => applicationSelection.IsLoading;
        
        protected override void Subscribing()
        {
        }

        protected override void WhenStarting(ParameterStore parameters)
        {
            applicationSelection.WhenStarting(parameters);
        }

        protected override void WhenFinishing()
        {
            applicationSelection.WhenFinishing();
        }

        public override void UpdateTheme()
        {
        }

        public override void UpdateApplication(PDAInputs inputs)
        {
            applicationSelection.UpdateApplication(inputs);
        }

        public override void LateUpdateApplication(PDAInputs inputs)
        {
            applicationSelection.LateUpdateApplication(inputs);
        }

        public override void WhenPreparingSystemBoot()
        {
            base.WhenPreparingSystemBoot();
            applicationSelection.WhenPreparingSystemBoot();
        }

        public override void WhenPreparingSystemShutdown()
        {
            base.WhenPreparingSystemShutdown();
            WhenExiting();
        }

        public void PrepareEnvironment(List<PDAContentTag> availableContentTags)
        {
            applicationSelection.PrepareEnvironment(availableContentTags);
        }
    }
}