#pragma once

#include "../../entity/play/entity_shop_button.h"
#include "../../entity/play/entity_shop_item_upgrade_lifetime.h"
#include "../../entity/play/entity_shop_item_upgrade_ammo.h"
#include "../../entity/play/entity_shop_item_upgrade_redirects.h"
#include "../../entity/play/entity_shop_item_health.h"
#include "../../entity/play/entity_shop_item_feed.h"

#include "../component_circle_collision.h"

static const vec3 COMPONENT_SHOP_BUTTON_UPGRADE_LIFETIME_POSITION = {660.0f, 625.0f, 0.025f};
static const vec3 COMPONENT_SHOP_BUTTON_UPGRADE_REDIRECTS_POSITION = {810.0f, 625.0f, 0.025f};
static const vec3 COMPONENT_SHOP_BUTTON_UPGRADE_AMMO_POSITION = {960.0f, 625.0f, 0.025f};
static const vec3 COMPONENT_SHOP_BUTTON_HEALTH_POSITION = {1110.0f, 625.0f, 0.025f};
static const vec3 COMPONENT_SHOP_BUTTON_FEED_POSITION = {1260.0f, 625.0f, 0.025f};

typedef struct ComponentShop
{
	ECSComponent component;
	u32 affectedID;
	u32 affectedID2;
	u32 upgradeLifetimeID;
	u32 upgradeAmmoID;
	u32 upgradeRedirectsID;
	u32 healthID;
	u32 feedID;
	u32 buttonUpgradeLifetimeID;
	u32 buttonUpgradeRedirectsID;
	u32 buttonUpgradeAmmoID;
	u32 buttonHealthID;
	u32 buttonFeedID;
	bool isActive;
} ComponentShop;

void component_shop_init(ComponentShop* self, ECS* ecs, u32 affectedID, u32 affectedID2);
void component_shop_tick(ComponentShop* self, ECS* ecs);
void component_shop_add(ComponentShop* self, ECS* ecs);
void component_shop_delete(ComponentShop* self, ECS* ecs);

static const ECSComponentInfo COMPONENT_SHOP_INFO = 
{
	.system = 
	{
		.functions = 
		{ 
			(ECSFunction)component_shop_add,
			(ECSFunction)component_shop_delete,
			NULL,
			NULL
		}
	},
	.type = ECS_COMPONENT_SHOP,
	.size = sizeof(ComponentShop)
};


