using Darkmatter.Core.Contracts.Features.ShapeBuilder;
using Darkmatter.Core.Data.Static.Features.ShapeBuilder;
using Darkmatter.Features.ShapeBuilder.Systems;
using Darkmatter.Libs.Installers;
using UnityEngine;
using VContainer;
using VContainer.Unity;

namespace Darkmatter.Features.ShapeBuilder.Installers
{
    public class ShapeBuilderFeatureModule : MonoBehaviour, IModule
    {
        [SerializeField] private ShapeBuilderConfig config;

        public void Register(IContainerBuilder builder)
        {
            if (config != null)
                builder.RegisterComponent(config);
            builder.Register<IShapeBuilderController, ShapeBuilderController>(Lifetime.Singleton);
        }
    }
}