"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var FindOperator_1 = require("../FindOperator");
/**
 * If Helper Operator.
 */
function If(condition, value1, value2) {
    if (condition === true) {
        if (value1 instanceof FindOperator_1.FindOperator)
            return value1;
        return new FindOperator_1.FindOperator("equal", value1);
    }
    else {
        if (value2 instanceof FindOperator_1.FindOperator)
            return value2;
        if (value2 === undefined)
            return undefined;
        return new FindOperator_1.FindOperator("equal", value2);
    }
}
exports.If = If;

//# sourceMappingURL=If.js.map
