#pragma once

#include "Faye/Enums/CoffeeTypes.h"
#include "Faye/Structs/BookDataStruct.h"
#include "Faye/Structs/ItemDataStruct.h"
#include "ItemFilters.generated.h"

class UItem;

UCLASS(BlueprintType, Blueprintable, EditInlineNew, DefaultToInstanced)
class FAYE_API UItemFilter: public UObject
{
	GENERATED_BODY()
public:
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FText ItemName = FText();
	
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	EItemCategory ItemCategory = EItemCategory::None;
	
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	int32 PriceStart = -1;
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	int32 PriceEnd = -1;
	
	virtual bool Pass(const UItem* Item) const;
};

UCLASS()
class FAYE_API UBookFilter : public UItemFilter
{
	GENERATED_BODY()
public:
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	EBookCategory BookCategory = EBookCategory::None;
	
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	EBookSubCategory BookSubCategory = EBookSubCategory::None;
	
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	int32 PublicationDateStart = -1;
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	int32 PublicationDateEnd = -1;
	
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FText Author = FText();
	
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	int32 PageNumberStart = -1;
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	int32 PageNumberEnd = -1;
	
	virtual bool Pass(const UItem* Item) const override;
};

UCLASS()
class FAYE_API UCoffeeFilter : public UItemFilter
{
	GENERATED_BODY()
public:
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	ECoffeeType CoffeeType = ECoffeeType::None;
	
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	ECoffeeSize CoffeeSize = ECoffeeSize::Small;
	
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool bIced = false;
	
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	ECoffeeAddition CoffeeAddition = ECoffeeAddition::None;
	
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool bWhippedCream = false;
	
	virtual bool Pass(const UItem* Item) const override;
};
