/*
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, __values } from "tslib";
import { Base, fromEnum, markType } from "igniteui-angular-core";
import { FunnelSliceVisualDataList } from "./FunnelSliceVisualDataList";
import { StringBuilder } from "igniteui-angular-core";
/**
 * @hidden
 */
var FunnelChartVisualData = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(FunnelChartVisualData, _super);
    function FunnelChartVisualData() {
        var _this = _super.call(this) || this;
        _this._slices = null;
        _this._name = null;
        _this._viewport = null;
        _this._isInverted = false;
        _this._backgroundColor = null;
        _this._foregroundColor = null;
        _this._opacity = 0;
        _this._borderBrush = null;
        _this._selectedItems = null;
        _this._dipScalingRatio = 0;
        _this.dipScalingRatio = 1;
        _this.slices = new FunnelSliceVisualDataList();
        return _this;
    }
    Object.defineProperty(FunnelChartVisualData.prototype, "slices", {
        get: function () {
            return this._slices;
        },
        set: function (a) {
            this._slices = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FunnelChartVisualData.prototype, "name", {
        get: function () {
            return this._name;
        },
        set: function (a) {
            this._name = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FunnelChartVisualData.prototype, "viewport", {
        get: function () {
            return this._viewport;
        },
        set: function (a) {
            this._viewport = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FunnelChartVisualData.prototype, "isInverted", {
        get: function () {
            return this._isInverted;
        },
        set: function (a) {
            this._isInverted = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FunnelChartVisualData.prototype, "backgroundColor", {
        get: function () {
            return this._backgroundColor;
        },
        set: function (a) {
            this._backgroundColor = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FunnelChartVisualData.prototype, "foregroundColor", {
        get: function () {
            return this._foregroundColor;
        },
        set: function (a) {
            this._foregroundColor = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FunnelChartVisualData.prototype, "opacity", {
        get: function () {
            return this._opacity;
        },
        set: function (a) {
            this._opacity = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FunnelChartVisualData.prototype, "borderBrush", {
        get: function () {
            return this._borderBrush;
        },
        set: function (a) {
            this._borderBrush = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FunnelChartVisualData.prototype, "selectedItems", {
        get: function () {
            return this._selectedItems;
        },
        set: function (a) {
            this._selectedItems = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FunnelChartVisualData.prototype, "dipScalingRatio", {
        get: function () {
            return this._dipScalingRatio;
        },
        set: function (a) {
            this._dipScalingRatio = a;
        },
        enumerable: false,
        configurable: true
    });
    FunnelChartVisualData.prototype.scaleByViewport = function () {
        var e_1, _a;
        try {
            for (var _b = __values(fromEnum(this.slices)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var a = _c.value;
                a.scaleByViewport(this.viewport);
            }
        }
        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;
            }
        }
    };
    FunnelChartVisualData.prototype.serialize = function () {
        var a = new StringBuilder(0);
        a.u("{");
        if (this.name != null) {
            a.u("name: \"" + this.name + "\", ");
        }
        else {
            a.u("name: \"\", ");
        }
        if (this.slices != null && this.slices.count > 0) {
            a.u("slices: [");
            for (var b = 0; b < this.slices.count; b++) {
                var c = this.slices._inner[b].serialize();
                a.l(c);
                if (b < this.slices.count - 1) {
                    a.u(", ");
                }
            }
            a.u("],");
        }
        a.u("viewport: {");
        a.l("left: " + this.viewport.left + ", top: " + this.viewport.top + ", width: " + this.viewport.width + ", height: " + this.viewport.height);
        a.u("},");
        a.l("dipScalingRatio: " + this.dipScalingRatio.toString());
        a.u("}");
        return a.toString();
    };
    FunnelChartVisualData.$t = markType(FunnelChartVisualData, 'FunnelChartVisualData');
    return FunnelChartVisualData;
}(Base));
export { FunnelChartVisualData };
//# sourceMappingURL=FunnelChartVisualData.js.map
