/*
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 { ArgumentOutOfRangeException } from "igniteui-angular-core";
import { BaseError, typeCast, markType } from "igniteui-angular-core";
/**
 * Extend the class ArgumentOutOfRangeException to add a constructor
 */
var ArgumentOutOfRangeExceptionExtension = /** @class */ (function (_super) {
    tslib_1.__extends(ArgumentOutOfRangeExceptionExtension, _super);
    function ArgumentOutOfRangeExceptionExtension() {
        var _rest = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            _rest[_i] = arguments[_i];
        }
        var _this = this;
        var a;
        if (arguments.length === 0) {
            a = 0;
        }
        else if (arguments.length === 1) {
            a = 0;
        }
        else if (arguments.length === 2) {
            if (typeof arguments[1] === 'string') {
                a = 0;
            }
            else if (typeCast(BaseError.$, arguments[1]) !== null) {
                a = 2;
            }
            else if (arguments[1] == null) {
                a = 0;
            }
        }
        else if (arguments.length === 3) {
            a = 1;
        }
        switch (a) {
            case 0:
                {
                    var paramName = _rest[0];
                    var message = _rest[1];
                    _this = _super.call(this, 2, paramName, message) || this;
                    paramName = (paramName !== void 0 ? paramName : null);
                    message = (message !== void 0 ? message : null);
                }
                break;
            case 1:
                {
                    var paramName = _rest[0];
                    var value = _rest[1];
                    var message = _rest[2];
                    _this = _super.call(this, 2, paramName, message) || this;
                }
                break;
            case 2:
                {
                    var message = _rest[0];
                    var innerException = _rest[1];
                    _this = _super.call(this, 4, message, innerException) || this;
                }
                break;
            default: throw new Error('Invalid arguments');
        }
        return _this;
    }
    ArgumentOutOfRangeExceptionExtension.$t = markType(ArgumentOutOfRangeExceptionExtension, 'ArgumentOutOfRangeExceptionExtension', ArgumentOutOfRangeException.$);
    return ArgumentOutOfRangeExceptionExtension;
}(ArgumentOutOfRangeException));
export { ArgumentOutOfRangeExceptionExtension };
//# sourceMappingURL=ArgumentOutOfRangeExceptionExtension.js.map