#pragma once

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

#include "component_health.h"
#include "component_upgrades.h"
#include "component_goodies.h"

typedef enum ShopItemType
{
	SHOP_ITEM_UPGRADE_LIFETIME,
	SHOP_ITEM_UPGRADE_AMMO,
	SHOP_ITEM_UPGRADE_REDIRECTS,
	SHOP_ITEM_HEALTH,
	SHOP_ITEM_FEED
} ShopItemType;

typedef struct ComponentShopItem
{
	ECSComponent component;
	ShopItemType type;
	u32 price;
	u32 basePrice;
	u32 purchaseCount;
	f32 exponent;
	u32 affectedID;
	u32 affectedID2;
	bool isBought;
} ComponentShopItem;

void component_shop_item_init(ComponentShopItem* self, ShopItemType type, u32 price, f32 exponent, u32 affectedID, u32 affectedID2);
void component_shop_item_tick(ComponentShopItem* self, ECS* ecs);

static const ECSComponentInfo COMPONENT_SHOP_ITEM_INFO = 
{
	.system = 
	{
		.functions = 
		{ 
			NULL,
			NULL, 
			(ECSFunction)component_shop_item_tick,
			NULL
		}
	},
	.type = ECS_COMPONENT_SHOP_ITEM,
	.size = sizeof(ComponentShopItem)
};


