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

namespace Darkmatter.Features.DrawingCatalog.Installers
{
    public class DrawingCatalogFeatureModule : MonoBehaviour, IModule
    {
        [SerializeField] private DrawingCatalogView drawingCatalogView;

        public void Register(IContainerBuilder builder)
        {
            builder.Register<IDrawingCatalogController, DrawingCatalogController>(Lifetime.Singleton);
            if(drawingCatalogView != null)
                builder.RegisterEntryPoint<DrawingCatalogPresenter>().WithParameter(drawingCatalogView);
        }
    }
}