#pragma once

#include "application/actions/UiActionDispatcher.h"
#include "application/config/ConfigDiagnostics.h"
#include "application/config/ConfigRegistry.h"
#include "application/contracts/ConfigUiTypes.h"

namespace ta::application::config
{
    class ConfigCommandProcessor final
    {
    public:
        ConfigCommandProcessor(ConfigRegistry& registry,
                               ConfigDiagnostics& diagnostics,
                               ta::application::UiActionDispatcher& actions) noexcept
            : registry_(registry), diagnostics_(diagnostics), actions_(actions) {}

        void apply(ta::ui::ConfigCommand command) const;

    private:
        ConfigRegistry& registry_;
        ConfigDiagnostics& diagnostics_;
        ta::application::UiActionDispatcher& actions_;
    };
}
