import { __extends } from "tslib";
import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core';
import { IgxSeriesComponent } from "./igx-series-component";
import { CategoryItemHighlightType_$type } from "./CategoryItemHighlightType";
import { MarkerType_$type } from "./MarkerType";
import { IgxAnnotationLayerComponent } from "./igx-annotation-layer-component";
import { CategoryItemHighlightLayer } from "./CategoryItemHighlightLayer";
import { ensureBool, ensureEnum, brushToString, stringToBrush } from "igniteui-angular-core";
import * as i0 from "@angular/core";
/**
 * Represents an annotation layer that highlights items in a series that use a category axis
 * either by drawing a banded shape at their position, or by rendering a marker at their position.
 * Depending on the type of series, the default highlight will be affected. To override
 * the type of highlight used, you can set the HighlightType property.
*/
var IgxCategoryItemHighlightLayerComponent = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(IgxCategoryItemHighlightLayerComponent, _super);
    function IgxCategoryItemHighlightLayerComponent() {
        return _super.call(this) || this;
    }
    IgxCategoryItemHighlightLayerComponent.prototype.createImplementation = function () {
        return new CategoryItemHighlightLayer();
    };
    Object.defineProperty(IgxCategoryItemHighlightLayerComponent.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxCategoryItemHighlightLayerComponent.prototype, "isAnnotationHoverLayer", {
        /**
         * Gets whether the series is an annotation layer displayed only when hovering over the chart.
        */
        get: function () {
            return this.i.db;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxCategoryItemHighlightLayerComponent.prototype, "targetSeries", {
        /**
         * Gets or sets the series to target this annotation to. If null, this annotation targets all series simultaneously.
        */
        get: function () {
            if (this.i.rb == null) {
                return null;
            }
            if (!this.i.rb.externalObject) {
                var e = IgxSeriesComponent._createFromInternal(this.i.rb);
                if (e) {
                    e._implementation = this.i.rb;
                }
                this.i.rb.externalObject = e;
            }
            return this.i.rb.externalObject;
        },
        set: function (v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.rb = null : this.i.rb = v.i;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxCategoryItemHighlightLayerComponent.prototype, "targetSeriesName", {
        /**
         * Gets or sets the name of the series to target this annotation to. If null, this annotation targets all series simultaneously.
        */
        get: function () {
            return this.i.rp;
        },
        set: function (v) {
            this.i.rp = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxCategoryItemHighlightLayerComponent.prototype, "useInterpolation", {
        /**
         * Gets or sets whether to use value interpolation when drawing a line through the best value for the pointer position.
        */
        get: function () {
            return this.i.rf;
        },
        set: function (v) {
            this.i.rf = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxCategoryItemHighlightLayerComponent.prototype, "highlightType", {
        /**
         * Gets or sets which type of highlight shape to use when highlighting items.
        */
        get: function () {
            return this.i.q8;
        },
        set: function (v) {
            this.i.q8 = ensureEnum(CategoryItemHighlightType_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxCategoryItemHighlightLayerComponent.prototype, "markerType", {
        /**
         * Gets or sets which type of marker to use when highlighting items, if appropriate.
        */
        get: function () {
            return this.i.ra;
        },
        set: function (v) {
            this.i.ra = ensureEnum(MarkerType_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxCategoryItemHighlightLayerComponent.prototype, "markerBrush", {
        /**
         * Gets or sets which color to use for the marker when highlighting items, if appropriate.
        */
        get: function () {
            return brushToString(this.i.r9);
        },
        set: function (v) {
            this.i.r9 = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxCategoryItemHighlightLayerComponent.prototype, "markerOutline", {
        /**
         * Gets or sets which outline color to use for the marker when highlighting items, if appropriate.
        */
        get: function () {
            return brushToString(this.i.sa);
        },
        set: function (v) {
            this.i.sa = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxCategoryItemHighlightLayerComponent.prototype, "markerTemplate", {
        /**
         * Gets or sets the template to use for marker visuals for the current series object.
        */
        get: function () {
            return this.i.ry;
        },
        set: function (v) {
            this.i.ry = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxCategoryItemHighlightLayerComponent.prototype, "bandHighlightWidth", {
        /**
         * Gets or sets the width to use for the highlight region if highlighting items in a grid aligned series (line, spline, etc), with a banded shape.
        */
        get: function () {
            return this.i.rh;
        },
        set: function (v) {
            this.i.rh = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxCategoryItemHighlightLayerComponent.prototype, "skipUnknownValues", {
        /**
         * Gets or sets whether to skip unknown values when searching for series values.
        */
        get: function () {
            return this.i.re;
        },
        set: function (v) {
            this.i.re = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    IgxCategoryItemHighlightLayerComponent.prototype.findByName = function (name) {
        var baseResult = _super.prototype.findByName.call(this, name);
        if (baseResult) {
            return baseResult;
        }
        if (this.targetSeries && this.targetSeries.name && this.targetSeries.name == name) {
            return this.targetSeries;
        }
        return null;
    };
    IgxCategoryItemHighlightLayerComponent.prototype._styling = function (container, component, parent) {
        _super.prototype._styling.call(this, container, component, parent);
        this._inStyling = true;
        if (this.targetSeries && this.targetSeries._styling) {
            this.targetSeries._styling(container, component, this);
        }
        this._inStyling = false;
    };
    IgxCategoryItemHighlightLayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxCategoryItemHighlightLayerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    IgxCategoryItemHighlightLayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: IgxCategoryItemHighlightLayerComponent, selector: "igx-category-item-highlight-layer", inputs: { targetSeries: "targetSeries", targetSeriesName: "targetSeriesName", useInterpolation: "useInterpolation", highlightType: "highlightType", markerType: "markerType", markerBrush: "markerBrush", markerOutline: "markerOutline", markerTemplate: "markerTemplate", bandHighlightWidth: "bandHighlightWidth", skipUnknownValues: "skipUnknownValues" }, providers: [{ provide: IgxAnnotationLayerComponent, useExisting: forwardRef(function () { return IgxCategoryItemHighlightLayerComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxCategoryItemHighlightLayerComponent; }) }], usesInheritance: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
    return IgxCategoryItemHighlightLayerComponent;
}(IgxAnnotationLayerComponent));
export { IgxCategoryItemHighlightLayerComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxCategoryItemHighlightLayerComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'igx-category-item-highlight-layer',
                    template: "",
                    providers: [{ provide: IgxAnnotationLayerComponent, useExisting: forwardRef(function () { return IgxCategoryItemHighlightLayerComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxCategoryItemHighlightLayerComponent; }) }],
                    changeDetection: ChangeDetectionStrategy.OnPush
                }]
        }], ctorParameters: function () { return []; }, propDecorators: { targetSeries: [{
                type: Input
            }], targetSeriesName: [{
                type: Input
            }], useInterpolation: [{
                type: Input
            }], highlightType: [{
                type: Input
            }], markerType: [{
                type: Input
            }], markerBrush: [{
                type: Input
            }], markerOutline: [{
                type: Input
            }], markerTemplate: [{
                type: Input
            }], bandHighlightWidth: [{
                type: Input
            }], skipUnknownValues: [{
                type: Input
            }] } });
