import * as tslib_1 from "tslib";
import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core';
import { IgxStrategyBasedIndicatorComponent } from "./igx-strategy-based-indicator-component";
import { IgxFinancialIndicatorComponent } from "./igx-financial-indicator-component";
import { IgxFinancialSeriesComponent } from "./igx-financial-series-component";
import { IgxSeriesComponent } from "./igx-series-component";
import { WilliamsPercentRIndicator } from "./WilliamsPercentRIndicator";
/**
 * Represents a IgxDataChartComponent Williams %R indicator series.
 * Default required members: High, Low, Close
*
* The `IgxWilliamsPercentRIndicatorComponent` scale ranges from 0 to -100. It is useful for identifying overbought and oversold securities.
* The `IgxWilliamsPercentRIndicatorComponent` is calculated by dividing the difference between the highest high for the period and the current close by the highest high minus the lowest low for the period.
*
* ```html
* <igx-data-chart
*     [dataSource]="data" >
*     <igx-category-x-axis #xAxis
*         label="label">
*     </igx-category-x-axis>
*     <igx-numeric-y-axis #yAxis>
*     </igx-numeric-y-axis>
*     <igx-williams-percent-r-indicator
*         [xAxis]="xAxis"
*         [yAxis]="yAxis"
*         openMemberPath="open"
*         highMemberPath="high"
*         lowMemberPath="low"
*         closeMemberPath="close">
*     </igx-williams-percent-r-indicator>
* </igx-data-chart>
* ```
*
* ```ts
* let series = new IgxWilliamsPercentRIndicatorComponent();
* 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 IgxWilliamsPercentRIndicatorComponent_PROVIDERS = [{ provide: IgxStrategyBasedIndicatorComponent, useExisting: forwardRef(function () { return IgxWilliamsPercentRIndicatorComponent; }) }, { provide: IgxFinancialIndicatorComponent, useExisting: forwardRef(function () { return IgxWilliamsPercentRIndicatorComponent; }) }, { provide: IgxFinancialSeriesComponent, useExisting: forwardRef(function () { return IgxWilliamsPercentRIndicatorComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxWilliamsPercentRIndicatorComponent; }) }];
var IgxWilliamsPercentRIndicatorComponent = /** @class */ (function (_super) {
    tslib_1.__extends(IgxWilliamsPercentRIndicatorComponent, _super);
    function IgxWilliamsPercentRIndicatorComponent() {
        return _super.call(this) || this;
    }
    IgxWilliamsPercentRIndicatorComponent_1 = IgxWilliamsPercentRIndicatorComponent;
    IgxWilliamsPercentRIndicatorComponent.prototype.createImplementation = function () {
        return new WilliamsPercentRIndicator();
    };
    Object.defineProperty(IgxWilliamsPercentRIndicatorComponent.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxWilliamsPercentRIndicatorComponent.prototype, "period", {
        /**
         * Gets or sets the moving average period for the current StandardDeviationIndicator object.
         * The typical, and initial, value for Williams %R periods is 14.
        *
        * Gets or sets the `period` for the moving average period.
        *
        * The typical, and initial, value for Williams %R periods is 14.
        *
        * ```html
        * <igx-data-chart
        *     [dataSource]="data" >
        *     <igx-category-x-axis #xAxis
        *         label="label">
        *     </igx-category-x-axis>
        *     <igx-numeric-y-axis #yAxis>
        *     </igx-numeric-y-axis>
        *     <igx-williams-percent-r-indicator
        *         #series
        *         [xAxis]="xAxis"
        *         [yAxis]="yAxis"
        *         openMemberPath="open"
        *         highMemberPath="high"
        *         lowMemberPath="low"
        *         closeMemberPath="close"
        *         period="30">
        *     </igx-williams-percent-r-indicator>
        * </igx-data-chart>
        * ```
        *
        * ```ts
        * this.series.period = 30;
        * ```
        */
        get: function () {
            return this.i.qx;
        },
        set: function (v) {
            this.i.qx = +v;
        },
        enumerable: true,
        configurable: true
    });
    var IgxWilliamsPercentRIndicatorComponent_1;
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxWilliamsPercentRIndicatorComponent.prototype, "period", null);
    IgxWilliamsPercentRIndicatorComponent = IgxWilliamsPercentRIndicatorComponent_1 = tslib_1.__decorate([
        Component({
            selector: 'igx-williams-percent-r-indicator',
            template: "",
            providers: [{ provide: IgxStrategyBasedIndicatorComponent, useExisting: forwardRef(function () { return IgxWilliamsPercentRIndicatorComponent_1; }) }, { provide: IgxFinancialIndicatorComponent, useExisting: forwardRef(function () { return IgxWilliamsPercentRIndicatorComponent_1; }) }, { provide: IgxFinancialSeriesComponent, useExisting: forwardRef(function () { return IgxWilliamsPercentRIndicatorComponent_1; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxWilliamsPercentRIndicatorComponent_1; }) }],
            changeDetection: ChangeDetectionStrategy.OnPush
        }),
        tslib_1.__metadata("design:paramtypes", [])
    ], IgxWilliamsPercentRIndicatorComponent);
    return IgxWilliamsPercentRIndicatorComponent;
}(IgxStrategyBasedIndicatorComponent));
export { IgxWilliamsPercentRIndicatorComponent };
//# sourceMappingURL=igx-williams-percent-r-indicator-component.js.map