/*
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, Boolean_$type, fromEnum, typeCast, markType, getInstanceType } from "igniteui-angular-core";
import { ISupportSetProperty_$type } from "./ISupportSetProperty";
import { CT_BorderPr } from "./CT_BorderPr";
import { ST_OnOff } from "./ST_OnOff";
/**
 * @hidden
 */
var CT_Border = /** @class */ (function (_super) {
    tslib_1.__extends(CT_Border, _super);
    function CT_Border() {
        var _this = _super.call(this) || this;
        _this.d = null;
        _this.e = null;
        _this.f = null;
        _this.a = null;
        _this.b = null;
        _this.g = null;
        _this.c = null;
        _this.j = toNullable(Boolean_$type, null);
        _this.i = toNullable(Boolean_$type, null);
        _this.k = toNullable(Boolean_$type, null);
        return _this;
    }
    CT_Border.m = function (a, b, c, d) {
        var e_1, _a;
        b = toNullable(Boolean_$type, null);
        c = toNullable(Boolean_$type, null);
        d = toNullable(Boolean_$type, null);
        try {
            for (var _b = tslib_1.__values(fromEnum(a.ab.u)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var e = _c.value;
                switch (e.a.e(a.d)) {
                    case "diagonalUp":
                        b = toNullable(Boolean_$type, ST_OnOff.e(e.d));
                        break;
                    case "diagonalDown":
                        c = toNullable(Boolean_$type, ST_OnOff.e(e.d));
                        break;
                    case "outline":
                        d = toNullable(Boolean_$type, ST_OnOff.e(e.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
        };
    };
    CT_Border.n = function (a, b, c, d, e) {
        if (c === void 0) { c = toNullable(Boolean_$type, null); }
        if (d === void 0) { d = toNullable(Boolean_$type, null); }
        if (e === void 0) { e = toNullable(Boolean_$type, null); }
        a.ad.p(b, null);
        var f = null;
        var g = null;
        if (c.hasValue) {
            g = "diagonalDown";
            f = ST_OnOff.g(c.value);
            a.ad.h(g, f);
        }
        if (d.hasValue) {
            g = "diagonalUp";
            f = ST_OnOff.g(d.value);
            a.ad.h(g, f);
        }
        if (e.hasValue) {
            g = "outline";
            f = ST_OnOff.g(e.value);
            a.ad.h(g, f);
        }
    };
    CT_Border.prototype.setProperty = function (a, b) {
        switch (a) {
            case 887:
                this.d = typeCast(CT_BorderPr.$, b);
                break;
            case 1363:
                this.e = typeCast(CT_BorderPr.$, b);
                break;
            case 1754:
                this.f = typeCast(CT_BorderPr.$, b);
                break;
            case 160:
                this.a = typeCast(CT_BorderPr.$, b);
                break;
            case 476:
                this.b = typeCast(CT_BorderPr.$, b);
                break;
            case 1838:
                this.g = typeCast(CT_BorderPr.$, b);
                break;
            case 795:
                this.c = typeCast(CT_BorderPr.$, b);
                break;
            default: break;
        }
    };
    CT_Border.prototype.toString = function () {
        var a = getInstanceType(this);
        return a != null ? a.typeName : _super.prototype.toString.call(this);
    };
    CT_Border.$t = markType(CT_Border, 'CT_Border', Base.$, [ISupportSetProperty_$type]);
    return CT_Border;
}(Base));
export { CT_Border };
//# sourceMappingURL=CT_Border.js.map