#include "bootstrap.hpp"

// Interfaces
#include "interfaces/enemy.hpp"
#include "interfaces/enemy_creator.hpp"
#include "interfaces/hero.hpp"
#include "interfaces/weapon.hpp"

// Concretes
#include "enemy.hpp"
#include "enemy_creator.hpp"
#include "hero.hpp"
#include "sword.hpp"

yacppdic::Container bootstrap()
{
	auto container = yacppdic::Container();

	container.bind<IHero>().to<Hero>();
	container.bind<IWeapon>().to<Sword>();
	container.bind<IEnemyCreator>().to<EnemyCreator>();

	container.bind<IEnemyFactory>()
		.to_factory(
			[]()
			{
				return std::make_unique<Enemy>(65);
			}
		)
		.when_tagged(SMALL_ENEMY_TAG);

	container.bind<IEnemyFactory>()
		.to_factory(
			[]()
			{
				return std::make_unique<Enemy>(130);
			}
		)
		.when_tagged(BIG_ENEMY_TAG);

	return container;
}