#pragma once

#include <functional>
#include <string>
#include <switchboard/Result.hpp>
#include <switchboard/SBAny.hpp>

namespace switchboard {

const std::string ACTION_FIELD_NAME = "name";
const std::string ACTION_FIELD_DESCRIPTION = "description";
const std::string ACTION_FIELD_PARAMETERS = "parameters";
const std::string ACTION_FIELD_HANDLER = "handler";

const std::string ACTION_PARAMETER_FIELD_NAME = "name";
const std::string ACTION_PARAMETER_FIELD_DESCRIPTION = "description";
const std::string ACTION_PARAMETER_FIELD_TYPE = "type";
const std::string ACTION_PARAMETER_FIELD_IS_OPTIONAL = "isOptional";

const std::string ACTION_PARAMETER_TYPE_BOOLEAN = "boolean";
const std::string ACTION_PARAMETER_TYPE_FLOAT = "float";
const std::string ACTION_PARAMETER_TYPE_INT = "int";
const std::string ACTION_PARAMETER_TYPE_STRING = "string";
const std::string ACTION_PARAMETER_TYPE_OBJECT = "object";

using ActionHandler = std::function<Result<SBAny>(const SBAnyMap&)>;

}