/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { __extends } from "tslib";
import { BuiltInFunctionBase } from "./BuiltInFunctionBase";
import { ExcelCalcValue } from "./ExcelCalcValue";
import { ExcelCalcErrorValue } from "./ExcelCalcErrorValue";
import { markType } from "igniteui-angular-core";
/**
 * @hidden
 */
var UltraCalcFunctionSLN = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(UltraCalcFunctionSLN, _super);
    function UltraCalcFunctionSLN() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    UltraCalcFunctionSLN.prototype.evaluate = function (a, b) {
        var c = a.pop()._toInt321();
        if (c == 0) {
            return new ExcelCalcValue(new ExcelCalcErrorValue(2));
        }
        var d, e;
        if (!((function () { var f = a.pop()._toDouble1(d); d = f.p0; return f.ret; })()) || !((function () { var f = a.pop()._toDouble1(e); e = f.p0; return f.ret; })())) {
            return new ExcelCalcValue(new ExcelCalcErrorValue(4));
        }
        return new ExcelCalcValue((e - d) / c);
    };
    UltraCalcFunctionSLN.prototype.get_name = function () {
        return "sln";
    };
    Object.defineProperty(UltraCalcFunctionSLN.prototype, "name", {
        get: function () {
            return this.get_name();
        },
        enumerable: false,
        configurable: true
    });
    UltraCalcFunctionSLN.prototype.get_minArgs = function () {
        return 3;
    };
    Object.defineProperty(UltraCalcFunctionSLN.prototype, "minArgs", {
        get: function () {
            return this.get_minArgs();
        },
        enumerable: false,
        configurable: true
    });
    UltraCalcFunctionSLN.prototype.get_maxArgs = function () {
        return 3;
    };
    Object.defineProperty(UltraCalcFunctionSLN.prototype, "maxArgs", {
        get: function () {
            return this.get_maxArgs();
        },
        enumerable: false,
        configurable: true
    });
    UltraCalcFunctionSLN.prototype.doesParameterAllowIntermediateResultArray = function (a, b) {
        return true;
    };
    UltraCalcFunctionSLN.$t = markType(UltraCalcFunctionSLN, 'UltraCalcFunctionSLN', BuiltInFunctionBase.$);
    return UltraCalcFunctionSLN;
}(BuiltInFunctionBase));
export { UltraCalcFunctionSLN };
