/*
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 { ArgumentOutOfRangeException } from "igniteui-angular-core";
import { BaseError, typeCast, markType } from "igniteui-angular-core";
/**
 * Extend the class ArgumentOutOfRangeException to add a constructor
 */
export let ArgumentOutOfRangeExceptionExtension = /*@__PURE__*/ (() => {
    class ArgumentOutOfRangeExceptionExtension extends ArgumentOutOfRangeException {
        constructor(..._rest) {
            let 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:
                    {
                        let paramName = _rest[0];
                        let message = _rest[1];
                        super(2, paramName, message);
                        paramName = (paramName !== void 0 ? paramName : null);
                        message = (message !== void 0 ? message : null);
                    }
                    break;
                case 1:
                    {
                        let paramName = _rest[0];
                        let value = _rest[1];
                        let message = _rest[2];
                        super(2, paramName, message);
                    }
                    break;
                case 2:
                    {
                        let message = _rest[0];
                        let innerException = _rest[1];
                        super(4, message, innerException);
                    }
                    break;
                default: throw new Error('Invalid arguments');
            }
        }
    }
    ArgumentOutOfRangeExceptionExtension.$t = markType(ArgumentOutOfRangeExceptionExtension, 'ArgumentOutOfRangeExceptionExtension', ArgumentOutOfRangeException.$);
    return ArgumentOutOfRangeExceptionExtension;
})();
