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

#pragma once

#include "CoreMinimal.h"
#include "CommonButtonBase.h"
#include "WardrobeItemWidget.generated.h"

class UCommonTextBlock;
class UClothingItemInstance;
class UImage;

UCLASS(Abstract)
class NAKEDDESIRE_API UWardrobeItemWidget : public UCommonButtonBase
{
	GENERATED_BODY()
	
	UPROPERTY()
	TObjectPtr<UClothingItemInstance> ClothingItemInstance;
	
	UPROPERTY(meta = (BindWidget))
	TObjectPtr<UImage> IconImage;
	
	UPROPERTY(meta = (BindWidget))
	TObjectPtr<UCommonTextBlock> NameText;
	
public:
	void SetClothingItemInstance(UClothingItemInstance* InItemInstance);
	UClothingItemInstance* GetClothingItemInstance() const { return ClothingItemInstance; }
	
	DECLARE_DELEGATE_OneParam(FOnWardrobeItemClickedSignature, UWardrobeItemWidget* ItemWidget)
	FOnWardrobeItemClickedSignature OnItemClicked;
	
protected:
	virtual void NativeOnClicked() override;
	
private:
	void UpdateVisuals();
};
