using Intrepid.Core.Camera;
using Intrepid.Core.Camera.Events;
using Intrepid.GameManagers;
using Intrepid.Gameplay.Entities.Player.ActionBelt.Events;
using Intrepid.Gameplay.Entities.Player.Sentinel;
using Intrepid.Gameplay.Entities.Player.Tags;
using Intrepid.Utilities;
using Sirenix.OdinInspector;
using UnityEngine;

namespace __Prototype.Scripts
{
    public class TempBoot : MonoBehaviour
    {
        [GroupInjections, SerializeField] private SentinelCameraManager sentinelCameraManager;
        [GroupConfigurations, SerializeField] private ActionBeltManagerTag _amTag;

        private void Start()
        {
            EnableActionManager(_amTag);
            Proxy.Instance.EventBus.Raise(new CameraStreamChangeEvent
            {
                CameraStreamStack = sentinelCameraManager.CameraStreamStack,
            });
        }

        [GroupDebug, Button(ButtonSizes.Medium, ButtonStyle.FoldoutButton)]
        private void EnableActionManager(ActionBeltManagerTag amTag)
        {
            Proxy.Instance.EventBus.Raise(new ActionBeltEnableEvent
            {
                ActionBeltManger = amTag ?? _amTag,
            });
        }
        
        [GroupDebug, Button(ButtonSizes.Medium, ButtonStyle.FoldoutButton)]
        private void DisableActionManager(ActionBeltManagerTag amTag)
        {
            Proxy.Instance.EventBus.Raise(new ActionBeltDisableEvent
            {
                ActionBeltManger = amTag ?? _amTag,
            });
        }
    }
}