// Copyright ExByte Studios. Item Interaction Ecosystem.

#pragma once

#include "CoreMinimal.h"
#include "Engine/DeveloperSettings.h"
#include "ItemEcosystemSettings.generated.h"

class UDataTable;

/**
 * Project Settings -> Game -> Item Ecosystem.
 * Designers assign the data tables here; the database subsystem reads them on init.
 * Keeping the wiring in settings means no code change to repoint tables (section 3).
 */
UCLASS(Config = Game, DefaultConfig, meta = (DisplayName = "Item Ecosystem"))
class ITEMDATABASE_API UItemEcosystemSettings : public UDeveloperSettings
{
	GENERATED_BODY()

public:
	UItemEcosystemSettings();

	virtual FName GetCategoryName() const override { return FName("Game"); }

	/** DT_Items - row struct FItemDefinitionRow. The one required table. */
	UPROPERTY(Config, EditAnywhere, Category = "Data Tables", meta = (AllowedClasses = "/Script/Engine.DataTable"))
	TSoftObjectPtr<UDataTable> ItemsTable;

	/** DT_ItemProperties - row struct FItemPropertyRow. */
	UPROPERTY(Config, EditAnywhere, Category = "Data Tables", meta = (AllowedClasses = "/Script/Engine.DataTable"))
	TSoftObjectPtr<UDataTable> PropertiesTable;

	/** DT_ItemFeatures - row struct FItemFeatureRow. */
	UPROPERTY(Config, EditAnywhere, Category = "Data Tables", meta = (AllowedClasses = "/Script/Engine.DataTable"))
	TSoftObjectPtr<UDataTable> FeaturesTable;

	/** DT_ItemInteractions - row struct FItemInteractionRow. */
	UPROPERTY(Config, EditAnywhere, Category = "Data Tables", meta = (AllowedClasses = "/Script/Engine.DataTable"))
	TSoftObjectPtr<UDataTable> InteractionsTable;

	/** DT_ItemRedirects - row struct FItemRedirectRow. */
	UPROPERTY(Config, EditAnywhere, Category = "Data Tables", meta = (AllowedClasses = "/Script/Engine.DataTable"))
	TSoftObjectPtr<UDataTable> RedirectsTable;

	/** DT_Containers - row struct FContainerDefRow. */
	UPROPERTY(Config, EditAnywhere, Category = "Data Tables", meta = (AllowedClasses = "/Script/Engine.DataTable"))
	TSoftObjectPtr<UDataTable> ContainersTable;

	/** DT_WorldSlots - row struct FWorldSlotDefRow. */
	UPROPERTY(Config, EditAnywhere, Category = "Data Tables", meta = (AllowedClasses = "/Script/Engine.DataTable"))
	TSoftObjectPtr<UDataTable> WorldSlotsTable;

	/** DT_LootTables - row struct FLootEntryRow. */
	UPROPERTY(Config, EditAnywhere, Category = "Data Tables", meta = (AllowedClasses = "/Script/Engine.DataTable"))
	TSoftObjectPtr<UDataTable> LootTable;

	/** DT_CraftingRecipes - row struct FCraftingRecipeRow. */
	UPROPERTY(Config, EditAnywhere, Category = "Data Tables", meta = (AllowedClasses = "/Script/Engine.DataTable"))
	TSoftObjectPtr<UDataTable> RecipesTable;

	static const UItemEcosystemSettings* Get();
};
