/*
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, __values } from "tslib";
import { Base, fromEnum, markType, getInstanceType } from "igniteui-angular-core";
import { ST_Sqref } from "./ST_Sqref";
/**
 * @hidden
 */
var CT_ProtectedRange = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(CT_ProtectedRange, _super);
    function CT_ProtectedRange() {
        var _this = _super.call(this) || this;
        _this.c = null;
        _this.a = null;
        _this.b = null;
        _this.d = null;
        return _this;
    }
    CT_ProtectedRange.f = function (a, b, c, d, e) {
        var e_1, _a;
        b = null;
        c = null;
        d = null;
        e = null;
        try {
            for (var _b = __values(fromEnum(a.ab.u)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var f = _c.value;
                switch (f.a.e(a.d)) {
                    case "password":
                        b = f.d;
                        break;
                    case "sqref":
                        c = ST_Sqref.a(f.d);
                        break;
                    case "name":
                        d = f.d;
                        break;
                    case "securityDescriptor":
                        e = f.d;
                        break;
                    default: break;
                }
            }
        }
        catch (e_1_1) {
            e_1 = { error: e_1_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_1)
                    throw e_1.error;
            }
        }
        return {
            p1: b,
            p2: c,
            p3: d,
            p4: e
        };
    };
    CT_ProtectedRange.g = function (a, b, c, d, e, f) {
        a.ad.p(b, null);
        var g = null;
        var h = null;
        if (c != null) {
            h = "password";
            g = c;
            a.ad.h(h, g);
        }
        if (d != null) {
            h = "securityDescriptor";
            g = d;
            a.ad.h(h, g);
        }
        if (e != null) {
            h = "name";
            g = e;
            a.ad.h(h, g);
        }
        if (f != null) {
            h = "sqref";
            g = f.e();
            a.ad.h(h, g);
        }
    };
    CT_ProtectedRange.prototype.toString = function () {
        var a = getInstanceType(this);
        return a != null ? a.typeName : _super.prototype.toString.call(this);
    };
    CT_ProtectedRange.$t = markType(CT_ProtectedRange, 'CT_ProtectedRange');
    return CT_ProtectedRange;
}(Base));
export { CT_ProtectedRange };
