import { IndicatorDisplayType_$type } from "./IndicatorDisplayType";
import { TrendLineType_$type } from "igniteui-react-core/ES2015/TrendLineType";
import { IgrFinancialSeries } from "./igr-financial-series";
import { ensureEnum, brushToString, stringToBrush, toPoint, fromRect } from "igniteui-react-core/ES2015/componentUtil";
/**
 * Represents the base functionality for a IgxDataChartComponent financial indicator series.
*/
export class IgrFinancialIndicator extends IgrFinancialSeries {
    constructor(props) {
        super(props);
    }
    get i() {
        return this._implementation;
    }
    /**
     * Gets or sets the display for the current FinancialIndicator object.
    */
    get displayType() {
        return this.i.o8;
    }
    set displayType(v) {
        this.i.o8 = ensureEnum(IndicatorDisplayType_$type, v);
    }
    /**
     * Gets or sets the number of values to hide at the beginning of the indicator.
    */
    get ignoreFirst() {
        return this.i.pe;
    }
    set ignoreFirst(v) {
        this.i.pe = +v;
    }
    /**
     * Gets or sets the trend type for the current indicator series.
    */
    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.
    */
    get trendLineBrush() {
        return brushToString(this.i.trendLineBrush);
    }
    set trendLineBrush(v) {
        this.i.trendLineBrush = stringToBrush(v);
    }
    /**
     * Gets the effective TrendLineBrush for this indicator.
    */
    get actualTrendLineBrush() {
        return brushToString(this.i.pw);
    }
    /**
     * Gets or sets the thickness of the current indicator object's trend line.
    */
    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.
    */
    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
    */
    getSeriesValueBoundingBox(world) {
        let iv = this.i.li(toPoint(world));
        return fromRect(iv);
    }
    getSeriesValue(world, useInterpolation, skipUnknowns) {
        let iv = this.i.eh(toPoint(world), useInterpolation, skipUnknowns);
        return (iv);
    }
    getPreviousOrExactIndex(world, skipUnknowns) {
        let iv = this.i.e8(toPoint(world), skipUnknowns);
        return (iv);
    }
    getNextOrExactIndex(world, skipUnknowns) {
        let iv = this.i.e6(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.
    */
    scrollIntoView(item) {
        let iv = this.i.c6(item);
        return (iv);
    }
}
