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

#pragma once

#include "CoreMinimal.h"
#include "NpcUsableActor.h"
#include "Faye/Interfaces/InventoryInterface.h"
#include "GameFramework/Actor.h"
#include "Interface/InteractableActorInterface.h"
#include "ShelfActor.generated.h"

class UInteractionWidgetComponent;
class ABookOnShelfActor;

UCLASS()
class FAYE_API AShelfActor : public ANpcUsableActor, public IInventoryInterface
{
	GENERATED_BODY()
	
public:	
	
	AShelfActor();
	virtual void Tick(float DeltaTime) override;
	virtual UInventory* GetInventory_Implementation() const override;
	
	/*--- INTERACTION START ---*/
	
	virtual FText GetInteractionText_Implementation() const override { return NSLOCTEXT("Faye", "ShelfInteract", "Interact"); }
	
	/*--- INTERACTION END  ---*/

	UFUNCTION(CallInEditor, BlueprintCallable)
	void GenerateBookRow();

	UFUNCTION(BlueprintImplementableEvent, BlueprintCallable)
	void PlaceBook();
	
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	ABookOnShelfActor* SelectedBook = nullptr;
protected:
	
	virtual void BeginPlay() override;
	
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
	UInventory* Inventory;

};
