#pragma once
#include <stdexcept>
#include "renderive/base/property/Property.hpp"
struct Property_External_Properties {
    int minimum{};
    int maximum{};
};
struct Property_External_Validator {
    void operator()(const Property_External_Properties& properties) const {
        if (properties.minimum > properties.maximum) {
            throw std::invalid_argument("external minimum must not exceed maximum");
        }
    }
};
struct Property_External_Product_Base {
    explicit Property_External_Product_Base(const Property_External_Properties& properties) : properties(properties) {}
    Property_External_Properties properties;
};
using Property_External_Product = Attach_Builder<Property_External_Product_Base, Property_External_Properties, Property_Builder, Property_External_Validator>;
struct Property_Direct_Properties {
    int value{};
};
struct Property_Direct_Product {
    Property_Direct_Product(const Property_Direct_Properties& properties, int id) : value(properties.value), id(id) {}
    int value;
    int id;
};
using Property_Direct_Builder = Property_Builder<Property_Direct_Product, Property_Direct_Properties>;
struct Property_Checked_Value_Validator {
    void operator()(const int& value) const {
        if (value % 2 != 0) {
            throw std::invalid_argument("value must be even");
        }
    }
};
