#pragma once

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

#include "../component_game_object.h"

#define COMPONENT_ACTION_GRIPPED_TIMER 15
#define COMPONENT_ACTION_GRIPPED_Z_OFFSET -0.01f

typedef struct ComponentActionGripped
{
	ECSComponent component;
	u32 gripperID;
	u32 timer;
	bool isGripped;
	bool isAbleToBeGripped;
} ComponentActionGripped;

void component_action_gripped_tick(ComponentActionGripped* self, ECS* ecs);
void component_action_gripped_add(ComponentActionGripped* self, ECS* ecs);

static const ECSComponentInfo COMPONENT_ACTION_GRIPPED_INFO = 
{
	.system = 
	{
		.functions = 
		{ 
			(ECSFunction)component_action_gripped_add,
			NULL, 
			(ECSFunction)component_action_gripped_tick,
			NULL
		}
	},
	.type = ECS_COMPONENT_ACTION_GRIPPED,
	.size = sizeof(ComponentActionGripped)
};


