import { FindOperator } from "../FindOperator";
/**
 * If Helper Operator.
 */
export function If(condition, value1, value2) {
    if (condition === true) {
        if (value1 instanceof FindOperator)
            return value1;
        return new FindOperator("equal", value1);
    }
    else {
        if (value2 instanceof FindOperator)
            return value2;
        if (value2 === undefined)
            return undefined;
        return new FindOperator("equal", value2);
    }
}

//# sourceMappingURL=If.js.map
