using Sources;
using Sources.Gui;
using Sources.Signals;
using UnityEngine;
using Zenject;

namespace Cybe
{
    public class CompositionRoot : MonoInstaller
    {
        [SerializeField] private AudioManager _audioManager;
        [SerializeField] private GuiController _guiController;
        [SerializeField] private Player _player;

        public override void InstallBindings()
        {
            Container.Bind<AudioManager>().FromInstance(_audioManager).AsSingle();
            Container.Bind<Player>().FromInstance(_player).AsSingle();
            Container.Bind<GuiController>().FromInstance(_guiController).AsSingle();


            SignalBusInstaller.Install(Container);

            Container.DeclareSignal<EnemyDiedSignal>();
            Container.DeclareSignal<LevelUpSignal>();
        }
    }
}