using System;
using Intrepid.Gameplay.Entities.Player.PDA.Inputs;
using Intrepid.Gameplay.Entities.Player.Sentinel.Inputs;
using Intrepid.Utilities;
using UnityEngine;

namespace Intrepid.Gameplay.Entities.Player
{

    [Serializable]
    [CreateAssetMenu(fileName = "Player Input Resolver", menuName = "GON/Services/Player Input Resolver")]
    public sealed class PlayerInputResolver : SingletonScriptableObject<PlayerInputResolver>
    {
        [GroupInjections, SerializeField] private SentinelInputResolver sentinelInputResolver;
        [GroupInjections, SerializeField] private PDAInputResolver pdaInputResolver;

        public SentinelInputResolver Sentinel => sentinelInputResolver;
        public PDAInputResolver PDA => pdaInputResolver;

        protected override void WhenInstantiate(PlayerInputResolver singleton)
        {
            base.WhenInstantiate(singleton);
            Sentinel.Setup();
            PDA.Setup();
        }
    }
}