#pragma once

#include "CoreMinimal.h"
#include "Engine/DataAsset.h"
#include "Engine/DeveloperSettings.h"
#include "BreakToDebugger.h"
#include "LuprexEditorSettings.generated.h"

UCLASS(BlueprintType)
class INTEGRATION_API UlxServerSelection : public UPrimaryDataAsset
{
    GENERATED_BODY()

public:
    UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Server")
    FString Description;

    UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Server")
    FString Host;
};

UCLASS(Config=EditorPerProjectUserSettings, DefaultConfig, meta=(DisplayName="Luprex Editor Settings"))
class INTEGRATION_API UlxEditorSettings : public UDeveloperSettings
{
    GENERATED_BODY()

public:
    UlxEditorSettings();

    virtual FName GetContainerName() const override { return TEXT("Editor"); }
    virtual FName GetCategoryName() const override { return TEXT("Luprex"); }
    virtual FName GetSectionName() const override { return TEXT("Settings"); }

    // The server to connect to.  You can add an option to the list by creating
    // a new data asset of type 'lx Server Selection'.
    UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category="Server",
        meta=(AllowedClasses="/Script/Integration.lxServerSelection"))
    TSoftObjectPtr<UlxServerSelection> ActiveServer;

    // If blueprint execution generates a log message of at least the following
    // severity, the blueprint debugger will automatically pause with a breakpoint.
    UPROPERTY(Config, EditAnywhere, Category="Debugging Tools")
    ElxBreakToDebuggerThreshold BreakToDebuggerLogVerbosity;

    // Log categories in this set are excluded from BreakToDebugger triggering.
    UPROPERTY(Config, EditAnywhere, Category="Debugging Tools")
    TSet<FName> BreakToDebuggerExcludeCategories;
};

