import { TrendLineType_$type } from "igniteui-react-core/ES2015/TrendLineType";
import { PriceDisplayType_$type } from "./PriceDisplayType";
import { IgrFinancialSeries } from "./igr-financial-series";
import { FinancialPriceSeries } from "./FinancialPriceSeries";
import { ensureEnum, brushToString, stringToBrush, toPoint, fromRect } from "igniteui-react-core/ES2015/componentUtil";
/**
 * Represents a IgxDataChartComponent financial price series that renders as Candlestick or OHLC representations.
 * Default required members: Open, Low, High, Close
*/
export class IgrFinancialPriceSeries extends IgrFinancialSeries {
    createImplementation() {
        return new FinancialPriceSeries();
    }
    get i() {
        return this._implementation;
    }
    constructor(props) {
        super(props);
    }
    /**
     * Gets or sets the trend type for the current financial 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 FinancialPriceSeries.
    */
    get actualTrendLineBrush() {
        return brushToString(this.i.pr);
    }
    /**
     * Gets or sets the thickness of the current FinancialPriceSeries 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;
    }
    /**
     * Gets or sets the display type for the current FinancialPriceSeries object.
    */
    get displayType() {
        return this.i.o8;
    }
    set displayType(v) {
        this.i.o8 = ensureEnum(PriceDisplayType_$type, v);
    }
    /**
     * Brush to use for outlining negative elements in the series.
    */
    get negativeOutline() {
        return brushToString(this.i.ps);
    }
    set negativeOutline(v) {
        this.i.ps = stringToBrush(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);
    }
    /**
     * Scrolls the series to display the item for the specified data item.
     * The categorySeries 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);
    }
    /**
     * For a category plotted series, returns the current width of the items within the categories. This only returns a value if the items have some form of width (e.g. columns, bars, etc.) otherwise 0 is returned.
    
    */
    getItemSpan() {
        let iv = this.i.eb();
        return (iv);
    }
    setNegativeColors(negativeBrush, negativeOutline) {
        this.i.i6(stringToBrush(negativeBrush), stringToBrush(negativeOutline));
    }
}
