/*
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 } from "tslib";
import { Base, Point_$type, markType } from "igniteui-angular-core";
import { SliceAppearance } from "./SliceAppearance";
import { FunnelSliceVisualData } from "./FunnelSliceVisualData";
import { PointData } from "igniteui-angular-core";
import { PrimitiveAppearanceData } from "igniteui-angular-core";
import { AppearanceHelper } from "igniteui-angular-core";
import { RectData } from "igniteui-angular-core";
import { LabelAppearanceData } from "igniteui-angular-core";
import { stringEmpty } from "igniteui-angular-core";
/**
 * @hidden
 */
var SliceInfo = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(SliceInfo, _super);
    function SliceInfo() {
        var _this = _super.call(this) || this;
        _this.k = null;
        _this.m = null;
        _this.i = 0;
        _this.f = false;
        _this.a = null;
        _this.e = false;
        _this.b = new SliceAppearance();
        _this.n = { $type: Point_$type, x: 0, y: 0 };
        return _this;
    }
    Object.defineProperty(SliceInfo.prototype, "l", {
        get: function () {
            return this.k;
        },
        set: function (a) {
            this.k = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SliceInfo.prototype, "n", {
        get: function () {
            return this.m;
        },
        set: function (a) {
            this.m = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SliceInfo.prototype, "j", {
        get: function () {
            return this.i;
        },
        set: function (a) {
            this.i = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SliceInfo.prototype, "h", {
        get: function () {
            return this.f;
        },
        set: function (a) {
            this.f = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SliceInfo.prototype, "b", {
        get: function () {
            return this.a;
        },
        set: function (a) {
            this.a = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SliceInfo.prototype, "g", {
        get: function () {
            return this.e;
        },
        set: function (a) {
            this.e = a;
        },
        enumerable: false,
        configurable: true
    });
    SliceInfo.c = function (a, b, c, d, e) {
        if (a == null) {
            a = new SliceInfo();
        }
        a.g = c.g;
        a.h = c.h;
        a.j = c.j;
        a.l = c.l;
        a.n = { $type: Point_$type, x: (b.n.x * e) + (c.n.x * d), y: (b.n.y * e) + (c.n.y * d) };
        a.b = SliceAppearance.f(a.b, b.b, c.b, d, e);
        return a;
    };
    SliceInfo.prototype.d = function () {
        var a = new FunnelSliceVisualData();
        a.appearance = new PrimitiveAppearanceData();
        a.appearance.fill = AppearanceHelper.b(this.b.ad);
        a.appearance.stroke = AppearanceHelper.b(this.b.ag);
        a.appearance.opacity = this.b.p;
        a.appearance.canvasLeft = this.b.aq.x;
        a.appearance.canvasTop = this.b.aq.y;
        a.height = this.b.ao.y - this.b.ar.y;
        a.upperWidth = this.b.as.x - this.b.ar.x;
        a.lowerWidth = this.b.ap.x - this.b.ao.x;
        a.isSelected = this.b.j;
        a.top = this.b.o;
        a.bottom = this.b.n;
        a.index = this.j;
        a.height = this.b.n - this.b.o;
        a.sliceBorderBrush = AppearanceHelper.a(this.b.ag);
        if (this.b.v == null) {
            a.innerLabel = stringEmpty();
        }
        else {
            a.innerLabel = this.b.v.toString();
        }
        if (this.l == null) {
            a.outerLabel = stringEmpty();
        }
        else {
            a.outerLabel = this.l.toString();
        }
        a.upperLeft = PointData.b(this.b.ar);
        a.upperRight = PointData.b(this.b.as);
        a.lowerLeft = PointData.b(this.b.ao);
        a.lowerRight = PointData.b(this.b.ap);
        var b = new Array(this.b.au.count);
        for (var c = 0; c < this.b.au.count; c++) {
            b[c] = new PointData(this.b.au._inner[c].x, this.b.au._inner[c].y);
        }
        a.slicePoints = b;
        a.innerLabelPosition = PointData.b(this.a.an);
        a.outerLabelPosition = PointData.b(this.m);
        a.outerLabelBounds = RectData.b(this.b.ay);
        a.innerLabelBounds = RectData.b(this.b.ax);
        a.isVisibile = this.b.a2 == 0;
        a.innerLabelAppearance = new LabelAppearanceData();
        a.innerLabelAppearance.labelBrush = AppearanceHelper.b(this.b.ae);
        a.innerLabelAppearance.text = a.innerLabel;
        a.innerLabelAppearance.visibility = this.b.i;
        a.outerLabelAppearance = new LabelAppearanceData();
        a.outerLabelAppearance.labelBrush = AppearanceHelper.b(this.b.af);
        a.outerLabelAppearance.text = a.outerLabel;
        a.outerLabelAppearance.visibility = this.g;
        return a;
    };
    SliceInfo.$t = markType(SliceInfo, 'SliceInfo');
    return SliceInfo;
}(Base));
export { SliceInfo };
