import * as tslib_1 from "tslib";
import { IndicatorDisplayType_$type } from "./IndicatorDisplayType";
import { TrendLineType_$type } from "igniteui-react-core/ES5/TrendLineType";
import { IgrFinancialSeries } from "./igr-financial-series";
import { ensureEnum, brushToString, stringToBrush, toPoint, fromRect } from "igniteui-react-core/ES5/componentUtil";
/**
 * Represents the base functionality for a IgxDataChartComponent financial indicator series.
*/
var IgrFinancialIndicator = /** @class */ (function (_super) {
    tslib_1.__extends(IgrFinancialIndicator, _super);
    function IgrFinancialIndicator(props) {
        return _super.call(this, props) || this;
    }
    Object.defineProperty(IgrFinancialIndicator.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrFinancialIndicator.prototype, "displayType", {
        /**
         * Gets or sets the display for the current FinancialIndicator object.
        */
        get: function () {
            return this.i.o8;
        },
        set: function (v) {
            this.i.o8 = ensureEnum(IndicatorDisplayType_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrFinancialIndicator.prototype, "ignoreFirst", {
        /**
         * Gets or sets the number of values to hide at the beginning of the indicator.
        */
        get: function () {
            return this.i.pe;
        },
        set: function (v) {
            this.i.pe = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrFinancialIndicator.prototype, "trendLineType", {
        /**
         * Gets or sets the trend type for the current indicator series.
        */
        get: function () {
            return this.i.trendLineType;
        },
        set: function (v) {
            this.i.trendLineType = ensureEnum(TrendLineType_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrFinancialIndicator.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(IgrFinancialIndicator.prototype, "actualTrendLineBrush", {
        /**
         * Gets the effective TrendLineBrush for this indicator.
        */
        get: function () {
            return brushToString(this.i.pw);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrFinancialIndicator.prototype, "trendLineThickness", {
        /**
         * Gets or sets the thickness of the current indicator object's trend line.
        */
        get: function () {
            return this.i.trendLineThickness;
        },
        set: function (v) {
            this.i.trendLineThickness = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrFinancialIndicator.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
    });
    /**
     * 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
    */
    IgrFinancialIndicator.prototype.getSeriesValueBoundingBox = function (world) {
        var iv = this.i.li(toPoint(world));
        return fromRect(iv);
    };
    IgrFinancialIndicator.prototype.getSeriesValue = function (world, useInterpolation, skipUnknowns) {
        var iv = this.i.eh(toPoint(world), useInterpolation, skipUnknowns);
        return (iv);
    };
    IgrFinancialIndicator.prototype.getPreviousOrExactIndex = function (world, skipUnknowns) {
        var iv = this.i.e8(toPoint(world), skipUnknowns);
        return (iv);
    };
    IgrFinancialIndicator.prototype.getNextOrExactIndex = function (world, skipUnknowns) {
        var 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.
    */
    IgrFinancialIndicator.prototype.scrollIntoView = function (item) {
        var iv = this.i.c6(item);
        return (iv);
    };
    return IgrFinancialIndicator;
}(IgrFinancialSeries));
export { IgrFinancialIndicator };
