/*
* Author:          Patrick-Christopher Mattulat
* Co-Author:       Claude Sonnet 4.6 (LLM)
* Company:         Lynar Studios
* E-Mail:          webmaster@lynarstudios.com
* Created:         2023-02-20
* 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/SectionPairRowListValueArgumentEvaluator.hpp>
#include <ls-std/io/section-pair/validator/SectionPairRowListValueValidator.hpp>

using ls::standard::core::Class;
using ls::standard::core::IllegalArgumentException;
using ls::standard::io::SectionPairMessageFormatter;
using ls::standard::io::SectionPairRowListValueArgumentEvaluator;
using ls::standard::io::SectionPairRowListValueValidator;
using std::move;
using std::string;

SectionPairRowListValueArgumentEvaluator::SectionPairRowListValueArgumentEvaluator(string _listValueRow) : Class("SectionPairRowListValueArgumentEvaluator"), listValueRow(::move(_listValueRow))
{}

SectionPairRowListValueArgumentEvaluator::~SectionPairRowListValueArgumentEvaluator() noexcept = default;

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