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.
*/
export let IgxHighDensityScatterSeriesComponent = /*@__PURE__*/ (() => {
    class IgxHighDensityScatterSeriesComponent extends IgxSeriesComponent {
        constructor() {
            super();
            this._progressiveLoadStatusChanged = null;
        }
        createImplementation() {
            return new HighDensityScatterSeries();
        }
        /**
                                     * @hidden
                                     */
        get i() {
            return this._implementation;
        }
        /**
         * Gets whether the current series shows pixels.
        */
        get isPixel() {
            return this.i.d8;
        }
        /**
         * Checks if this series is a scatter series
        */
        get isScatter() {
            return this.i.ef;
        }
        /**
         * Gets or sets the effective x-axis for the current object.
        */
        get xAxis() {
            const r = this.i.qj;
            if (r == null) {
                return null;
            }
            if (!r.externalObject) {
                let e = IgxNumericXAxisComponent._createFromInternal(r);
                if (e) {
                    e._implementation = r;
                }
                r.externalObject = e;
            }
            return r.externalObject;
        }
        set xAxis(v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.qj = null : this.i.qj = v.i;
        }
        /**
         * Gets or sets the effective y-axis for the current object.
        */
        get yAxis() {
            const r = this.i.ql;
            if (r == null) {
                return null;
            }
            if (!r.externalObject) {
                let e = IgxNumericYAxisComponent._createFromInternal(r);
                if (e) {
                    e._implementation = r;
                }
                r.externalObject = e;
            }
            return r.externalObject;
        }
        set yAxis(v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.ql = null : this.i.ql = v.i;
        }
        /**
         * Gets or sets the x value mapping property for the current series object.
        */
        get xMemberPath() {
            return this.i.sm;
        }
        set xMemberPath(v) {
            this.i.sm = v;
        }
        /**
         * Gets or sets the label displayed before series X value in the Data Legend.
        */
        get xMemberAsLegendLabel() {
            return this.i.si;
        }
        set xMemberAsLegendLabel(v) {
            this.i.si = v;
        }
        /**
         * Gets or sets the label displayed before series Y value in the Data Legend.
        */
        get yMemberAsLegendLabel() {
            return this.i.sq;
        }
        set yMemberAsLegendLabel(v) {
            this.i.sq = v;
        }
        /**
         * Gets or sets the unit after displayed after series X value in the Data Legend.
        */
        get xMemberAsLegendUnit() {
            return this.i.sk;
        }
        set xMemberAsLegendUnit(v) {
            this.i.sk = v;
        }
        /**
         * Gets or sets the unit after displayed after series Y value in the Data Legend.
        */
        get yMemberAsLegendUnit() {
            return this.i.ss;
        }
        set yMemberAsLegendUnit(v) {
            this.i.ss = v;
        }
        /**
         * Gets or sets the y value mapping property for the current series object.
        */
        get yMemberPath() {
            return this.i.su;
        }
        set yMemberPath(v) {
            this.i.su = v;
        }
        /**
         * Gets or sets the whether to use use brute force mode.
        */
        get useBruteForce() {
            return this.i.qz;
        }
        set useBruteForce(v) {
            this.i.qz = ensureBool(v);
        }
        /**
         * Gets or sets the whether to progressively load the data into the chart.
        */
        get progressiveLoad() {
            return this.i.qy;
        }
        set progressiveLoad(v) {
            this.i.qy = ensureBool(v);
        }
        /**
         * Gets or sets the density value that maps to the minimum heat color.
        */
        get heatMinimum() {
            return this.i.ru;
        }
        set heatMinimum(v) {
            this.i.ru = +v;
        }
        /**
         * Gets or sets the value that maps to the maximum heat color.
        */
        get heatMaximum() {
            return this.i.rt;
        }
        set heatMaximum(v) {
            this.i.rt = +v;
        }
        /**
         * Gets or sets the color to use for the minimum end of the scale.
        */
        get heatMinimumColor() {
            return colorToString(this.i.ts);
        }
        set heatMinimumColor(v) {
            this.i.ts = stringToColor(v);
        }
        /**
         * Gets or sets the color to use for the maximum end of the scale.
        */
        get heatMaximumColor() {
            return colorToString(this.i.tr);
        }
        set heatMaximumColor(v) {
            this.i.tr = stringToColor(v);
        }
        /**
         * Gets or sets the the pixel extent of the square data points that are rendered.
        */
        get pointExtent() {
            return this.i.r6;
        }
        set pointExtent(v) {
            this.i.r6 = +v;
        }
        /**
         * Represents the current status of the progressive load of the series. It will range from 0 to 100, where 100 is fully loaded.
        */
        get progressiveStatus() {
            return this.i.r7;
        }
        set progressiveStatus(v) {
            this.i.r7 = +v;
        }
        findByName(name) {
            var baseResult = super.findByName(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;
        }
        _styling(container, component, parent) {
            super._styling(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;
        }
        getItemValue(item, memberPathName) {
            let iv = this.i.h1(item, memberPathName);
            return (iv);
        }
        /**
         * Determine if object can be used as YAxis
        
        * @param axis  * The object to check
        */
        canUseAsYAxis(axis) {
            let iv = this.i.qx(axis);
            return (iv);
        }
        /**
         * Determine if object can be used as XAxis
        
        * @param axis  * The object to check
        */
        canUseAsXAxis(axis) {
            let iv = this.i.qw(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.
        */
        scrollIntoView(item) {
            let iv = this.i.eq(item);
            return (iv);
        }
        /**
         * Gets the item that is the best match for the specified world coordinates.
        
        * @param world  * The world coordinates to use.
        */
        getItem(world) {
            let iv = this.i.hy(toPoint(world));
            return (iv);
        }
        /**
         * Raised when the progressive loading state of the series has changed.
        */
        get progressiveLoadStatusChanged() {
            if (this._progressiveLoadStatusChanged == null) {
                this._progressiveLoadStatusChanged = new EventEmitter();
                this.i.progressiveLoadStatusChanged = delegateCombine(this.i.progressiveLoadStatusChanged, (o, e) => {
                    this._runInZone(() => {
                        let outerArgs = new IgxProgressiveLoadStatusEventArgs();
                        outerArgs._provideImplementation(e);
                        if (this.beforeProgressiveLoadStatusChanged) {
                            this.beforeProgressiveLoadStatusChanged(this, outerArgs);
                        }
                        this._progressiveLoadStatusChanged.emit({
                            sender: this,
                            args: outerArgs
                        });
                    });
                });
            }
            return this._progressiveLoadStatusChanged;
        }
    }
    IgxHighDensityScatterSeriesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxHighDensityScatterSeriesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    IgxHighDensityScatterSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", 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(() => IgxHighDensityScatterSeriesComponent) }], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
    return IgxHighDensityScatterSeriesComponent;
})();
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxHighDensityScatterSeriesComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'igx-high-density-scatter-series',
                    template: ``,
                    providers: [{ provide: IgxSeriesComponent, useExisting: forwardRef(() => 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
            }] } });
