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

#pragma once

#include "CoreMinimal.h"
#include "NakedDesire/MissionBuilder/GoalRestriction.h"
#include "LocationRestriction.generated.h"

class ULocationData;
/**
 * 
 */
UCLASS()
class NAKEDDESIRE_API ULocationRestriction : public UGoalRestriction
{
	GENERATED_BODY()

	FDelegateHandle AreaEnterHandle;
	FDelegateHandle AreaExitHandle;

	UPROPERTY(EditDefaultsOnly)
	ULocationData* TargetLocation;

protected:
	virtual void Init(ANakedDesireCharacter* PlayerCharacter) override;
	virtual void Stop() override;
	virtual FText GetDescription() const override;

private:
	void OnAreaEnter(ULocationData* LocationData);
	void OnAreaExit(ULocationData* LocationData);
};
