import { __extends } from "tslib";
import { delegateCombine, delegateRemove } from "igniteui-react-core";
import { IgrNumericXAxis } from "./igr-numeric-x-axis";
import { IgrNumericYAxis } from "./igr-numeric-y-axis";
import { IgrProgressiveLoadStatusEventArgs } from "./igr-progressive-load-status-event-args";
import { IgrSeries } from "./igr-series";
import { HighDensityScatterSeries } from "./HighDensityScatterSeries";
import { ensureBool, colorToString, stringToColor, toPoint } from "igniteui-react-core";
/**
 * Represents a IgxDataChartComponent series where a high volume of scatter points can be displayed.
*/
var IgrHighDensityScatterSeries = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(IgrHighDensityScatterSeries, _super);
    function IgrHighDensityScatterSeries(props) {
        var _this = _super.call(this, props) || this;
        _this._xAxisName = null;
        _this._yAxisName = null;
        _this._progressiveLoadStatusChanged = null;
        _this._progressiveLoadStatusChanged_wrapped = null;
        return _this;
    }
    IgrHighDensityScatterSeries.prototype.createImplementation = function () {
        return new HighDensityScatterSeries();
    };
    Object.defineProperty(IgrHighDensityScatterSeries.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrHighDensityScatterSeries.prototype, "isPixel", {
        /**
         * Gets whether the current series shows pixels.
        */
        get: function () {
            return this.i.e1;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrHighDensityScatterSeries.prototype, "isScatter", {
        /**
         * Checks if this series is a scatter series
        */
        get: function () {
            return this.i.e9;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrHighDensityScatterSeries.prototype, "xAxis", {
        /**
         * Gets or sets the effective x-axis for the current object.
        */
        get: function () {
            var r = this.i.t8;
            if (r == null) {
                return null;
            }
            if (!r.externalObject) {
                var e = IgrNumericXAxis._createFromInternal(r);
                if (e) {
                    e._implementation = r;
                }
                r.externalObject = e;
            }
            return r.externalObject;
        },
        set: function (v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.t8 = null : this.i.t8 = v.i;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrHighDensityScatterSeries.prototype, "xAxisName", {
        /**
        * Gets or sets the name to use to resolve xAxis from markup.
        */
        get: function () {
            return this._xAxisName;
        },
        set: function (v) {
            this._xAxisName = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrHighDensityScatterSeries.prototype, "yAxis", {
        /**
         * Gets or sets the effective y-axis for the current object.
        */
        get: function () {
            var r = this.i.ua;
            if (r == null) {
                return null;
            }
            if (!r.externalObject) {
                var e = IgrNumericYAxis._createFromInternal(r);
                if (e) {
                    e._implementation = r;
                }
                r.externalObject = e;
            }
            return r.externalObject;
        },
        set: function (v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.ua = null : this.i.ua = v.i;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrHighDensityScatterSeries.prototype, "yAxisName", {
        /**
        * Gets or sets the name to use to resolve yAxis from markup.
        */
        get: function () {
            return this._yAxisName;
        },
        set: function (v) {
            this._yAxisName = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrHighDensityScatterSeries.prototype, "xMemberPath", {
        /**
         * Gets or sets the x value mapping property for the current series object.
        */
        get: function () {
            return this.i.wb;
        },
        set: function (v) {
            this.i.wb = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrHighDensityScatterSeries.prototype, "xMemberAsLegendLabel", {
        /**
         * Gets or sets the label displayed before series X value in the Data Legend.
        */
        get: function () {
            return this.i.v7;
        },
        set: function (v) {
            this.i.v7 = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrHighDensityScatterSeries.prototype, "yMemberAsLegendLabel", {
        /**
         * Gets or sets the label displayed before series Y value in the Data Legend.
        */
        get: function () {
            return this.i.wf;
        },
        set: function (v) {
            this.i.wf = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrHighDensityScatterSeries.prototype, "xMemberAsLegendUnit", {
        /**
         * Gets or sets the unit after displayed after series X value in the Data Legend.
        */
        get: function () {
            return this.i.v9;
        },
        set: function (v) {
            this.i.v9 = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrHighDensityScatterSeries.prototype, "yMemberAsLegendUnit", {
        /**
         * Gets or sets the unit after displayed after series Y value in the Data Legend.
        */
        get: function () {
            return this.i.wh;
        },
        set: function (v) {
            this.i.wh = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrHighDensityScatterSeries.prototype, "yMemberPath", {
        /**
         * Gets or sets the y value mapping property for the current series object.
        */
        get: function () {
            return this.i.wj;
        },
        set: function (v) {
            this.i.wj = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrHighDensityScatterSeries.prototype, "useBruteForce", {
        /**
         * Gets or sets the whether to use use brute force mode.
        */
        get: function () {
            return this.i.uo;
        },
        set: function (v) {
            this.i.uo = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrHighDensityScatterSeries.prototype, "progressiveLoad", {
        /**
         * Gets or sets the whether to progressively load the data into the chart.
        */
        get: function () {
            return this.i.un;
        },
        set: function (v) {
            this.i.un = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrHighDensityScatterSeries.prototype, "heatMinimum", {
        /**
         * Gets or sets the density value that maps to the minimum heat color.
        */
        get: function () {
            return this.i.vj;
        },
        set: function (v) {
            this.i.vj = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrHighDensityScatterSeries.prototype, "heatMaximum", {
        /**
         * Gets or sets the value that maps to the maximum heat color.
        */
        get: function () {
            return this.i.vi;
        },
        set: function (v) {
            this.i.vi = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrHighDensityScatterSeries.prototype, "heatMinimumColor", {
        /**
         * Gets or sets the color to use for the minimum end of the scale.
        */
        get: function () {
            return colorToString(this.i.xh);
        },
        set: function (v) {
            this.i.xh = stringToColor(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrHighDensityScatterSeries.prototype, "heatMaximumColor", {
        /**
         * Gets or sets the color to use for the maximum end of the scale.
        */
        get: function () {
            return colorToString(this.i.xg);
        },
        set: function (v) {
            this.i.xg = stringToColor(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrHighDensityScatterSeries.prototype, "pointExtent", {
        /**
         * Gets or sets the the pixel extent of the square data points that are rendered.
        */
        get: function () {
            return this.i.vv;
        },
        set: function (v) {
            this.i.vv = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrHighDensityScatterSeries.prototype, "progressiveStatus", {
        /**
         * Represents the current status of the progressive load of the series. It will range from 0 to 100, where 100 is fully loaded.
        */
        get: function () {
            return this.i.vw;
        },
        set: function (v) {
            this.i.vw = +v;
        },
        enumerable: false,
        configurable: true
    });
    IgrHighDensityScatterSeries.prototype.bindAxes = function (axes) {
        _super.prototype.bindAxes.call(this, axes);
        for (var i = 0; i < axes.length; i++) {
            if (this.xAxisName && this.xAxisName.length > 0 &&
                axes[i].name == this.xAxisName) {
                this.xAxis = axes[i];
            }
        }
        for (var i = 0; i < axes.length; i++) {
            if (this.yAxisName && this.yAxisName.length > 0 &&
                axes[i].name == this.yAxisName) {
                this.yAxis = axes[i];
            }
        }
    };
    IgrHighDensityScatterSeries.prototype.findByName = function (name) {
        var baseResult = _super.prototype.findByName.call(this, name);
        if (baseResult) {
            return baseResult;
        }
        if (this.xAxis && this.xAxis.name && this.xAxis.name == name) {
            return this.xAxis;
        }
        if (this.yAxis && this.yAxis.name && this.yAxis.name == name) {
            return this.yAxis;
        }
        return null;
    };
    IgrHighDensityScatterSeries.prototype._styling = function (container, component, parent) {
        _super.prototype._styling.call(this, container, component, parent);
        this._inStyling = true;
        if (this.xAxis && this.xAxis._styling) {
            this.xAxis._styling(container, component, this);
        }
        if (this.yAxis && this.yAxis._styling) {
            this.yAxis._styling(container, component, this);
        }
        this._inStyling = false;
    };
    IgrHighDensityScatterSeries.prototype.getItemValue = function (item, memberPathName) {
        var iv = this.i.ju(item, memberPathName);
        return (iv);
    };
    /**
     * Determine if object can be used as YAxis
    
    * @param axis  * The object to check
    */
    IgrHighDensityScatterSeries.prototype.canUseAsYAxis = function (axis) {
        var iv = this.i.um(axis);
        return (iv);
    };
    /**
     * Determine if object can be used as XAxis
    
    * @param axis  * The object to check
    */
    IgrHighDensityScatterSeries.prototype.canUseAsXAxis = function (axis) {
        var iv = this.i.ul(axis);
        return (iv);
    };
    /**
     * Scrolls the series to display the item for the specified data item.
     * The series is scrolled by the minimum amount required to place the specified data item within
     * the central 80% of the visible axis.
    
    * @param item  * The data item (item) to scroll to.
    */
    IgrHighDensityScatterSeries.prototype.scrollIntoView = function (item) {
        var iv = this.i.fo(item);
        return (iv);
    };
    /**
     * Gets the item that is the best match for the specified world coordinates.
    
    * @param world  * The world coordinates to use.
    */
    IgrHighDensityScatterSeries.prototype.getItem = function (world) {
        var iv = this.i.jr(toPoint(world));
        return (iv);
    };
    Object.defineProperty(IgrHighDensityScatterSeries.prototype, "progressiveLoadStatusChanged", {
        /**
         * Raised when the progressive loading state of the series has changed.
        */
        get: function () {
            return this._progressiveLoadStatusChanged;
        },
        set: function (ev) {
            var _this = this;
            if (this._progressiveLoadStatusChanged_wrapped !== null) {
                this.i.progressiveLoadStatusChanged = delegateRemove(this.i.progressiveLoadStatusChanged, this._progressiveLoadStatusChanged_wrapped);
                this._progressiveLoadStatusChanged_wrapped = null;
                this._progressiveLoadStatusChanged = null;
            }
            this._progressiveLoadStatusChanged = ev;
            this._progressiveLoadStatusChanged_wrapped = function (o, e) {
                var outerArgs = new IgrProgressiveLoadStatusEventArgs();
                outerArgs._provideImplementation(e);
                if (_this.beforeProgressiveLoadStatusChanged) {
                    _this.beforeProgressiveLoadStatusChanged(_this, outerArgs);
                }
                if (_this._progressiveLoadStatusChanged) {
                    _this._progressiveLoadStatusChanged(_this, outerArgs);
                }
            };
            this.i.progressiveLoadStatusChanged = delegateCombine(this.i.progressiveLoadStatusChanged, this._progressiveLoadStatusChanged_wrapped);
            ;
        },
        enumerable: false,
        configurable: true
    });
    return IgrHighDensityScatterSeries;
}(IgrSeries));
export { IgrHighDensityScatterSeries };
