using Darkmatter.Core.Contracts.Features.History;
using Darkmatter.Libs.Installers;
using UnityEngine;
using VContainer;
using VContainer.Unity;

namespace Darkmatter.Features.History
{
    public class HistoryFeatureModule : MonoBehaviour, IModule
    {
        [SerializeField] private HistoryButtonsView historyButtonsView;

        public void Register(IContainerBuilder builder)
        {
            builder.Register<IUndoStack, UndoStack>(Lifetime.Singleton);

            if (historyButtonsView != null)
                builder.RegisterEntryPoint<HistoryButtonsPresenter>().WithParameter(historyButtonsView);
        }
    }
}