#pragma once

#include <string>
#include <utility>

namespace ta::application
{
    /**
     * Stable UI action metadata. Execution is routed separately through
     * UiActionDispatcher so configuration adapters remain command-free.
     */
    class UiAction final
    {
    public:
        explicit UiAction(std::string display_name)
            : display_name_(std::move(display_name))
        {
        }

        void reg(std::string owner_id, std::string value_id)
        {
            owner_id_ = std::move(owner_id);
            value_id_ = std::move(value_id);
            key_ = owner_id_ + "." + value_id_;
        }

        [[nodiscard]] const std::string& value_id() const noexcept { return value_id_; }
        [[nodiscard]] const std::string& key() const noexcept { return key_; }
        [[nodiscard]] const std::string& display_name() const noexcept { return display_name_; }

    private:
        std::string display_name_;
        std::string owner_id_;
        std::string value_id_;
        std::string key_;
    };
}
