import { __extends } from "tslib";
import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core';
import { IgxColorScaleComponent } from "./igx-color-scale-component";
import { IgxScatterTriangulationSeriesComponent } from "./igx-scatter-triangulation-series-component";
import { IgxSeriesComponent } from "./igx-series-component";
import { ScatterAreaSeries } from "./ScatterAreaSeries";
import { toPoint } from "igniteui-angular-core";
import * as i0 from "@angular/core";
/**
 * Series class which draws a colored 2D surface based on a triangulation of XY data with numeric values assigned to each point.
*/
var IgxScatterAreaSeriesComponent = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(IgxScatterAreaSeriesComponent, _super);
    function IgxScatterAreaSeriesComponent() {
        return _super.call(this) || this;
    }
    IgxScatterAreaSeriesComponent.prototype.createImplementation = function () {
        return new ScatterAreaSeries();
    };
    Object.defineProperty(IgxScatterAreaSeriesComponent.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterAreaSeriesComponent.prototype, "isArea", {
        /**
         * Gets whether the current series shows an area shape.
        */
        get: function () {
            return this.i.dd;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterAreaSeriesComponent.prototype, "colorScale", {
        /**
         * Gets or sets ColorScale used to resolve the color values of points in the series.
        */
        get: function () {
            var r = this.i.r5;
            if (r == null) {
                return null;
            }
            if (!r.externalObject) {
                var e = IgxColorScaleComponent._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.r5 = null : this.i.r5 = v.i;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterAreaSeriesComponent.prototype, "colorMemberPath", {
        /**
         * Gets or sets the name of the property on each data item containing a numeric value which can be converted to a color by the ColorScale.
        */
        get: function () {
            return this.i.sh;
        },
        set: function (v) {
            this.i.sh = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterAreaSeriesComponent.prototype, "actualColorScale", {
        /**
         * Gets actual color scale that is set on ColorScale property or default ColorScale
        */
        get: function () {
            var r = this.i.r4;
            if (r == null) {
                return null;
            }
            if (!r.externalObject) {
                var e = IgxColorScaleComponent._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.r4 = null : this.i.r4 = v.i;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterAreaSeriesComponent.prototype, "colorMemberAsLegendLabel", {
        /**
         * Gets or sets the label displayed before series color value in the Data Legend.
        */
        get: function () {
            return this.i.sd;
        },
        set: function (v) {
            this.i.sd = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterAreaSeriesComponent.prototype, "colorMemberAsLegendUnit", {
        /**
         * Gets or sets the unit displayed after series color value in the Data Legend.
        */
        get: function () {
            return this.i.sf;
        },
        set: function (v) {
            this.i.sf = v;
        },
        enumerable: false,
        configurable: true
    });
    IgxScatterAreaSeriesComponent.prototype.findByName = function (name) {
        var baseResult = _super.prototype.findByName.call(this, name);
        if (baseResult) {
            return baseResult;
        }
        if (this.colorScale && this.colorScale.name && this.colorScale.name == name) {
            return this.colorScale;
        }
        if (this.actualColorScale && this.actualColorScale.name && this.actualColorScale.name == name) {
            return this.actualColorScale;
        }
        return null;
    };
    IgxScatterAreaSeriesComponent.prototype._styling = function (container, component, parent) {
        _super.prototype._styling.call(this, container, component, parent);
        this._inStyling = true;
        if (this.colorScale && this.colorScale._styling) {
            this.colorScale._styling(container, component, this);
        }
        if (this.actualColorScale && this.actualColorScale._styling) {
            this.actualColorScale._styling(container, component, this);
        }
        this._inStyling = false;
    };
    IgxScatterAreaSeriesComponent.prototype.getItemValue = function (item, memberPathName) {
        var iv = this.i.hy(item, memberPathName);
        return (iv);
    };
    /**
     * Gets the item that is the best match for the specified world coordinates.
    
    * @param world  * The world coordinates to use.
    */
    IgxScatterAreaSeriesComponent.prototype.getItem = function (world) {
        var iv = this.i.hv(toPoint(world));
        return (iv);
    };
    /**
     * Updates ActualColorScale properties when the ColorScale property has changed
    
    */
    IgxScatterAreaSeriesComponent.prototype.updateActualColorScale = function () {
        this.i.so();
    };
    /**
     * Attaches an image to the view of this series
    
    */
    IgxScatterAreaSeriesComponent.prototype.attachImage = function (image) {
        this.i.sl(image);
    };
    IgxScatterAreaSeriesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxScatterAreaSeriesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    IgxScatterAreaSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: IgxScatterAreaSeriesComponent, selector: "igx-scatter-area-series", inputs: { colorScale: "colorScale", colorMemberPath: "colorMemberPath", actualColorScale: "actualColorScale", colorMemberAsLegendLabel: "colorMemberAsLegendLabel", colorMemberAsLegendUnit: "colorMemberAsLegendUnit" }, providers: [{ provide: IgxScatterTriangulationSeriesComponent, useExisting: forwardRef(function () { return IgxScatterAreaSeriesComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxScatterAreaSeriesComponent; }) }], usesInheritance: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
    return IgxScatterAreaSeriesComponent;
}(IgxScatterTriangulationSeriesComponent));
export { IgxScatterAreaSeriesComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxScatterAreaSeriesComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'igx-scatter-area-series',
                    template: "",
                    providers: [{ provide: IgxScatterTriangulationSeriesComponent, useExisting: forwardRef(function () { return IgxScatterAreaSeriesComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxScatterAreaSeriesComponent; }) }],
                    changeDetection: ChangeDetectionStrategy.OnPush
                }]
        }], ctorParameters: function () { return []; }, propDecorators: { colorScale: [{
                type: Input
            }], colorMemberPath: [{
                type: Input
            }], actualColorScale: [{
                type: Input
            }], colorMemberAsLegendLabel: [{
                type: Input
            }], colorMemberAsLegendUnit: [{
                type: Input
            }] } });
