// © 2025 Naked People Team. All Rights Reserved.

#pragma once

#include "CoreMinimal.h"
#include "CommissionTypes.generated.h"

// Daily vs. weekly draw from the same model; the tier only changes reward bands / step depth (§13.4).
UENUM(BlueprintType)
enum class ECommissionTier : uint8
{
	Daily,
	Weekly
};

// Lifecycle state (GDD §13.1 / §13.2). Offered commissions on the board carry no obligation until accepted.
UENUM(BlueprintType)
enum class ECommissionState : uint8
{
	Offered,    // on the board, not committed
	Accepted,   // committed; objectives armed
	Completed,  // all objectives satisfied; rewards paid
	Expired     // accepted but not finished by the deadline
};

// Reward paid instantly on completion (§23 #23). Money/XP exist today; followers land with Phase 8.
USTRUCT(BlueprintType)
struct NAKEDDESIRE_API FCommissionReward
{
	GENERATED_BODY()

	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
	int32 Money = 0;

	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
	float XP = 0.0f;

	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
	int32 Followers = 0;
};

// Persisted commission state, keyed by the authored CommissionId. State-level only — objective
// mid-progress is not saved; an accepted commission re-arms from the start on load.
USTRUCT()
struct NAKEDDESIRE_API FCommissionSaveRecord
{
	GENERATED_BODY()

	UPROPERTY(SaveGame)
	FName CommissionId;

	UPROPERTY(SaveGame)
	ECommissionState State = ECommissionState::Offered;
};