#include "module.h"
#include <yandex/maps/wiki/validator/check.h>
#include <yandex/maps/wiki/validator/categories.h>

#include "../utils/face_builder.h"
#include "../utils/face_checks.h"
#include "../utils/misc.h"

using maps::wiki::validator::categories::AD_NEUTRAL_FC;
using maps::wiki::validator::categories::AD_NEUTRAL_EL;

namespace maps {
namespace wiki {
namespace validator {
namespace checks {

namespace {

const double MIN_FACE_AREA = 100.0; // square meters
const double MAX_FACE_PERIMETER_TO_AREA_RATIO = 0.06; // meters / meters^2

} // namespace

VALIDATOR_SIMPLE_CHECK( ad_neutral_fc_validity, AD_NEUTRAL_FC, AD_NEUTRAL_EL )
{
    utils::runFaceValidityCheck<AD_NEUTRAL_FC>(context);

    utils::runFaceDimensionsCheck<AD_NEUTRAL_FC>(
        context,
        Severity::Warning,
        MIN_FACE_AREA,
        MAX_FACE_PERIMETER_TO_AREA_RATIO);
}

} // namespace checks
} // namespace validator
} // namespace wiki
} // namespace maps
