/*
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, Number_$type, callStaticConstructors, typeCast, markType } from "igniteui-angular-core";
import { Convert } from "igniteui-angular-core";
import { XlsxUtilities } from "./XlsxUtilities";
import { nullableEquals, nullableNotEquals } from "igniteui-angular-core";
import { intSToU } from "igniteui-angular-core";
/**
 * @hidden
 */
var AlignmentInfo = /** @class */ (function (_super) {
    tslib_1.__extends(AlignmentInfo, _super);
    function AlignmentInfo(a) {
        var _rest = [];
        for (var _i = 1; _i < arguments.length; _i++) {
            _rest[_i - 1] = arguments[_i];
        }
        var _this = _super.call(this) || this;
        _this.b = 0;
        _this.aa = toNullable(Number_$type, null);
        _this.p = false;
        _this.ac = toNullable(Number_$type, null);
        _this.ae = toNullable(Number_$type, null);
        _this.r = false;
        _this.ag = toNullable(Number_$type, null);
        _this.h = 2;
        _this.t = false;
        a = (a == void 0) ? 0 : a;
        switch (a) {
            case 0: break;
            case 1:
                {
                    var c = _rest[0];
                    var d = _rest[1];
                    var e = _rest[2];
                    var f = _rest[3];
                    var g = _rest[4];
                    var h = _rest[5];
                    var i = _rest[6];
                    var j = _rest[7];
                    var k = _rest[8];
                    _this.b = c;
                    _this.aa = d;
                    _this.p = e;
                    _this.ac = f;
                    _this.ae = g;
                    _this.r = (nullableEquals(i, true));
                    _this.ag = h;
                    _this.h = j;
                    _this.t = (nullableEquals(k, true));
                }
                break;
        }
        return _this;
    }
    AlignmentInfo.staticInit = function () {
        AlignmentInfo.f = new AlignmentInfo(0);
    };
    AlignmentInfo.prototype.equals = function (a) {
        return AlignmentInfo.n(this, typeCast(AlignmentInfo.$, a));
    };
    AlignmentInfo.prototype.getHashCode = function () {
        var a = 0;
        a ^= this.b;
        a ^= this.aa.value << 1;
        a ^= Convert.toInt321(this.p) << 2;
        a ^= this.ac.value << 3;
        a ^= this.ae.value << 4;
        a ^= Convert.toInt321(this.r) << 5;
        a ^= this.ag.value << 6;
        a ^= this.h << 7;
        a ^= Convert.toInt321(this.t) << 8;
        return a;
    };
    Object.defineProperty(AlignmentInfo.prototype, "c", {
        get: function () {
            return this.b;
        },
        set: function (a) {
            this.b = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AlignmentInfo.prototype, "ab", {
        get: function () {
            return this.aa;
        },
        set: function (a) {
            this.aa = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AlignmentInfo.prototype, "q", {
        get: function () {
            return this.p;
        },
        set: function (a) {
            this.p = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AlignmentInfo.prototype, "ad", {
        get: function () {
            return this.ac;
        },
        set: function (a) {
            this.ac = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AlignmentInfo.prototype, "af", {
        get: function () {
            return this.ae;
        },
        set: function (a) {
            this.ae = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AlignmentInfo.prototype, "s", {
        get: function () {
            return this.r;
        },
        set: function (a) {
            this.r = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AlignmentInfo.prototype, "ah", {
        get: function () {
            return this.ag;
        },
        set: function (a) {
            this.ag = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AlignmentInfo.prototype, "i", {
        get: function () {
            return this.h;
        },
        set: function (a) {
            this.h = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AlignmentInfo.prototype, "u", {
        get: function () {
            return this.t;
        },
        set: function (a) {
            this.t = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AlignmentInfo.prototype, "o", {
        get: function () {
            return (this.b == 0 && nullableEquals(this.aa, null) && this.p == false && nullableEquals(this.ac, null) && nullableEquals(this.ae, null) && this.r == false && nullableEquals(this.ag, null) && this.h == 2 && this.t == false);
        },
        enumerable: true,
        configurable: true
    });
    AlignmentInfo.prototype.ai = function (a, b) {
        if (b === void 0) { b = true; }
        a._b6 = this.q;
        if (b || a._a4 != this.c) {
            a.alignment = this.c;
        }
        var c = this.ah.getValueOrDefault1(0);
        if (b || a._cw != c) {
            a.rotation = c;
        }
        var d = XlsxUtilities.a6(this.u);
        if (b || nullableNotEquals(a._c7, d)) {
            a._wrapText$i = d;
        }
        if (b || a._a9 != this.i) {
            a.verticalAlignment = this.i;
        }
        var e = this.ab.getValueOrDefault1(0);
        if (b || a._ct != e) {
            a.indent = e;
        }
        var f = XlsxUtilities.a6(this.s);
        if (b || nullableNotEquals(a._c6, f)) {
            a._shrinkToFit$i = f;
        }
    };
    AlignmentInfo.d = function (a) {
        return AlignmentInfo.e(a, false);
    };
    AlignmentInfo.e = function (a, b) {
        var c = a._b6;
        var d = a._a4;
        var e = toNullable(Number_$type, intSToU(a._ct));
        var f = toNullable(Number_$type, intSToU(a._cw));
        var g = a._c6;
        var h = a._a9;
        var i = a._c7;
        if (b == false && c == false && d == 0 && nullableEquals(e, 0) && nullableEquals(f, 0) && nullableEquals(g, false) && nullableEquals(i, false) && h == 2) {
            return null;
        }
        return new AlignmentInfo(1, d, e, c, toNullable(Number_$type, 0), toNullable(Number_$type, 0), f, g, h, i);
    };
    AlignmentInfo.n = function (a, b) {
        if (Base.referenceEquals(a, null) && Base.referenceEquals(b, null)) {
            return true;
        }
        if (Base.referenceEquals(a, null) || Base.referenceEquals(b, null)) {
            return false;
        }
        return (a.b == b.b && nullableEquals(a.aa, b.aa) && a.p == b.p && nullableEquals(a.ac, b.ac) && nullableEquals(a.ae, b.ae) && a.r == b.r && nullableEquals(a.ag, b.ag) && a.h == b.h && a.t == b.t);
    };
    AlignmentInfo.$t = markType(AlignmentInfo, 'AlignmentInfo');
    AlignmentInfo.f = null;
    return AlignmentInfo;
}(Base));
export { AlignmentInfo };
(function (v) { callStaticConstructors(); })(true);
//# sourceMappingURL=AlignmentInfo.js.map