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

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "NakedDesire/Interaction/Interactable.h"
#include "Wardrobe.generated.h"

class UBoxComponent;
class UWidgetComponent;
class UClothingItemInstance;

// Apartment wardrobe fixture. The stored items live in UInventorySubsystem (the durable store is
// UGlobalSaveGameData::WardrobeItems); this actor is just the interaction point and forwards to it.
UCLASS(Blueprintable)
class NAKEDDESIRE_API AWardrobe : public AActor, public IInteractable
{
	GENERATED_BODY()

public:
	AWardrobe();
	
	virtual void Interact_Implementation(ANakedDesireCharacter* Player) override;
	virtual bool CanInteract_Implementation(ANakedDesireCharacter* Player) const override;
	virtual FText GetInteractionPrompt_Implementation() const override;
	virtual void HideInteractionHint_Implementation() override;
	virtual void ShowInteractionFocusHint_Implementation() override;
	virtual void ShowInteractionProximityHint_Implementation() override;
	
	void AddItem(UClothingItemInstance* ClothingItemInstance);
	void RemoveItem(UClothingItemInstance* ClothingItemInstance);
	
protected:
	virtual void BeginPlay() override;
	
private:
	void ApplyOutline(bool bEnabled, int32 StencilValue);
	
	UPROPERTY(EditDefaultsOnly)
	TObjectPtr<UStaticMeshComponent> MeshComponent;

	UPROPERTY(EditDefaultsOnly)
	TObjectPtr<UBoxComponent> ColliderComponent;

	UPROPERTY(EditDefaultsOnly)
	TObjectPtr<UWidgetComponent> InteractionHint;
};