using UnityEngine;

namespace RebootKit.Engine.Foundation {
    public interface IDependencyInstaller {
        void Install(DIContext context);
    }

    public abstract class SceneDependencyInstaller : MonoBehaviour, IDependencyInstaller {
        public abstract void Install(DIContext context);
    }
    
    public class SceneDI : MonoBehaviour, IDependencyInstaller {
        [SerializeField]
        private SceneDependencyInstaller[] _sceneInstallers;
        
        public void Install(DIContext context) {
            foreach (SceneDependencyInstaller installer in _sceneInstallers) {
                installer.Install(context);
            }
        }
    }
}