/*
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 { markType } from "igniteui-angular-core";
import { CalcFunctionUtilities } from "./CalcFunctionUtilities";
import { ExcelCalcErrorValue } from "./ExcelCalcErrorValue";
/**
 * @hidden
 */
var UltraCalcFunctionAverage = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(UltraCalcFunctionAverage, _super);
    function UltraCalcFunctionAverage() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    UltraCalcFunctionAverage.prototype.evaluate = function (a, b) {
        return CalcFunctionUtilities.d(a, b, 1229, UltraCalcFunctionAverage._ak);
    };
    UltraCalcFunctionAverage.prototype.canParameterBeEnumerable = function (a) {
        return true;
    };
    UltraCalcFunctionAverage._ak = function (a) {
        return a.count == 0 ? new ExcelCalcValue(new ExcelCalcErrorValue(2)) : new ExcelCalcValue(CalcFunctionUtilities.q(a));
    };
    UltraCalcFunctionAverage.prototype.get_name = function () {
        return "average";
    };
    Object.defineProperty(UltraCalcFunctionAverage.prototype, "name", {
        get: function () {
            return this.get_name();
        },
        enumerable: false,
        configurable: true
    });
    UltraCalcFunctionAverage.prototype.get_minArgs = function () {
        return 1;
    };
    Object.defineProperty(UltraCalcFunctionAverage.prototype, "minArgs", {
        get: function () {
            return this.get_minArgs();
        },
        enumerable: false,
        configurable: true
    });
    UltraCalcFunctionAverage.prototype.get_maxArgs = function () {
        return 0x7FFFFFFF;
    };
    Object.defineProperty(UltraCalcFunctionAverage.prototype, "maxArgs", {
        get: function () {
            return this.get_maxArgs();
        },
        enumerable: false,
        configurable: true
    });
    UltraCalcFunctionAverage.prototype.doesParameterAllowIntermediateResultArray = function (a, b) {
        return (b == false);
    };
    UltraCalcFunctionAverage.$t = markType(UltraCalcFunctionAverage, 'UltraCalcFunctionAverage', BuiltInFunctionBase.$);
    return UltraCalcFunctionAverage;
}(BuiltInFunctionBase));
export { UltraCalcFunctionAverage };
