/*
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, toNullable, fromEnum, typeCast, markType, getInstanceType } from "igniteui-angular-core";
import { ISupportSetProperty_$type } from "./ISupportSetProperty";
import { ColorInfo } from "./ColorInfo";
import { ST_BorderStyle_$type } from "./ST_BorderStyle";
import { XmlNamespaceDefinitionBase } from "./XmlNamespaceDefinitionBase";
/**
 * @hidden
 */
var CT_BorderPr = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(CT_BorderPr, _super);
    function CT_BorderPr() {
        var _this = _super.call(this) || this;
        _this.a = null;
        _this.b = toNullable(ST_BorderStyle_$type, null);
        return _this;
    }
    CT_BorderPr.d = function (a, b) {
        var e_1, _a;
        b = toNullable(ST_BorderStyle_$type, null);
        try {
            for (var _b = __values(fromEnum(a.ab.u)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var c = _c.value;
                switch (c.a.e(a.d)) {
                    case "style":
                        b = toNullable(ST_BorderStyle_$type, XmlNamespaceDefinitionBase.b(ST_BorderStyle_$type, c.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
        };
    };
    CT_BorderPr.e = function (a, b, c) {
        if (c === void 0) {
            c = toNullable(ST_BorderStyle_$type, null);
        }
        a.ad.p(b, null);
        var d = null;
        var e = null;
        if (c.hasValue) {
            e = "style";
            d = XmlNamespaceDefinitionBase.p(ST_BorderStyle_$type, c.value);
            a.ad.h(e, d);
        }
    };
    CT_BorderPr.prototype.setProperty = function (a, b) {
        switch (a) {
            case 302:
                this.a = typeCast(ColorInfo.$, b);
                break;
            default: break;
        }
    };
    CT_BorderPr.prototype.toString = function () {
        var a = getInstanceType(this);
        return a != null ? a.typeName : _super.prototype.toString.call(this);
    };
    CT_BorderPr.$t = markType(CT_BorderPr, 'CT_BorderPr', Base.$, [ISupportSetProperty_$type]);
    return CT_BorderPr;
}(Base));
export { CT_BorderPr };
