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