/**
 * Copyright 2022-2025 Theai, Inc. dba Inworld AI
 */

#pragma once

#include "InworldSimplePlayerComponent.h"

#include "InworldPlayerComponent.generated.h"

/**
 * Full-featured Inworld player component with trigger support.
 *
 * This component extends the simple player implementation by adding the ability to send
 * triggers with custom parameters, enabling more complex interactions and goal-driven
 * conversations with Inworld characters.
 *
 * Key Features:
 * - All functionality from UInworldSimplePlayerComponent
 * - Trigger system for goal-based interactions
 * - Custom parameter support for triggers
 * - Advanced conversation control
 * - Complete player interaction suite
 */
UCLASS(ClassGroup = (Inworld), BlueprintType, Blueprintable, Meta = (BlueprintSpawnableComponent))
class INWORLDCHARACTER_API UInworldPlayerComponent : public UInworldSimplePlayerComponent
{
	GENERATED_BODY()

public:
	/**
	 * Sets the current conversation target for this player.
	 * @param NewConversationTarget The new conversation target to set
	 */
	virtual void SetConversationTarget(TScriptInterface<IInworldConversationTarget> NewConversationTarget) override;

	/**
	 * Sends a message to the current conversation target.
	 * @param Message The message to send
	 */
	virtual void SendMessage(const FInworldDataHandle& Message) override;

	/**
	 * Sends a trigger to initiate goal-driven interactions.
	 *
	 * Triggers are used to activate specific character behaviors, goals, or conversation paths.
	 * They can include custom parameters to provide context and customize the interaction.
	 *
	 * @param GoalName The name of the goal/trigger to activate
	 * @param Parameters Key-value pairs of custom parameters to send with the trigger
	 */
	UFUNCTION(BlueprintCallable, Category = "Inworld")
	virtual void SendTrigger(FName GoalName, const TMap<FString, FString> Parameters);
};
