#pragma once

#include <string>

namespace switchboard {

/**
 * @brief Identifiers for the kind of Switchboard object.
 * @details Used as the value of OBJECT_TYPE_FIELD_TYPE in object-type-info maps and as the
 *          string returned by SwitchboardObject::getObjectType(). Also accepted as the filter
 *          argument to SwitchboardObjectRegistry::getObjectTypesForType and to the
 *          `getObjectTypes` action on the SDK singleton.
 */
namespace SwitchboardObjectType {
    /// @brief The SDK singleton — parent of all engines, graphs, and extensions.
    inline constexpr const char* SWITCHBOARD = "switchboard";

    /// @brief An audio engine instance (e.g. realtime, offline, manual, WebSocket).
    inline constexpr const char* ENGINE = "engine";

    /// @brief An audio graph that owns nodes and their connections.
    inline constexpr const char* GRAPH = "graph";

    /// @brief A node inside an audio graph (source, sink, or processor).
    inline constexpr const char* NODE = "node";

    /// @brief A Switchboard SDK extension that contributes additional object types.
    inline constexpr const char* EXTENSION = "extension";
}

/**
 * @brief The kind of Switchboard object (one of SwitchboardObjectType::* values:
 *        "switchboard", "engine", "graph", "node", "extension"). Required.
 */
const std::string OBJECT_TYPE_FIELD_TYPE = "type";

/**
 * @brief Identifies the specific variant within a type. For nodes, the fully-qualified
 *        node type name (e.g. "Switchboard.Gain"); for extensions, the extension name
 *        (e.g. "Superpowered"); for engines, the engine type name. Required.
 */
const std::string OBJECT_TYPE_FIELD_SUBTYPE = "subtype";

/**
 * @brief Human-readable description of what this object type does. Required.
 */
const std::string OBJECT_TYPE_FIELD_DESCRIPTION = "description";

/**
 * @brief Human-readable display label shown in UIs. If omitted, consumers should
 *        fall back to the subtype. Value type: std::string. Optional.
 */
const std::string OBJECT_TYPE_FIELD_DISPLAY_NAME = "displayName";

/**
 * @brief Tags used to group related object types in UIs (e.g. "AI", "Voice", "Effects").
 *        Value type: SBAnyVector of std::string, typically from the NODE_CATEGORY_* constants. Optional.
 */
const std::string OBJECT_TYPE_FIELD_CATEGORIES = "categories";

/**
 * @brief Static configuration schema for this object type — per-parameter metadata like name,
 *        description, type, min/max, and default. Value type: SBAnyMap keyed by parameter name,
 *        each entry an SBAnyMap using the CONFIGURATION_FIELD_* keys. Optional.
 */
const std::string OBJECT_TYPE_FIELD_CONFIGURATION = "configuration";

/**
 * @brief Static property schema for this object type — per-property metadata like name, description,
 *        type, default value, min/max, and read-only flag. Value type: SBAnyMap keyed by property name,
 *        each entry an SBAnyMap using the PROPERTY_FIELD_* keys. Optional.
 */
const std::string OBJECT_TYPE_FIELD_PROPERTIES = "properties";

/**
 * @brief Static action schema for this object type — per-action metadata like name, description,
 *        and parameter schema. Value type: SBAnyMap keyed by action name, each entry an SBAnyMap
 *        using the ACTION_FIELD_* keys. Optional.
 */
const std::string OBJECT_TYPE_FIELD_ACTIONS = "actions";

/**
 * @brief Static event schema for this object type — per-event metadata like name, description,
 *        and emitted data fields. Value type: SBAnyMap keyed by event name, each entry an SBAnyMap
 *        using the EVENT_FIELD_* keys. Optional.
 */
const std::string OBJECT_TYPE_FIELD_EVENTS = "events";

/**
 * @brief Optional marker added to a configuration, property, action, or event entry to indicate
 *        that the entry was inherited from a base type rather than declared by the concrete type.
 *        Value type: std::string identifying the source (e.g. "Node", "SwitchboardObject").
 *        Absent on entries owned by the concrete type itself.
 */
const std::string INHERITED_FROM_FIELD = "inheritedFrom";

}
