#pragma once

#include "../../../GAME_COMMON.h"
#include "../../ecs_entity.h"

#include "../../../input/input.h"

#include "../stat/component_heart.h"
#include "../action/component_action_wave.h"
#include "../action/component_action_spawn.h"

#define COMPONENT_CONTROL_HEART_COOLDOWN_MAX 300

typedef struct ComponentControlHeart
{
	ECSComponent component;
	u32 cooldown;
	u32 spawnID;
} ComponentControlHeart;

void component_control_heart_init(ComponentControlHeart* self, u32 spawnID);
void component_control_heart_tick(ComponentControlHeart* self, ECS* ecs);

static const ECSComponentInfo COMPONENT_CONTROL_HEART_INFO = 
{
	.system = 
	{
		.functions = 
		{ 
			NULL,
			NULL, 
			(ECSFunction)component_control_heart_tick,
			NULL
		}
	},
	.type = ECS_COMPONENT_CONTROL_HEART,
	.size = sizeof(ComponentControlHeart)
};
