#pragma once

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

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

#include "../component_physics.h"
#include "../action/component_action_redirect.h"
#include "../action/component_action_return.h"
#include "../action/component_action_lock.h"
#include "../stat/component_redirects.h"

#include "../../entity/play/entity_redirect_arrow.h"

typedef struct ComponentControlRedirect
{
	ECSComponent component;
	f32 angleThreshold;
	u32 redirectArrowID;
	bool isRedirectArrow;
} ComponentControlRedirect;

void component_control_redirect_init(ComponentControlRedirect* self, f32 angleThreshold);
void component_control_redirect_tick(ComponentControlRedirect* self, ECS* ecs);

static const ECSComponentInfo COMPONENT_CONTROL_REDIRECT_INFO = 
{
	.system = 
	{
		.functions = 
		{ 
			NULL,
			NULL, 
			(ECSFunction)component_control_redirect_tick,
			NULL
		}
	},
	.type = ECS_COMPONENT_CONTROL_REDIRECT,
	.size = sizeof(ComponentControlRedirect)
};
