#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Character.h"
#include "NakedDesire/Clothing/ClothingSlotType.h"
#include "PlayerCinematic.generated.h"

class UClothingItemInstance;
class ANakedDesireCharacter;

UCLASS()
class NAKEDDESIRE_API APlayerCinematic : public ACharacter
{
	GENERATED_BODY()

	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, meta = (AllowPrivateAccess = true), Category = "Clothing")
	USkeletalMeshComponent* NipplesMeshComponent;
	
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, meta = (AllowPrivateAccess = true), Category = "Clothing")
	USkeletalMeshComponent* AnalMeshComponent;
	
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, meta = (AllowPrivateAccess = true), Category = "Clothing")
	USkeletalMeshComponent* VaginaMeshComponent;
	
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, meta = (AllowPrivateAccess = true), Category = "Clothing")
	USkeletalMeshComponent* HeadMeshComponent;
	
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, meta = (AllowPrivateAccess = true), Category = "Clothing")
	USkeletalMeshComponent* NeckMeshComponent;
	
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, meta = (AllowPrivateAccess = true), Category = "Clothing")
	USkeletalMeshComponent* FaceMeshComponent;
	
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, meta = (AllowPrivateAccess = true), Category = "Clothing")
	USkeletalMeshComponent* EyesMeshComponent;
	
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, meta = (AllowPrivateAccess = true), Category = "Clothing")
	USkeletalMeshComponent* BodyMeshComponent;
	
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, meta = (AllowPrivateAccess = true), Category = "Clothing")
	USkeletalMeshComponent* TopMeshComponent;
	
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, meta = (AllowPrivateAccess = true), Category = "Clothing")
	USkeletalMeshComponent* BottomMeshComponent;
	
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, meta = (AllowPrivateAccess = true), Category = "Clothing")
	USkeletalMeshComponent* BraMeshComponent;
	
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, meta = (AllowPrivateAccess = true), Category = "Clothing")
	USkeletalMeshComponent* PantiesMeshComponent;
	
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, meta = (AllowPrivateAccess = true), Category = "Clothing")
	USkeletalMeshComponent* SocksMeshComponent;
	
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, meta = (AllowPrivateAccess = true), Category = "Clothing")
	USkeletalMeshComponent* ShoesMeshComponent;

	UPROPERTY()
	ANakedDesireCharacter* Player;

public:
	APlayerCinematic();

protected:
	virtual void BeginPlay() override;

private:
	UFUNCTION()
	void OnClothingEquip(const UClothingItemInstance* ClothingItemInstance);
	
	UFUNCTION()
	void OnClothingUnequip(const UClothingItemInstance* ClothingItemInstance);
	
	USkeletalMeshComponent* GetMeshByType(const EClothingSlotType SlotType) const;
	void EquipClothing(const UClothingItemInstance* ClothingItemInstance);
	void UnequipClothing(const UClothingItemInstance* ClothingItemInstance);
};
