/*
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 * as tslib_1 from "tslib";
import { BuiltInFunctionBase } from "./BuiltInFunctionBase";
import { ExcelCalcValue } from "./ExcelCalcValue";
import { UltraCalcFunctionComplex_ComplexNumber } from "./UltraCalcFunctionComplex_ComplexNumber";
import { markType } from "igniteui-angular-core";
import { ExcelCalcErrorValue } from "./ExcelCalcErrorValue";
/**
 * @hidden
 */
var UltraCalcFunctionImDiv = /** @class */ (function (_super) {
    tslib_1.__extends(UltraCalcFunctionImDiv, _super);
    function UltraCalcFunctionImDiv() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    UltraCalcFunctionImDiv.prototype.evaluate = function (a, b) {
        var c = a.pop();
        if (c.isError) {
            return c;
        }
        var d = c.toString();
        var e = new UltraCalcFunctionComplex_ComplexNumber(1, a._w, d);
        if (e.y == false) {
            return new ExcelCalcValue(new ExcelCalcErrorValue(4));
        }
        var f = a.pop();
        if (f.isError) {
            return f;
        }
        var g = f.toString();
        var h = new UltraCalcFunctionComplex_ComplexNumber(1, a._w, g);
        if (h.y == false) {
            return new ExcelCalcValue(new ExcelCalcErrorValue(4));
        }
        var i = UltraCalcFunctionComplex_ComplexNumber.i(h, e);
        if (i.y == false) {
            return new ExcelCalcValue(new ExcelCalcErrorValue(4));
        }
        return new ExcelCalcValue(i.toString());
    };
    UltraCalcFunctionImDiv.prototype.get_name = function () {
        return "imdiv";
    };
    Object.defineProperty(UltraCalcFunctionImDiv.prototype, "name", {
        get: function () {
            return this.get_name();
        },
        enumerable: true,
        configurable: true
    });
    UltraCalcFunctionImDiv.prototype.get_minArgs = function () {
        return 2;
    };
    Object.defineProperty(UltraCalcFunctionImDiv.prototype, "minArgs", {
        get: function () {
            return this.get_minArgs();
        },
        enumerable: true,
        configurable: true
    });
    UltraCalcFunctionImDiv.prototype.get_maxArgs = function () {
        return 2;
    };
    Object.defineProperty(UltraCalcFunctionImDiv.prototype, "maxArgs", {
        get: function () {
            return this.get_maxArgs();
        },
        enumerable: true,
        configurable: true
    });
    UltraCalcFunctionImDiv.prototype.doesParameterAllowIntermediateResultArray = function (a, b) {
        return (b == false);
    };
    UltraCalcFunctionImDiv.$t = markType(UltraCalcFunctionImDiv, 'UltraCalcFunctionImDiv', BuiltInFunctionBase.$);
    return UltraCalcFunctionImDiv;
}(BuiltInFunctionBase));
export { UltraCalcFunctionImDiv };
//# sourceMappingURL=UltraCalcFunctionImDiv.js.map