import { __extends } from "tslib";
import { EventEmitter, Output, Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core';
import { delegateCombine } from "igniteui-angular-core";
import { IgxNumericXAxisComponent } from "./igx-numeric-x-axis-component";
import { IgxNumericYAxisComponent } from "./igx-numeric-y-axis-component";
import { IgxProgressiveLoadStatusEventArgs } from "./igx-progressive-load-status-event-args";
import { IgxSeriesComponent } from "./igx-series-component";
import { HighDensityScatterSeries } from "./HighDensityScatterSeries";
import { ensureBool, colorToString, stringToColor, toPoint } from "igniteui-angular-core";
import * as i0 from "@angular/core";
/**
 * Represents a IgxDataChartComponent series where a high volume of scatter points can be displayed.
*/
var IgxHighDensityScatterSeriesComponent = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(IgxHighDensityScatterSeriesComponent, _super);
    function IgxHighDensityScatterSeriesComponent() {
        var _this = _super.call(this) || this;
        _this._progressiveLoadStatusChanged = null;
        return _this;
    }
    IgxHighDensityScatterSeriesComponent.prototype.createImplementation = function () {
        return new HighDensityScatterSeries();
    };
    Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "isPixel", {
        /**
         * Gets whether the current series shows pixels.
        */
        get: function () {
            return this.i.d5;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "isScatter", {
        /**
         * Checks if this series is a scatter series
        */
        get: function () {
            return this.i.ec;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "xAxis", {
        /**
         * Gets or sets the effective x-axis for the current object.
        */
        get: function () {
            if (this.i.qa == null) {
                return null;
            }
            if (!this.i.qa.externalObject) {
                var e = IgxNumericXAxisComponent._createFromInternal(this.i.qa);
                if (e) {
                    e._implementation = this.i.qa;
                }
                this.i.qa.externalObject = e;
            }
            return this.i.qa.externalObject;
        },
        set: function (v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.qa = null : this.i.qa = v.i;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "yAxis", {
        /**
         * Gets or sets the effective y-axis for the current object.
        */
        get: function () {
            if (this.i.qc == null) {
                return null;
            }
            if (!this.i.qc.externalObject) {
                var e = IgxNumericYAxisComponent._createFromInternal(this.i.qc);
                if (e) {
                    e._implementation = this.i.qc;
                }
                this.i.qc.externalObject = e;
            }
            return this.i.qc.externalObject;
        },
        set: function (v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.qc = null : this.i.qc = v.i;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "xMemberPath", {
        /**
         * Gets or sets the x value mapping property for the current series object.
        */
        get: function () {
            return this.i.sd;
        },
        set: function (v) {
            this.i.sd = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "xMemberAsLegendLabel", {
        /**
         * Gets or sets the label displayed before series X value in the Data Legend.
        */
        get: function () {
            return this.i.r9;
        },
        set: function (v) {
            this.i.r9 = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "yMemberAsLegendLabel", {
        /**
         * Gets or sets the label displayed before series Y value in the Data Legend.
        */
        get: function () {
            return this.i.sh;
        },
        set: function (v) {
            this.i.sh = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "xMemberAsLegendUnit", {
        /**
         * Gets or sets the unit after displayed after series X value in the Data Legend.
        */
        get: function () {
            return this.i.sb;
        },
        set: function (v) {
            this.i.sb = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "yMemberAsLegendUnit", {
        /**
         * Gets or sets the unit after displayed after series Y value in the Data Legend.
        */
        get: function () {
            return this.i.sj;
        },
        set: function (v) {
            this.i.sj = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "yMemberPath", {
        /**
         * Gets or sets the y value mapping property for the current series object.
        */
        get: function () {
            return this.i.sl;
        },
        set: function (v) {
            this.i.sl = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "useBruteForce", {
        /**
         * Gets or sets the whether to use use brute force mode.
        */
        get: function () {
            return this.i.qq;
        },
        set: function (v) {
            this.i.qq = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "progressiveLoad", {
        /**
         * Gets or sets the whether to progressively load the data into the chart.
        */
        get: function () {
            return this.i.qp;
        },
        set: function (v) {
            this.i.qp = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "heatMinimum", {
        /**
         * Gets or sets the density value that maps to the minimum heat color.
        */
        get: function () {
            return this.i.rl;
        },
        set: function (v) {
            this.i.rl = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "heatMaximum", {
        /**
         * Gets or sets the value that maps to the maximum heat color.
        */
        get: function () {
            return this.i.rk;
        },
        set: function (v) {
            this.i.rk = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "heatMinimumColor", {
        /**
         * Gets or sets the color to use for the minimum end of the scale.
        */
        get: function () {
            return colorToString(this.i.tj);
        },
        set: function (v) {
            this.i.tj = stringToColor(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "heatMaximumColor", {
        /**
         * Gets or sets the color to use for the maximum end of the scale.
        */
        get: function () {
            return colorToString(this.i.ti);
        },
        set: function (v) {
            this.i.ti = stringToColor(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "pointExtent", {
        /**
         * Gets or sets the the pixel extent of the square data points that are rendered.
        */
        get: function () {
            return this.i.rx;
        },
        set: function (v) {
            this.i.rx = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxHighDensityScatterSeriesComponent.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.ry;
        },
        set: function (v) {
            this.i.ry = +v;
        },
        enumerable: false,
        configurable: true
    });
    IgxHighDensityScatterSeriesComponent.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;
    };
    IgxHighDensityScatterSeriesComponent.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;
    };
    IgxHighDensityScatterSeriesComponent.prototype.getItemValue = function (item, memberPathName) {
        var iv = this.i.hw(item, memberPathName);
        return (iv);
    };
    /**
     * Determine if object can be used as YAxis
    
    * @param axis  * The object to check
    */
    IgxHighDensityScatterSeriesComponent.prototype.canUseAsYAxis = function (axis) {
        var iv = this.i.qo(axis);
        return (iv);
    };
    /**
     * Determine if object can be used as XAxis
    
    * @param axis  * The object to check
    */
    IgxHighDensityScatterSeriesComponent.prototype.canUseAsXAxis = function (axis) {
        var iv = this.i.qn(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.
    */
    IgxHighDensityScatterSeriesComponent.prototype.scrollIntoView = function (item) {
        var iv = this.i.en(item);
        return (iv);
    };
    /**
     * Gets the item that is the best match for the specified world coordinates.
    
    * @param world  * The world coordinates to use.
    */
    IgxHighDensityScatterSeriesComponent.prototype.getItem = function (world) {
        var iv = this.i.ht(toPoint(world));
        return (iv);
    };
    Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "progressiveLoadStatusChanged", {
        /**
         * Raised when the progressive loading state of the series has changed.
        */
        get: function () {
            var _this = this;
            if (this._progressiveLoadStatusChanged == null) {
                this._progressiveLoadStatusChanged = new EventEmitter();
                this.i.progressiveLoadStatusChanged = delegateCombine(this.i.progressiveLoadStatusChanged, function (o, e) {
                    _this._runInZone(function () {
                        var outerArgs = new IgxProgressiveLoadStatusEventArgs();
                        outerArgs._provideImplementation(e);
                        if (_this.beforeProgressiveLoadStatusChanged) {
                            _this.beforeProgressiveLoadStatusChanged(_this, outerArgs);
                        }
                        _this._progressiveLoadStatusChanged.emit({
                            sender: _this,
                            args: outerArgs
                        });
                    });
                });
            }
            return this._progressiveLoadStatusChanged;
        },
        enumerable: false,
        configurable: true
    });
    IgxHighDensityScatterSeriesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxHighDensityScatterSeriesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    IgxHighDensityScatterSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: IgxHighDensityScatterSeriesComponent, selector: "igx-high-density-scatter-series", inputs: { xAxis: "xAxis", yAxis: "yAxis", xMemberPath: "xMemberPath", xMemberAsLegendLabel: "xMemberAsLegendLabel", yMemberAsLegendLabel: "yMemberAsLegendLabel", xMemberAsLegendUnit: "xMemberAsLegendUnit", yMemberAsLegendUnit: "yMemberAsLegendUnit", yMemberPath: "yMemberPath", useBruteForce: "useBruteForce", progressiveLoad: "progressiveLoad", heatMinimum: "heatMinimum", heatMaximum: "heatMaximum", heatMinimumColor: "heatMinimumColor", heatMaximumColor: "heatMaximumColor", pointExtent: "pointExtent", progressiveStatus: "progressiveStatus" }, outputs: { progressiveLoadStatusChanged: "progressiveLoadStatusChanged" }, providers: [{ provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxHighDensityScatterSeriesComponent; }) }], usesInheritance: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
    return IgxHighDensityScatterSeriesComponent;
}(IgxSeriesComponent));
export { IgxHighDensityScatterSeriesComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxHighDensityScatterSeriesComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'igx-high-density-scatter-series',
                    template: "",
                    providers: [{ provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxHighDensityScatterSeriesComponent; }) }],
                    changeDetection: ChangeDetectionStrategy.OnPush
                }]
        }], ctorParameters: function () { return []; }, propDecorators: { xAxis: [{
                type: Input
            }], yAxis: [{
                type: Input
            }], xMemberPath: [{
                type: Input
            }], xMemberAsLegendLabel: [{
                type: Input
            }], yMemberAsLegendLabel: [{
                type: Input
            }], xMemberAsLegendUnit: [{
                type: Input
            }], yMemberAsLegendUnit: [{
                type: Input
            }], yMemberPath: [{
                type: Input
            }], useBruteForce: [{
                type: Input
            }], progressiveLoad: [{
                type: Input
            }], heatMinimum: [{
                type: Input
            }], heatMaximum: [{
                type: Input
            }], heatMinimumColor: [{
                type: Input
            }], heatMaximumColor: [{
                type: Input
            }], pointExtent: [{
                type: Input
            }], progressiveStatus: [{
                type: Input
            }], progressiveLoadStatusChanged: [{
                type: Output
            }] } });
