#pragma once
#include "./basic_types.hpp"

namespace lsp::protocol
{
    struct WorkDoneProgressBegin
    {
        string kind = "begin";
        string title;
        boolean cancellable;
        std::optional<string> message;
        uinteger percentage;
    };

    struct WorkDoneProgressReport
    {
        string kind = "report";
        boolean cancellable;
        std::optional<string> message;
        uinteger percentage;
    };

    struct WorkDoneProgressEnd
    {
        string kind = "end";
        string message;
    };

    struct WorkDoneProgressParams
    {
        ProgressToken workDoneToken;
    };

    struct WorkDoneProgressOptions
    {
        std::optional<boolean> workDoneProgress;
    };

    struct PartialResultParams
    {
        ProgressToken partialResultToken;
    };

    struct WorkDoneProgressCreateParams
    {
        ProgressToken token;
    };

    struct WorkDoneProgressCancelParams
    {
        ProgressToken token;
    };

    using TraceValue = std::string_view;
    namespace TraceValueLiterals
    {
        inline constexpr TraceValue Off = "off";
        inline constexpr TraceValue Messages = "messages";
        inline constexpr TraceValue Verbose = "verbose";
    }

    struct SetTraceParams
    {
        TraceValue value;
    };

    struct LogTraceParams
    {
        string message;
        std::optional<string> verbose;
    };

}
