// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "SUDSParticipant.h"
#include "Components/SphereComponent.h"
#include "Faye/Base/FayePlayerController.h"
#include "GameFramework/Character.h"
#include "Faye/Interfaces/InventoryInterface.h"
#include "PlayerCharacter.generated.h"


class UOrdersComponent;
class UStatForgeComponent;

UCLASS()
class FAYE_API APlayerCharacter : 
	public ACharacter, 
	public IInventoryInterface,
	public ISUDSParticipant
{
	GENERATED_BODY()

public:
	
	APlayerCharacter();
	virtual void Tick(float DeltaTime) override;
	virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
	
	// INVENTORY
	virtual UInventory* GetInventory_Implementation() const override;
	
	//DIALOGUE
	
	void InteractWithObject();

protected:
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
	USphereComponent* InteractionOverlapComponent = nullptr;
	
	UPROPERTY()
	TObjectPtr<AFayePlayerController> PlayerController;
	
	virtual void BeginPlay() override;
	
	UPROPERTY()
	UInventory* Inventory = nullptr;
	
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta=(AllowPrivateAccess = "true"))
	TObjectPtr<UStatForgeComponent> StatForgeComponent;
	
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta=(AllowPrivateAccess = "true"))
	TObjectPtr<UOrdersComponent> OrdersComponent;
};
