import * as tslib_1 from "tslib";
import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core';
import { IgxFinancialOverlayComponent } from "./igx-financial-overlay-component";
import { IgxFinancialSeriesComponent } from "./igx-financial-series-component";
import { IgxSeriesComponent } from "./igx-series-component";
import { BollingerBandsOverlay } from "./BollingerBandsOverlay";
import { toPoint } from "igniteui-angular-core";
/**
 * Represents a IgxDataChartComponent Bollinger Bands financial overlay series.
 * Default required members: High, Low, Close
*
* You can use the `IgxBollingerBandsOverlayComponent` class represents a IgxDataChartComponent Bollinger Bands financial overlay series.
*
* ```html
* <igx-data-chart
* 	#chart
*     [dataSource]="data" >
*     <igx-category-x-axis
* 		label="label"
* 		#xAxis>
*     </igx-category-x-axis>
*     <igx-numeric-y-axis
* 		#yAxis>
*     </igx-numeric-y-axis>
*     <igx-bollinger-band-overlay
* 		[xAxis]="xAxis"
* 		[yAxis]="yAxis"
* 		openMemberPath="open"
* 		highMemberPath="high"
* 		lowMemberPath="low"
* 		closeMemberPath="close">
*     </igx-bollinger-band-overlay>
* </igx-data-chart>
* ```
*
* ```ts
* let series = new IgxBollingerBandOverlayComponent();
* series.xAxis = this.xAxis;
* series.yAxis = this.yAxis;
* series.openMemberPath = "open";
* series.highMemberPath = "high";
* series.lowMemberPath = "low";
* series.closeMemberPath = "close";
* this.chart.series.add(series);
* ```
*/
export var IgxBollingerBandsOverlayComponent_PROVIDERS = [{ provide: IgxFinancialOverlayComponent, useExisting: forwardRef(function () { return IgxBollingerBandsOverlayComponent; }) }, { provide: IgxFinancialSeriesComponent, useExisting: forwardRef(function () { return IgxBollingerBandsOverlayComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxBollingerBandsOverlayComponent; }) }];
var IgxBollingerBandsOverlayComponent = /** @class */ (function (_super) {
    tslib_1.__extends(IgxBollingerBandsOverlayComponent, _super);
    function IgxBollingerBandsOverlayComponent() {
        return _super.call(this) || this;
    }
    IgxBollingerBandsOverlayComponent_1 = IgxBollingerBandsOverlayComponent;
    IgxBollingerBandsOverlayComponent.prototype.createImplementation = function () {
        return new BollingerBandsOverlay();
    };
    Object.defineProperty(IgxBollingerBandsOverlayComponent.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxBollingerBandsOverlayComponent.prototype, "period", {
        /**
         * Gets or sets the moving average period for the current BollingerBandOverlay object.
         * The typical, and initial, value for Bollinger band periods is 14.
        *
        * You can use the `period` property for moving average of the current BollingerBandOverlay object.
        *
        * ```html
        * <igx-data-chart
        * 	#chart
        *     [dataSource]="data" >
        *     <igx-category-x-axis
        * 		label="label"
        * 		#xAxis>
        *     </igx-category-x-axis>
        *     <igx-numeric-y-axis
        * 		#yAxis>
        *     </igx-numeric-y-axis>
        *     <igx-bollinger-band-overlay
        * 		[xAxis]="xAxis"
        * 		[yAxis]="yAxis"
        * 		openMemberPath="open"
        * 		highMemberPath="high"
        * 		lowMemberPath="low"
        * 		closeMemberPath="close"
        * 		period="7">
        *     </igx-bollinger-band-overlay>
        * </igx-data-chart>
        * ```
        *
        * ```ts
        * this.series.period = 7;
        * ```
        */
        get: function () {
            return this.i.pt;
        },
        set: function (v) {
            this.i.pt = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxBollingerBandsOverlayComponent.prototype, "multiplier", {
        /**
         * Gets or sets the moving average period for the current BollingerBandOverlay object.
         * The typical, and initial, value for Bollinger band multipliers is 2.
        *
        * You can use the `IgxBollingerBandsOverlayComponent`
        */
        get: function () {
            return this.i.ps;
        },
        set: function (v) {
            this.i.ps = +v;
        },
        enumerable: true,
        configurable: true
    });
    IgxBollingerBandsOverlayComponent.prototype.getSeriesValue = function (world, useInterpolation, skipUnknowns) {
        var iv = this.i.en(toPoint(world), useInterpolation, skipUnknowns);
        return (iv);
    };
    IgxBollingerBandsOverlayComponent.prototype.getPreviousOrExactIndex = function (world, skipUnknowns) {
        var iv = this.i.fe(toPoint(world), skipUnknowns);
        return (iv);
    };
    IgxBollingerBandsOverlayComponent.prototype.getNextOrExactIndex = function (world, skipUnknowns) {
        var iv = this.i.fc(toPoint(world), skipUnknowns);
        return (iv);
    };
    var IgxBollingerBandsOverlayComponent_1;
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxBollingerBandsOverlayComponent.prototype, "period", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxBollingerBandsOverlayComponent.prototype, "multiplier", null);
    IgxBollingerBandsOverlayComponent = IgxBollingerBandsOverlayComponent_1 = tslib_1.__decorate([
        Component({
            selector: 'igx-bollinger-bands-overlay',
            template: "",
            providers: [{ provide: IgxFinancialOverlayComponent, useExisting: forwardRef(function () { return IgxBollingerBandsOverlayComponent_1; }) }, { provide: IgxFinancialSeriesComponent, useExisting: forwardRef(function () { return IgxBollingerBandsOverlayComponent_1; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxBollingerBandsOverlayComponent_1; }) }],
            changeDetection: ChangeDetectionStrategy.OnPush
        }),
        tslib_1.__metadata("design:paramtypes", [])
    ], IgxBollingerBandsOverlayComponent);
    return IgxBollingerBandsOverlayComponent;
}(IgxFinancialOverlayComponent));
export { IgxBollingerBandsOverlayComponent };
//# sourceMappingURL=igx-bollinger-bands-overlay-component.js.map