import * as tslib_1 from "tslib";
import * as React from 'react';
import { delegateCombine, delegateRemove } from "igniteui-react-core/ES5/type";
import { Visibility_$type } from "igniteui-react-core/ES5/Visibility";
import { MarkerType_$type } from "./MarkerType";
import { PropertyUpdatedEventArgs } from "igniteui-react-core/ES5/igr-property-updated-event-args";
import { StackedFragmentSeries } from "./StackedFragmentSeries";
import { getModifiedProps, isValidProp, brushToString, stringToBrush, ensureBool, colorToString, stringToColor, ensureEnum } from "igniteui-react-core/ES5/componentUtil";
/**
 * Represents a non-visual child of StackedSeriesBase.
*/
var IgrStackedFragmentSeries = /** @class */ (function (_super) {
    tslib_1.__extends(IgrStackedFragmentSeries, _super);
    function IgrStackedFragmentSeries(props) {
        var _this = _super.call(this, props) || this;
        _this._hasUserValues = new Set();
        _this._propertyUpdated = null;
        _this._propertyUpdated_wrapped = null;
        _this._implementation = _this.createImplementation();
        _this._implementation.externalObject = _this;
        _this.onImplementationCreated();
        return _this;
    }
    IgrStackedFragmentSeries.prototype.createImplementation = function () {
        return new StackedFragmentSeries();
    };
    IgrStackedFragmentSeries.prototype.onImplementationCreated = function () {
    };
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "hasUserValues", {
        get: function () {
            return this._hasUserValues;
        },
        enumerable: true,
        configurable: true
    });
    IgrStackedFragmentSeries.prototype.componentDidMount = function () {
        var e_1, _a;
        try {
            for (var _b = tslib_1.__values(Object.keys(this.props)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var p = _c.value;
                if (isValidProp(this, p)) {
                    this._hasUserValues.add(p);
                    this[p] = this.props[p];
                }
            }
        }
        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; }
        }
    };
    IgrStackedFragmentSeries.prototype.shouldComponentUpdate = function (nextProps, nextState) {
        var e_2, _a;
        var mod = getModifiedProps(this.props, nextProps);
        try {
            for (var _b = tslib_1.__values(Object.keys(mod)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var p = _c.value;
                if (isValidProp(this, p)) {
                    this._hasUserValues.add(p);
                    this[p] = mod[p];
                }
            }
        }
        catch (e_2_1) { e_2 = { error: e_2_1 }; }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
            }
            finally { if (e_2) throw e_2.error; }
        }
        return true;
    };
    IgrStackedFragmentSeries.prototype.render = function () {
        return null;
    };
    IgrStackedFragmentSeries.prototype.provideRenderer = function (renderer) {
        this._renderer = renderer;
        this.i.visualSeriesLink.provideRenderer(renderer);
    };
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "brush", {
        /**
     * Gets or sets the brush of the stacked fragment.
    */
        get: function () {
            return brushToString(this.i.fu);
        },
        set: function (v) {
            this.i.fu = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "actualBrush", {
        /**
         * Gets the actual brush used by the series.
        */
        get: function () {
            return brushToString(this.i.fp);
        },
        set: function (v) {
            this.i.fp = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "isDropShadowEnabled", {
        /**
         * Gets or sets whether drop shadow should be enabled for this series.
        */
        get: function () {
            return this.i.w;
        },
        set: function (v) {
            this.i.w = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "actualIsDropShadowEnabled", {
        /**
         * Gets whether drop shadow is actually enabled for this series.
        */
        get: function () {
            return this.i.s;
        },
        set: function (v) {
            this.i.s = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "shadowBlur", {
        /**
         * Gets or sets the shadow blur.
         * This property is ignored when StackedFragmentSeries.UseSingleShadow is set to true.
        */
        get: function () {
            return this.i.aq;
        },
        set: function (v) {
            this.i.aq = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "actualShadowBlur", {
        /**
         * Gets the actual shadow blur used by the series.
        */
        get: function () {
            return this.i.ai;
        },
        set: function (v) {
            this.i.ai = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "shadowColor", {
        /**
         * Gets or sets the drop shadow color.
        */
        get: function () {
            return colorToString(this.i.f1);
        },
        set: function (v) {
            this.i.f1 = stringToColor(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "actualShadowColor", {
        /**
         * Gets actual the drop shadow color used by the series.
        */
        get: function () {
            return colorToString(this.i.f0);
        },
        set: function (v) {
            this.i.f0 = stringToColor(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "useSingleShadow", {
        /**
         * Gets or sets whether drop shadow is applied to the whole StackedFragmentSeries visual or to each of the individual shapes forming the StackedFragmentSeries.
         * When this property is set to true, no StackedFragmentSeries.ShadowBlur is applied.
        */
        get: function () {
            return this.i.aa;
        },
        set: function (v) {
            this.i.aa = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "actualUseSingleShadow", {
        /**
         * Gets whether drop shadow is actually applied to the whole StackedFragmentSeries visual or to each of the individual shapes forming the StackedFragmentSeries.
        */
        get: function () {
            return this.i.v;
        },
        set: function (v) {
            this.i.v = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "shadowOffsetX", {
        /**
         * Gets or sets the drop shadow x-offset.
        */
        get: function () {
            return this.i.ar;
        },
        set: function (v) {
            this.i.ar = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "actualShadowOffsetX", {
        /**
         * Gets the actual drop shadow x-offset applied to the series.
        */
        get: function () {
            return this.i.aj;
        },
        set: function (v) {
            this.i.aj = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "shadowOffsetY", {
        /**
         * Gets or sets the drop shadow y-offset.
        */
        get: function () {
            return this.i.as;
        },
        set: function (v) {
            this.i.as = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "actualShadowOffsetY", {
        /**
         * Gets the actual drop shadow y-offset applied to the series.
        */
        get: function () {
            return this.i.ak;
        },
        set: function (v) {
            this.i.ak = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "legendItemBadgeTemplate", {
        /**
         * Gets or sets the LegendItemBadgeTemplate property.
         * The legend item badge is created according to the LegendItemBadgeTemplate on-demand by
         * the series object itself.
        */
        get: function () {
            return this.i.du;
        },
        set: function (v) {
            this.i.du = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "actualLegendItemBadgeTemplate", {
        /**
         * Gets the actual legend item badge template used by the series.
        */
        get: function () {
            return this.i.dr;
        },
        set: function (v) {
            this.i.dr = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "legendItemTemplate", {
        /**
         * Gets or sets the LegendItemTemplate property.
         * The legend item control content is created according to the LegendItemTemplate on-demand by
         * the series object itself.
        */
        get: function () {
            return this.i.dv;
        },
        set: function (v) {
            this.i.dv = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "actualLegendItemTemplate", {
        /**
         * Gets the actual legend item template used by the series.
        */
        get: function () {
            return this.i.ds;
        },
        set: function (v) {
            this.i.ds = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "legendItemVisibility", {
        /**
         * Gets or sets the legend item visibility for the current series object.
        */
        get: function () {
            return this.i.ge;
        },
        set: function (v) {
            this.i.ge = ensureEnum(Visibility_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "actualLegendItemVisibility", {
        /**
         * Gets the actual visibility of the legend items in the series.
        */
        get: function () {
            return this.i.gc;
        },
        set: function (v) {
            this.i.gc = ensureEnum(Visibility_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "markerBrush", {
        /**
         * Gets or sets the brush that specifies how the current series object's marker interiors are painted.
        */
        get: function () {
            return brushToString(this.i.fv);
        },
        set: function (v) {
            this.i.fv = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "actualMarkerBrush", {
        /**
         * Gets the actual marker brush of the series.
        */
        get: function () {
            return brushToString(this.i.fq);
        },
        set: function (v) {
            this.i.fq = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "markerOutline", {
        /**
         * Gets or sets the brush that specifies how the current series object's marker outlines are painted.
        */
        get: function () {
            return brushToString(this.i.fw);
        },
        set: function (v) {
            this.i.fw = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "actualMarkerOutline", {
        /**
         * Gets the actual marker outline of the series.
        */
        get: function () {
            return brushToString(this.i.fr);
        },
        set: function (v) {
            this.i.fr = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "markerTemplate", {
        /**
         * Gets or sets the MarkerTemplate for the current series object.
        */
        get: function () {
            return this.i.dw;
        },
        set: function (v) {
            this.i.dw = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "actualMarkerTemplate", {
        /**
         * Gets the actual marker template used by the series.
        */
        get: function () {
            return this.i.dt;
        },
        set: function (v) {
            this.i.dt = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "markerType", {
        /**
         * Gets or sets the marker type for the current series object.
         * If the MarkerTemplate property is set, the setting of the MarkerType property will be ignored.
        */
        get: function () {
            return this.i.l;
        },
        set: function (v) {
            this.i.l = ensureEnum(MarkerType_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "actualMarkerType", {
        /**
         * Gets the actual marker type set used in the series.
        */
        get: function () {
            return this.i.k;
        },
        set: function (v) {
            this.i.k = ensureEnum(MarkerType_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "name", {
        /**
         * Gets or sets the Name of the stacked fragment.
        */
        get: function () {
            return this.i.b8;
        },
        set: function (v) {
            this.i.b8 = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "opacity", {
        /**
         * Gets or sets the Opacity of the stacked fragment.
        */
        get: function () {
            return this.i.an;
        },
        set: function (v) {
            this.i.an = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "actualOpacity", {
        /**
         * Gets the series opacity.
        */
        get: function () {
            return this.i.af;
        },
        set: function (v) {
            this.i.af = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "outline", {
        /**
         * Gets or sets the brush to use for the outline of the series.
         * Some series types, such as LineSeries, do not display outlines.  Therefore, this property does not affect some charts.
        */
        get: function () {
            return brushToString(this.i.fy);
        },
        set: function (v) {
            this.i.fy = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "actualOutline", {
        /**
         * Gets the series outline.
        */
        get: function () {
            return brushToString(this.i.ft);
        },
        set: function (v) {
            this.i.ft = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "areaFillOpacity", {
        /**
         * Gets or sets the AreaFillOpacity of the stacked fragment. This property only applies for area-like series.
        */
        get: function () {
            return this.i.am;
        },
        set: function (v) {
            this.i.am = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "actualAreaFillOpacity", {
        /**
         * Gets the series ActualAreaFillOpacity.  This property only applies for area-like series.
        */
        get: function () {
            return this.i.ae;
        },
        set: function (v) {
            this.i.ae = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "radiusX", {
        /**
         * Gets or sets the x-radius of the ellipse that is used to round the corners of the column. This only applies to Bar and Column series.
        */
        get: function () {
            return this.i.ao;
        },
        set: function (v) {
            this.i.ao = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "actualRadiusX", {
        /**
         * Gets the actual corner radius of the series
        */
        get: function () {
            return this.i.ag;
        },
        set: function (v) {
            this.i.ag = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "radiusY", {
        /**
         * Gets or sets the y-radius of the ellipse that is used to round the corners of the column. This only applies to Bar and Column series.
        */
        get: function () {
            return this.i.ap;
        },
        set: function (v) {
            this.i.ap = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "actualRadiusY", {
        /**
         * Gets the actual corner radius of the series
        */
        get: function () {
            return this.i.ah;
        },
        set: function (v) {
            this.i.ah = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "thickness", {
        /**
         * Gets or sets the width of the current series object's line thickness.
        */
        get: function () {
            return this.i.at;
        },
        set: function (v) {
            this.i.at = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "actualThickness", {
        /**
         * Gets or sets the thickness of this stacked fragment.
        */
        get: function () {
            return this.i.al;
        },
        set: function (v) {
            this.i.al = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "title", {
        /**
         * Gets or sets the Title property.
         * The legend item control is created according to the Title on-demand by
         * the series object itself.
        */
        get: function () {
            return this.i.ax;
        },
        set: function (v) {
            this.i.ax = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "valueMemberPath", {
        /**
         * Gets or sets the value mapping property for the current series object.
        */
        get: function () {
            return this.i.cq;
        },
        set: function (v) {
            this.i.cq = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "visibility", {
        /**
         * Gets or sets the Visibility of the stacked fragment.
        */
        get: function () {
            return this.i.gf;
        },
        set: function (v) {
            this.i.gf = ensureEnum(Visibility_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "actualVisibility", {
        /**
         * Gets the actual visibility of the stacked fragment.
        */
        get: function () {
            return this.i.gd;
        },
        set: function (v) {
            this.i.gd = ensureEnum(Visibility_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "parentOrLocalBrush", {
        /**
         * Gets the resolved brush used between the local series and the parent series.
        */
        get: function () {
            return brushToString(this.i.fz);
        },
        set: function (v) {
            this.i.fz = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrStackedFragmentSeries.prototype, "propertyUpdated", {
        /**
         * Event raised when a property (including "effective" and non-dependency property) value changes.
        */
        get: function () {
            return this._propertyUpdated;
        },
        set: function (ev) {
            var _this = this;
            if (this._propertyUpdated_wrapped !== null) {
                this.i.propertyUpdated = delegateRemove(this.i.propertyUpdated, this._propertyUpdated_wrapped);
                this._propertyUpdated_wrapped = null;
                this._propertyUpdated = null;
            }
            this._propertyUpdated = ev;
            this._propertyUpdated_wrapped = function (o, e) {
                var outerArgs = new PropertyUpdatedEventArgs();
                outerArgs._provideImplementation(e);
                if (_this.beforePropertyUpdated) {
                    _this.beforePropertyUpdated(_this, outerArgs);
                }
                if (_this._propertyUpdated) {
                    _this._propertyUpdated(_this, outerArgs);
                }
            };
            this.i.propertyUpdated = delegateCombine(this.i.propertyUpdated, this._propertyUpdated_wrapped);
        },
        enumerable: true,
        configurable: true
    });
    return IgrStackedFragmentSeries;
}(React.Component));
export { IgrStackedFragmentSeries };
