/*
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 { ArgumentException } from "igniteui-angular-core";
import { BaseError, typeCast, markType } from "igniteui-angular-core";
/**
 * Introduce InvalidEnumArgumentException class to Silverlight
 */
export class InvalidEnumArgumentException extends ArgumentException {
    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 = 1;
            }
            else if (typeCast(BaseError.$, arguments[1]) !== null) {
                a = 0;
            }
            else if (arguments[1] == null) {
                a = 0;
            }
        }
        else if (arguments.length === 3) {
            a = 2;
        }
        switch (a) {
            case 0:
                {
                    let message = _rest[0];
                    let innerException = _rest[1];
                    super(3, message, innerException);
                    message = (message !== void 0 ? message : null);
                    innerException = (innerException !== void 0 ? innerException : null);
                }
                break;
            case 1:
                {
                    let message = _rest[0];
                    let paramName = _rest[1];
                    super(2, message, paramName);
                }
                break;
            case 2:
                {
                    let argumentName = _rest[0];
                    let invalidValue = _rest[1];
                    let enumClass = _rest[2];
                    super(2, "Invalid Enum Argument: " + argumentName + " value: " + invalidValue, enumClass.toString());
                }
                break;
            default: throw new Error('Invalid arguments');
        }
    }
}
InvalidEnumArgumentException.$t = markType(InvalidEnumArgumentException, 'InvalidEnumArgumentException', ArgumentException.$);
//# sourceMappingURL=InvalidEnumArgumentException.js.map