import { Component, Input } from '@angular/core';
import { IndicatorDisplayType_$type } from "./IndicatorDisplayType";
import { TrendLineType_$type } from "igniteui-angular-core";
import { IgxFinancialSeriesComponent } from "./igx-financial-series-component";
import { ensureEnum, brushToString, stringToBrush, toPoint, fromRect } from "igniteui-angular-core";
import * as i0 from "@angular/core";
/**
 * Represents the base functionality for a IgxDataChartComponent financial indicator series.
*
* The `FinancialIndicator` class represents the base functionality for a IgxDataChartComponent financial indicator series.
*
* ```html
* <igx-data-chart  #chart
*     [dataSource]="data" >
* <igx-ordinal-time-x-axis
*     label="label"
*     #xAxis>
*     </igx-ordinal-time-x-axis>
*  <igx-numeric-y-axis
*     minimumValue="0"
*     #yAxis>
*     </igx-numeric-y-axis>
* <igx-mass-index-indicator
* [xAxis]="xAxis"
*     [yAxis]="yAxis"
*     openMemberPath="open"
*     highMemberPath="high"
*     lowMemberPath="low"
*     closeMemberPath="close"
*     volumeMemberPath="volume"   >
*     </igx-mass-index-indicator >
* </igx-data-chart>
* ```
*
* ```ts
* let series = new IgxMassIndexIndicatorComponent();
*    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 let IgxFinancialIndicatorComponent = /*@__PURE__*/ (() => {
    class IgxFinancialIndicatorComponent extends IgxFinancialSeriesComponent {
        constructor() {
            super();
        }
        /**
                                     * @hidden
                                     */
        get i() {
            return this._implementation;
        }
        /**
         * Gets whether the series is financial indicator
        */
        get isFinancialIndicator() {
            return this.i.dr;
        }
        /**
         * Gets or sets the display for the current FinancialIndicator object.
        *
        * The `DisplayType` property is used to display the current FinancialIndicator object.
        *
        * ```ts
        * series.displayType= IndicatorDisplayType.Column;
        * ```
        *
        * ```html
        * <igx-data-chart  #chart
        *     [dataSource]="data" >
        * <igx-ordinal-time-x-axis
        *     label="label"
        *     #xAxis>
        *     </igx-ordinal-time-x-axis>
        *  <igx-numeric-y-axis
        *     minimumValue="0"
        *     #yAxis>
        *     </igx-numeric-y-axis>
        * <igx-mass-index-indicator
        * [xAxis]="xAxis"
        *     [yAxis]="yAxis"
        *     openMemberPath="open"
        *     highMemberPath="high"
        *     lowMemberPath="low"
        *     closeMemberPath="close"
        *     volumeMemberPath="volume"
        * 	displayType="Column"   >
        *     </igx-mass-index-indicator >
        * </igx-data-chart>
        * ```
        */
        get displayType() {
            return this.i.tt;
        }
        set displayType(v) {
            this.i.tt = ensureEnum(IndicatorDisplayType_$type, v);
        }
        /**
         * Gets default display type for the current Financial Indicator
        */
        get defaultDisplayType() {
            return this.i.ts;
        }
        /**
         * Gets or sets the number of values to hide at the beginning of the indicator.
        *
        * Use the `IgnoreFirst` propert to hide the number of values at the beginning of the indicator.
        *
        * ```html
        * <igx-data-chart  #chart
        *     [dataSource]="data" >
        * <igx-ordinal-time-x-axis
        *     label="label"
        *     #xAxis>
        *     </igx-ordinal-time-x-axis>
        *  <igx-numeric-y-axis
        *     minimumValue="0"
        *     #yAxis>
        *     </igx-numeric-y-axis>
        * <igx-mass-index-indicator
        * [xAxis]="xAxis"
        *     [yAxis]="yAxis"
        *     openMemberPath="open"
        *     highMemberPath="high"
        *     lowMemberPath="low"
        *     closeMemberPath="close"
        *     volumeMemberPath="volume"
        * 	ignoreFirst="2" >
        *     </igx-mass-index-indicator >
        * </igx-data-chart>
        * ```
        *
        * ```ts
        * series.ignoreFirst  = 2;
        * ```
        */
        get ignoreFirst() {
            return this.i.tz;
        }
        set ignoreFirst(v) {
            this.i.tz = +v;
        }
        /**
         * Gets or sets the trend type for the current indicator series.
        *
        * Use `TrendLineType` property to get the trend type for the current indicator series.
        *
        * ```html
        * <igx-data-chart
        *     [dataSource]="data" >
        *    <igx-ordinal-time-x-axis
        *     label="label"
        *     #xAxis>
        *     </igx-ordinal-time-x-axis>
        *     <igx-numeric-y-axis #yAxis>
        *     </igx-numeric-y-axis>
        *     <igx-mass-index-indicator
        *         [xAxis]="xAxis"
        *         [yAxis]="yAxis"
        *         openMemberPath="open"
        *         highMemberPath="high"
        *         lowMemberPath="low"
        *         closeMemberPath="close"
        * 		trendLineType="CubicFit">
        *     </igx-mass-index-indicator>
        * </igx-data-chart>
        * ```
        *
        * ```ts
        * series.trendLineType= TrendLineType.CubicFit;
        * ```
        */
        get trendLineType() {
            return this.i.trendLineType;
        }
        set trendLineType(v) {
            this.i.trendLineType = ensureEnum(TrendLineType_$type, v);
        }
        /**
         * Gets or sets the brush to use to draw the trend line.
        *
        * Use the `TrendLineBrush` propert to draw the trend line.
        *
        * ```html
        * <igx-data-chart  #chart
        *     [dataSource]="data" >
        * <igx-ordinal-time-x-axis
        *     label="label"
        *     #xAxis>
        *     </igx-ordinal-time-x-axis>
        *  <igx-numeric-y-axis
        *     minimumValue="0"
        *     #yAxis>
        *     </igx-numeric-y-axis>
        * <igx-mass-index-indicator
        * [xAxis]="xAxis"
        *     [yAxis]="yAxis"
        *     openMemberPath="open"
        *     highMemberPath="high"
        *     lowMemberPath="low"
        *     closeMemberPath="close"
        *     volumeMemberPath="volume"
        * 	trendLineBrush="Red">
        *     </igx-mass-index-indicator >
        * </igx-data-chart>
        * ```
        */
        get trendLineBrush() {
            return brushToString(this.i.trendLineBrush);
        }
        set trendLineBrush(v) {
            this.i.trendLineBrush = stringToBrush(v);
        }
        /**
         * Gets the effective TrendLineBrush for this indicator.
        *
        * Use the `ActualTrendLineBrush` property to Gets the effective TrendLineBrush for the FinancialIndicator.
        */
        get actualTrendLineBrush() {
            return brushToString(this.i.uh);
        }
        set actualTrendLineBrush(v) {
            this.i.uh = stringToBrush(v);
        }
        /**
         * Gets or sets the thickness of the current indicator object's trend line.
        *
        * Use `TrendLineThickness` property for the thickness of the current indicator object's trend line.
        *
        * ```html
        * <igx-data-chart  #chart
        *     [dataSource]="data" >
        * <igx-ordinal-time-x-axis
        *     label="label"
        *     #xAxis>
        *     </igx-ordinal-time-x-axis>
        *  <igx-numeric-y-axis
        *     minimumValue="0"
        *     #yAxis>
        *     </igx-numeric-y-axis>
        * <igx-mass-index-indicator
        * [xAxis]="xAxis"
        *     [yAxis]="yAxis"
        *     openMemberPath="open"
        *     highMemberPath="high"
        *     lowMemberPath="low"
        *     closeMemberPath="close"
        *     volumeMemberPath="volume"
        * 	trendLineThickness="2" >
        *     </igx-mass-index-indicator >
        * </igx-data-chart>
        * ```
        *
        * ```ts
        *  series.trendLineThickness=2 ;
        * ```
        */
        get trendLineThickness() {
            return this.i.trendLineThickness;
        }
        set trendLineThickness(v) {
            this.i.trendLineThickness = +v;
        }
        /**
         * Gets or sets the trend line period for the current series.
         * The typical, and initial, value for trend line period is 7.
        *
        * Use `TrendLinePeriod` property for the trend line period of the current series.
        *
        * ```html
        * <igx-data-chart  #chart
        *     [dataSource]="data" >
        * <igx-ordinal-time-x-axis
        *     label="label"
        *     #xAxis>
        *     </igx-ordinal-time-x-axis>
        *  <igx-numeric-y-axis
        *     minimumValue="0"
        *     #yAxis>
        *     </igx-numeric-y-axis>
        * <igx-mass-index-indicator
        * [xAxis]="xAxis"
        *     [yAxis]="yAxis"
        *     openMemberPath="open"
        *     highMemberPath="high"
        *     lowMemberPath="low"
        *     closeMemberPath="close"
        *     volumeMemberPath="volume"
        * 	trendLinePeriod="30" >
        *     </igx-mass-index-indicator >
        * </igx-data-chart>
        * ```
        *
        * ```ts
        * series.trendLinePeriod  =30;
        * ```
        */
        get trendLinePeriod() {
            return this.i.trendLinePeriod;
        }
        set trendLinePeriod(v) {
            this.i.trendLinePeriod = +v;
        }
        /**
         * If possible, will return the best available value bounding box within the series that has the best value match for the world position provided.
        
        * @param world  * The world coordinate for which to get a value bounding box for
        *
        * The `GetSeriesValueBoundingBox` method returns the best available value bounding box within the series that has the best value match for the world position provided.
        */
        getSeriesValueBoundingBox(world) {
            let iv = this.i.pz(toPoint(world));
            return fromRect(iv);
        }
        getSeriesValue(world, useInterpolation, skipUnknowns) {
            let iv = this.i.gl(toPoint(world), useInterpolation, skipUnknowns);
            return (iv);
        }
        getPreviousOrExactIndex(world, skipUnknowns) {
            let iv = this.i.hl(toPoint(world), skipUnknowns);
            return (iv);
        }
        getNextOrExactIndex(world, skipUnknowns) {
            let iv = this.i.hj(toPoint(world), skipUnknowns);
            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.
        *
        * The `ScrollIntoView` method scrolls the series to display the item for the specified data item.
        */
        scrollIntoView(item) {
            let iv = this.i.eo(item);
            return (iv);
        }
    }
    IgxFinancialIndicatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxFinancialIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    IgxFinancialIndicatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: IgxFinancialIndicatorComponent, selector: "ng-component", inputs: { displayType: "displayType", ignoreFirst: "ignoreFirst", trendLineType: "trendLineType", trendLineBrush: "trendLineBrush", actualTrendLineBrush: "actualTrendLineBrush", trendLineThickness: "trendLineThickness", trendLinePeriod: "trendLinePeriod" }, usesInheritance: true, ngImport: i0, template: ``, isInline: true });
    return IgxFinancialIndicatorComponent;
})();
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxFinancialIndicatorComponent, decorators: [{
            type: Component,
            args: [{
                    template: ``,
                }]
        }], ctorParameters: function () { return []; }, propDecorators: { displayType: [{
                type: Input
            }], ignoreFirst: [{
                type: Input
            }], trendLineType: [{
                type: Input
            }], trendLineBrush: [{
                type: Input
            }], actualTrendLineBrush: [{
                type: Input
            }], trendLineThickness: [{
                type: Input
            }], trendLinePeriod: [{
                type: Input
            }] } });
