#pragma once

#include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "HyperTwistSimulation/HyperTwistClassicCubeTypes.h"
#include "HyperTwistClassicCubeCommandLibrary.generated.h"

UCLASS()
class UNREALHYPERTWIST_API UHyperTwistClassicCubeCommandLibrary : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()

public:
	UFUNCTION(BlueprintPure, Category = "HyperTwist|ClassicCube|Commands")
	static FString NormalizeTranscriptText(const FString& TranscriptText);

	UFUNCTION(BlueprintCallable, Category = "HyperTwist|ClassicCube|Commands")
	static bool TryParseMoveNotation(
		const FString& MoveNotation,
		FHyperTwistClassicCubeMoveDescriptor& OutMove
	);

	UFUNCTION(BlueprintCallable, Category = "HyperTwist|ClassicCube|Commands")
	static bool TryParseVoiceCommand(
		const FString& TranscriptText,
		FHyperTwistClassicCubeVoiceCommand& OutCommand
	);

	UFUNCTION(BlueprintPure, Category = "HyperTwist|ClassicCube|Commands")
	static TArray<FHyperTwistClassicCubeMoveDescriptor> ExpandMoveNotationSequence(
		const TArray<FString>& MoveNotationSequence
	);

	UFUNCTION(BlueprintPure, Category = "HyperTwist|ClassicCube|Commands")
	static FHyperTwistClassicCubeMoveDescriptor InvertMoveDescriptor(
		const FHyperTwistClassicCubeMoveDescriptor& Move
	);
};
