#pragma once

#include "application/config/ConfigRegistry.h"
#include "application/config/values/KeybindValue.h"
#include "application/config/values/TextValues.h"
#include "application/contracts/IConfigPersistence.h"
#include "application/contracts/ILocaleController.h"

namespace ta::application::config
{
    class ConfigPersistence final
    {
    public:
        ConfigPersistence(ConfigRegistry& registry,
                          ta::application::IConfigPersistence& persistence,
                          ta::application::ILocaleController& locale,
                          KeybindValue& menu_key,
                          SelectValue& language) noexcept;

        void load();
        [[nodiscard]] bool save() const;

    private:
        ConfigRegistry& registry_;
        ta::application::IConfigPersistence& persistence_;
        ta::application::ILocaleController& locale_;
        KeybindValue& menu_key_;
        SelectValue& language_;
    };
}
