import BinaryOptions from '../../core/built-in-options/binary-options.js';
import OptionValidator from './option-validator.js';
export default class BinaryOptionValidator extends OptionValidator {
    constructor() {
        super('binary', 'value');
    }
    validate(jdlOption) {
        super.validate(jdlOption);
        checkForInvalidValue(jdlOption);
    }
}
function checkForInvalidValue(jdlOption) {
    if (!!jdlOption.value && !BinaryOptions.exists(jdlOption.name, jdlOption.value)) {
        throw new Error(`The '${jdlOption.name}' option is not valid for value '${jdlOption.value}'.`);
    }
}
