#pragma once

#include "features/watermark/IWatermarkSettings.h"
#include "application/config/ConfigOwner.h"
#include "application/config/values/BasicValues.h"
#include "application/config/values/ColorValues.h"
#include "application/config/values/NumberValues.h"
#include "application/config/values/TextValues.h"

namespace ta::adapters::config
{
    class WatermarkConfigAdapter final :
        public ta::application::config::ConfigOwner,
        public ta::features::watermark::IWatermarkSettings
    {
    public:
        WatermarkConfigAdapter();

        [[nodiscard]] ta::features::watermark::WatermarkView read() const override;

    private:
        ta::application::config::RegisteredConfigValue<ta::application::config::CheckboxValue> enabled_{*this, "enabled", true, "Enabled"};
        ta::application::config::RegisteredConfigValue<ta::application::config::TextboxValue> text_;
        ta::application::config::RegisteredConfigValue<ta::application::config::ColorpickerValue> color_{*this, "color", ta::application::config::ConfigColor{0, 0.5, 1, 1}, "Color"};
        ta::application::config::RegisteredConfigValue<ta::application::config::IntSliderValue> font_size_{*this, "font_size", 16, 8, 36, "Font Size"};
    };
}
