/*
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, Number_$type, markType } from "igniteui-angular-core";
import { ILegacyShapeData_$type } from "./ILegacyShapeData";
import { MathUtilities } from "./MathUtilities";
import { ST_CF_$type } from "./ST_CF";
import { ST_InsetMode_$type } from "./ST_InsetMode";
import { truncate } from "igniteui-angular-core";
import { nullableEquals } from "igniteui-angular-core";
/**
 * @hidden
 */
var LegacyShapeData = /** @class */ (function (_super) {
    tslib_1.__extends(LegacyShapeData, _super);
    function LegacyShapeData() {
        var _this = _super.call(this) || this;
        _this.n = toNullable(Boolean_$type, null);
        _this.o = toNullable(Boolean_$type, null);
        _this.p = toNullable(Boolean_$type, null);
        _this.q = toNullable(ST_CF_$type, null);
        _this.r = toNullable(Number_$type, null);
        _this.s = toNullable(Boolean_$type, null);
        _this.t = toNullable(Number_$type, null);
        _this.u = toNullable(Boolean_$type, null);
        _this.v = toNullable(Number_$type, null);
        _this.an = null;
        _this.w = toNullable(Number_$type, null);
        _this.x = toNullable(Boolean_$type, null);
        _this.ao = null;
        _this._fmlaMacro = null;
        _this.ap = null;
        _this.k = false;
        _this.aq = null;
        _this.y = toNullable(Number_$type, null);
        _this.z = toNullable(ST_InsetMode_$type, null);
        _this.c = null;
        _this.ar = null;
        _this.ab = toNullable(Number_$type, null);
        _this.ac = toNullable(Number_$type, null);
        _this.aa = toNullable(Boolean_$type, null);
        _this.ad = toNullable(Boolean_$type, null);
        _this.ae = toNullable(Boolean_$type, null);
        _this.j = 0;
        _this.af = toNullable(Number_$type, null);
        _this.d = null;
        _this.ag = toNullable(Boolean_$type, null);
        _this.ah = toNullable(Number_$type, null);
        _this.ai = toNullable(Boolean_$type, null);
        _this.m = 0;
        _this.as = null;
        _this.at = null;
        _this.aj = toNullable(Boolean_$type, null);
        _this.au = null;
        _this.aw = null;
        _this.ak = toNullable(Boolean_$type, null);
        _this.av = null;
        _this.i = null;
        _this.ax = null;
        _this.ay = null;
        _this.az = null;
        _this.al = toNullable(Number_$type, null);
        _this.am = toNullable(Boolean_$type, null);
        _this.a = null;
        _this.e = null;
        _this.g = null;
        _this.a = new Array(8);
        return _this;
    }
    Object.defineProperty(LegacyShapeData.prototype, "fmlaMacro", {
        get: function () {
            return this._fmlaMacro;
        },
        set: function (a) {
            this._fmlaMacro = a;
        },
        enumerable: true,
        configurable: true
    });
    LegacyShapeData.prototype.a0 = function (a) {
        this.g = a;
        var b = a.worksheet;
        if (a.topLeftCornerCell.worksheet == null || a.bottomRightCornerCell.worksheet == null) {
            return;
        }
        this.a[0] = a._ah.m;
        this.a[2] = a._ah.o;
        this.a[4] = a._ad.m;
        this.a[6] = a._ad.o;
        var c = b._fp(a._ah.m, true);
        var d = ((c * a._topLeftCornerPosition$i.x) / 100);
        this.a[1] = truncate(MathUtilities.f(d));
        var e = b._fs(a._ah.o, true);
        var f = ((e * a._topLeftCornerPosition$i.y) / 100);
        this.a[3] = truncate(MathUtilities.f(f));
        var g = b._fp(a._ad.m, true);
        var h = ((g * a._bottomRightCornerPosition$i.x) / 100);
        this.a[5] = truncate(MathUtilities.f(h));
        var i = b._fs(a._ad.o, true);
        var j = ((i * a._bottomRightCornerPosition$i.y) / 100);
        this.a[7] = truncate(MathUtilities.f(j));
    };
    Object.defineProperty(LegacyShapeData.prototype, "b", {
        get: function () {
            return this.a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(LegacyShapeData.prototype, "f", {
        get: function () {
            return this.e;
        },
        set: function (a) {
            this.e = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(LegacyShapeData.prototype, "h", {
        get: function () {
            return this.g;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(LegacyShapeData.prototype, "l", {
        get: function () {
            if (nullableEquals(this.am, false)) {
                return false;
            }
            if (nullableEquals(this.ai, true) || nullableEquals(this.s, true)) {
                return false;
            }
            return true;
        },
        enumerable: true,
        configurable: true
    });
    LegacyShapeData.$t = markType(LegacyShapeData, 'LegacyShapeData', Base.$, [ILegacyShapeData_$type]);
    return LegacyShapeData;
}(Base));
export { LegacyShapeData };
//# sourceMappingURL=LegacyShapeData.js.map