/*
* Author:          Patrick-Christopher Mattulat
* Co-Author:       Claude Sonnet 4.6 (LLM)
* Company:         Lynar Studios
* E-Mail:          webmaster@lynarstudios.com
* Created:         2023-02-19
* Changed:         2026-06-23
*
* */

#include <ls-std/core/exception/IllegalArgumentException.hpp>
#include <ls-std/io/section-pair/SectionPairMessageFormatter.hpp>
#include <ls-std/io/section-pair/evaluator/SectionPairRowSingleValueArgumentEvaluator.hpp>
#include <ls-std/io/section-pair/validator/SectionPairRowSingleValueValidator.hpp>

using ls::standard::core::Class;
using ls::standard::core::IllegalArgumentException;
using ls::standard::io::SectionPairMessageFormatter;
using ls::standard::io::SectionPairRowSingleValueArgumentEvaluator;
using ls::standard::io::SectionPairRowSingleValueValidator;
using std::move;
using std::string;

SectionPairRowSingleValueArgumentEvaluator::SectionPairRowSingleValueArgumentEvaluator(string _singleValueRow) : Class("SectionPairRowSingleValueArgumentEvaluator"), singleValueRow(::move(_singleValueRow))
{}

SectionPairRowSingleValueArgumentEvaluator::~SectionPairRowSingleValueArgumentEvaluator() noexcept = default;

void SectionPairRowSingleValueArgumentEvaluator::evaluate()
{
  if (!SectionPairRowSingleValueValidator{this->singleValueRow}.isValid())
  {
    const string message = "\"" + this->singleValueRow + "\" is not a valid section pair single value row!";
    throw IllegalArgumentException{SectionPairMessageFormatter::getFormattedMessage(message)};
  }
}
