import * as tslib_1 from "tslib";
import { TrendLineType_$type } from "igniteui-react-core/ES5/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/ES5/componentUtil";
/**
 * Represents a IgxDataChartComponent financial price series that renders as Candlestick or OHLC representations.
 * Default required members: Open, Low, High, Close
*/
var IgrFinancialPriceSeries = /** @class */ (function (_super) {
    tslib_1.__extends(IgrFinancialPriceSeries, _super);
    function IgrFinancialPriceSeries(props) {
        return _super.call(this, props) || this;
    }
    IgrFinancialPriceSeries.prototype.createImplementation = function () {
        return new FinancialPriceSeries();
    };
    Object.defineProperty(IgrFinancialPriceSeries.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrFinancialPriceSeries.prototype, "trendLineType", {
        /**
         * Gets or sets the trend type for the current financial series.
        */
        get: function () {
            return this.i.trendLineType;
        },
        set: function (v) {
            this.i.trendLineType = ensureEnum(TrendLineType_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrFinancialPriceSeries.prototype, "trendLineBrush", {
        /**
         * Gets or sets the brush to use to draw the trend line.
        */
        get: function () {
            return brushToString(this.i.trendLineBrush);
        },
        set: function (v) {
            this.i.trendLineBrush = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrFinancialPriceSeries.prototype, "actualTrendLineBrush", {
        /**
         * Gets the effective TrendLineBrush for this FinancialPriceSeries.
        */
        get: function () {
            return brushToString(this.i.pr);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrFinancialPriceSeries.prototype, "trendLineThickness", {
        /**
         * Gets or sets the thickness of the current FinancialPriceSeries object's trend line.
        */
        get: function () {
            return this.i.trendLineThickness;
        },
        set: function (v) {
            this.i.trendLineThickness = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrFinancialPriceSeries.prototype, "trendLinePeriod", {
        /**
         * Gets or sets the trend line period for the current series.
         * The typical, and initial, value for trend line period is 7.
        */
        get: function () {
            return this.i.trendLinePeriod;
        },
        set: function (v) {
            this.i.trendLinePeriod = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrFinancialPriceSeries.prototype, "displayType", {
        /**
         * Gets or sets the display type for the current FinancialPriceSeries object.
        */
        get: function () {
            return this.i.o8;
        },
        set: function (v) {
            this.i.o8 = ensureEnum(PriceDisplayType_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrFinancialPriceSeries.prototype, "negativeOutline", {
        /**
         * Brush to use for outlining negative elements in the series.
        */
        get: function () {
            return brushToString(this.i.ps);
        },
        set: function (v) {
            this.i.ps = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    /**
     * 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
    */
    IgrFinancialPriceSeries.prototype.getSeriesValueBoundingBox = function (world) {
        var 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.
    */
    IgrFinancialPriceSeries.prototype.scrollIntoView = function (item) {
        var 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.
    
    */
    IgrFinancialPriceSeries.prototype.getItemSpan = function () {
        var iv = this.i.eb();
        return (iv);
    };
    IgrFinancialPriceSeries.prototype.setNegativeColors = function (negativeBrush, negativeOutline) {
        this.i.i6(stringToBrush(negativeBrush), stringToBrush(negativeOutline));
    };
    return IgrFinancialPriceSeries;
}(IgrFinancialSeries));
export { IgrFinancialPriceSeries };
