/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import * as tslib_1 from "tslib";
import * as React from 'react';
import { Visibility_$type } from "igniteui-react-core/ES5/Visibility";
import { HorizontalAlignment_$type } from "igniteui-react-core/ES5/HorizontalAlignment";
import { VerticalAlignment_$type } from "igniteui-react-core/ES5/VerticalAlignment";
import { AxisLabelsLocation_$type } from './AxisLabelsLocation';
import { AxisLabelSettings } from './AxisLabelSettings';
import { TitleSettings } from './TitleSettings';
import { AxisTitlePosition_$type } from './AxisTitlePosition';
import { ensureEnum, brushToString, stringToBrush, ensureBool, isValidProp, getModifiedProps } from "igniteui-react-core/ES5/componentUtil";
import { delegateCombine, delegateRemove } from "igniteui-react-core/ES5/type";
import { RenderRequestedEventArgs } from './RenderRequestedEventArgs';
import { TypeRegistrar } from "igniteui-react-core/ES5/type";
import { AxisRangeChangedEventArgs } from './igr-axis-range-changed-event-args';
import { AxisAnnotationCollection } from './igr-axis-annotation-collection';
import { AxisAnnotationCollection as AxisAnnotationCollection_internal } from './AxisAnnotationCollection';
import { SyncableObservableCollection$1 } from "igniteui-react-core/ES5/SyncableObservableCollection$1";
import { IAxisAnnotation_$type } from './IAxisAnnotation';
/**
 * Represents the base class from which all axis types are derived.
*/
var IgrAxis = /** @class */ (function (_super) {
    tslib_1.__extends(IgrAxis, _super);
    function IgrAxis(props) {
        var _this = _super.call(this, props) || this;
        _this._renderer = null;
        _this._annotations = null;
        _this._rangeChanged = null;
        _this._rangeChanged_wrapped = null;
        _this._renderRequested = null;
        _this._renderRequested_wrapped = null;
        _this._implementation = _this.createImplementation();
        _this._implementation.externalObject = _this;
        _this.onImplementationCreated();
        return _this;
    }
    Object.defineProperty(IgrAxis.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    IgrAxis.prototype.onImplementationCreated = function () {
    };
    IgrAxis.prototype.componentDidMount = function () {
        this.initializeProperties();
    };
    IgrAxis.prototype.initializeProperties = function () {
        try {
            for (var _a = tslib_1.__values(Object.keys(this.props)), _b = _a.next(); !_b.done; _b = _a.next()) {
                var p = _b.value;
                if (isValidProp(this, p)) {
                    this[p] = this.props[p];
                }
            }
        }
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
        finally {
            try {
                if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
            }
            finally { if (e_1) throw e_1.error; }
        }
        var e_1, _c;
    };
    Object.defineProperty(IgrAxis.prototype, "axisInternal", {
        get: function () {
            return this.i;
        },
        enumerable: true,
        configurable: true
    });
    IgrAxis.prototype.createImplementation = function () {
        return null;
    };
    IgrAxis.prototype.shouldComponentUpdate = function (nextProps, nextState) {
        var mod = getModifiedProps(this.props, nextProps);
        try {
            for (var _a = tslib_1.__values(Object.keys(mod)), _b = _a.next(); !_b.done; _b = _a.next()) {
                var p = _b.value;
                if (isValidProp(this, p)) {
                    this[p] = mod[p];
                }
            }
        }
        catch (e_2_1) { e_2 = { error: e_2_1 }; }
        finally {
            try {
                if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
            }
            finally { if (e_2) throw e_2.error; }
        }
        return true;
        var e_2, _c;
    };
    IgrAxis.prototype.render = function () {
        return null;
    };
    Object.defineProperty(IgrAxis.prototype, "name", {
        get: function () {
            return this.i.name;
        },
        set: function (value) {
            this.i.name = value;
        },
        enumerable: true,
        configurable: true
    });
    IgrAxis.prototype.provideData = function (data) {
    };
    IgrAxis.prototype._provideRenderer = function (renderer) {
        this._renderer = renderer;
    };
    IgrAxis._createFromInternal = function (internal) {
        if (!internal) {
            return null;
        }
        if (!internal.$type) {
            return null;
        }
        var name = internal.$type.name;
        var externalName = "Igr" + name;
        if (!TypeRegistrar.isRegistered(externalName)) {
            return null;
        }
        return TypeRegistrar.create(externalName);
    };
    Object.defineProperty(IgrAxis.prototype, "isCategory", {
        /**
     * Gets or sets if the current axis is of category axis type
    */
        get: function () {
            return this.i.b2;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "isNumeric", {
        /**
         * Gets or sets if the current axis is of numeric axis type
        */
        get: function () {
            return this.i.ca;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "isAngular", {
        /**
         * Gets if the current axis is of angular axis type
        */
        get: function () {
            return this.i.b0;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "isRadial", {
        /**
         * Gets or sets if the current axis is of radial axis type
        */
        get: function () {
            return this.i.cb;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "isVertical", {
        /**
         * Gets if the current axis is a vertical axis.
        */
        get: function () {
            return this.i.ce;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "isSorting", {
        /**
         * Gets or sets if the current axis is sorting data items
        */
        get: function () {
            return this.i.cc;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "isDateTime", {
        /**
         * Gets or sets if the current axis is of date time axis type
        */
        get: function () {
            return this.i.b5;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "isCategoryDateTime", {
        /**
         * Gets or sets if the current axis is of category date time axis type
        */
        get: function () {
            return this.i.b3;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "isContinuous", {
        /**
         * Gets if the current axis is a continuous rather than a discrete scale
        */
        get: function () {
            return this.i.b4;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "formatLabel", {
        /**
         * Sets or gets a function which takes an object that produces a formatted label for displaying in the chart.
        */
        get: function () {
            return this.i.ar;
        },
        set: function (v) {
            this.i.ar = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "title", {
        /**
         * Gets or sets the Title property.
        */
        get: function () {
            return this.i.f0;
        },
        set: function (v) {
            this.i.f0 = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "stroke", {
        /**
         * Gets or sets the Stroke property.
         * Null is treated as auto. The axis stroke will be displayed or not based on the axis type and series used with it.
        */
        get: function () {
            return brushToString(this.i.ie);
        },
        set: function (v) {
            this.i.ie = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "actualStroke", {
        /**
         * Gets or sets the effective stroke used for the axis.
        */
        get: function () {
            return brushToString(this.i.ia);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "strokeThickness", {
        /**
         * Gets or sets the StrokeThickness property.
        */
        get: function () {
            return this.i.ek;
        },
        set: function (v) {
            this.i.ek = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "strip", {
        /**
         * Gets or sets the Strip property.
        */
        get: function () {
            return brushToString(this.i.id);
        },
        set: function (v) {
            this.i.id = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "majorStroke", {
        /**
         * Gets or sets the MajorStroke property.
         * Null is treated as auto. Major lines will be displayed or not based on the axis type and series used with it.
        */
        get: function () {
            return brushToString(this.i.ib);
        },
        set: function (v) {
            this.i.ib = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "actualMajorStroke", {
        /**
         * Gets or sets the ActualMajorStroke property.
        */
        get: function () {
            return brushToString(this.i.h8);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "majorStrokeThickness", {
        /**
         * Gets or sets the MajorStrokeThickness property.
        */
        get: function () {
            return this.i.d0;
        },
        set: function (v) {
            this.i.d0 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "minorStroke", {
        /**
         * Gets or sets the MinorStroke property.
        */
        get: function () {
            return brushToString(this.i.ic);
        },
        set: function (v) {
            this.i.ic = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "actualMinorStroke", {
        /**
         * Gets or sets the ActualMinorStroke property.
        */
        get: function () {
            return brushToString(this.i.h9);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "minorStrokeThickness", {
        /**
         * Gets or sets the MinorStrokeThickness property.
        */
        get: function () {
            return this.i.d3;
        },
        set: function (v) {
            this.i.d3 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "tickStroke", {
        /**
         * Gets or sets the TickStroke property.
        */
        get: function () {
            return brushToString(this.i.ig);
        },
        set: function (v) {
            this.i.ig = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "tickStrokeThickness", {
        /**
         * Gets or sets the TickStrokeThickness property.
        */
        get: function () {
            return this.i.em;
        },
        set: function (v) {
            this.i.em = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "tickLength", {
        /**
         * Gets or sets the TickLength property.
        */
        get: function () {
            return this.i.el;
        },
        set: function (v) {
            this.i.el = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "isDisabled", {
        /**
         * Gets or sets the IsDisabled property. If true, the axis will not be rendered.
        */
        get: function () {
            return this.i.b6;
        },
        set: function (v) {
            this.i.b6 = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "isInverted", {
        /**
         * Gets or sets the IsInverted property.
        */
        get: function () {
            return this.i.b8;
        },
        set: function (v) {
            this.i.b8 = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "useEnhancedIntervalManagement", {
        /**
         * Gets or sets whether to use more advanced heuristics when determining the initial number of labels to render, before resolving collisions, etc.
        */
        get: function () {
            return this.i.cn;
        },
        set: function (v) {
            this.i.cn = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "enhancedIntervalMinimumCharacters", {
        /**
         * Gets or sets the mininum desired characters to be displayed for horizontal axes when using advanced label heuristics. -1 will attempt to adjust the interval to precisely fit the horizontal labels.
        */
        get: function () {
            return this.i.et;
        },
        set: function (v) {
            this.i.et = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "labelTextStyle", {
        /**
         * Gets or sets the text style to use for axis labels.
        */
        get: function () {
            return this.i.aw ? this.i.aw.textStyle : null;
        },
        set: function (v) {
            this.ensureLabelSettings();
            this.i.aw.textStyle = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "labelTextColor", {
        /**
         * The color of the {0}.
        */
        get: function () {
            return brushToString(this.i.aw ? this.i.aw.textColor : null);
        },
        set: function (v) {
            this.ensureLabelSettings();
            this.i.aw.textColor = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "labelLocation", {
        /**
         * Gets or sets the location of the {0}.
        */
        get: function () {
            return this.i.aw ? this.i.aw.location : 0;
        },
        set: function (v) {
            this.ensureLabelSettings();
            this.i.aw.location = ensureEnum(AxisLabelsLocation_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "labelVisibility", {
        /**
         * Gets or sets the visibility of the {0}.
        */
        get: function () {
            return this.i.aw ? this.i.aw.visibility : 0;
        },
        set: function (v) {
            this.ensureLabelSettings();
            this.i.aw.visibility = ensureEnum(Visibility_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "labelShowFirstLabel", {
        /**
         * Gets or sets whether the first label is displayed when the zoom level is set to 1.
        */
        get: function () {
            return this.i.aw ? this.i.aw.showFirstLabel : false;
        },
        set: function (v) {
            this.ensureLabelSettings();
            this.i.aw.showFirstLabel = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "labelAngle", {
        /**
         * Gets or sets the angle of the {0}.
        */
        get: function () {
            return this.i.aw ? this.i.aw.angle : NaN;
        },
        set: function (v) {
            this.ensureLabelSettings();
            this.i.aw.angle = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "labelExtent", {
        /**
         * Distance between the axis and the edge of the control.
        */
        get: function () {
            return this.i.aw ? this.i.aw.extent : NaN;
        },
        set: function (v) {
            this.ensureLabelSettings();
            this.i.aw.extent = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "labelLeftMargin", {
        /**
         * Margin applied to the left of the {0}.
        */
        get: function () {
            return this.i.aw ? this.i.aw.leftMargin : NaN;
        },
        set: function (v) {
            this.ensureLabelSettings();
            this.i.aw.leftMargin = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "labelRightMargin", {
        /**
         * Margin applied to the right of the {0}.
        */
        get: function () {
            return this.i.aw ? this.i.aw.rightMargin : NaN;
        },
        set: function (v) {
            this.ensureLabelSettings();
            this.i.aw.rightMargin = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "labelTopMargin", {
        /**
         * Margin applied above the {0}.
        */
        get: function () {
            return this.i.aw ? this.i.aw.topMargin : NaN;
        },
        set: function (v) {
            this.ensureLabelSettings();
            this.i.aw.topMargin = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "labelBottomMargin", {
        /**
         * Margin applied below the {0}.
        */
        get: function () {
            return this.i.aw ? this.i.aw.bottomMargin : NaN;
        },
        set: function (v) {
            this.ensureLabelSettings();
            this.i.aw.bottomMargin = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "labelHorizontalAlignment", {
        /**
         * Gets or sets the horizontal alignment of the {0}.
        */
        get: function () {
            return this.i.aw ? this.i.aw.horizontalAlignment : 0;
        },
        set: function (v) {
            this.ensureLabelSettings();
            this.i.aw.horizontalAlignment = ensureEnum(HorizontalAlignment_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "labelVerticalAlignment", {
        /**
         * Gets or sets the vertical alignment of the {0}.
        */
        get: function () {
            return this.i.aw ? this.i.aw.verticalAlignment : 0;
        },
        set: function (v) {
            this.ensureLabelSettings();
            this.i.aw.verticalAlignment = ensureEnum(VerticalAlignment_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    IgrAxis.prototype.ensureLabelSettings = function () {
        if (this.i.aw) {
            return;
        }
        this.i.aw = new AxisLabelSettings();
        this.i.aw.location = this.i.ax();
        this.i.aw.angle = this.i.dh();
        this.i.aw.leftMargin = this.i.dj();
        this.i.aw.rightMargin = this.i.dk();
        this.i.aw.topMargin = this.i.dl();
        this.i.aw.bottomMargin = this.i.di();
        this.i.aw.horizontalAlignment = this.i.h6();
        this.i.aw.verticalAlignment = this.i.i0();
    };
    Object.defineProperty(IgrAxis.prototype, "crossingAxis", {
        /**
         * Gets or sets the CrossingAxis property.
        */
        get: function () {
            if (this.i.ag == null) {
                return null;
            }
            return this.i.ag.externalObject;
        },
        set: function (v) {
            v == null ? this.i.ag = null : this.i.ag = v.i;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "crossingValue", {
        /**
         * Gets or sets the CrossingValue property.
        */
        get: function () {
            return this.i.ey;
        },
        set: function (v) {
            this.i.ey = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "titlePosition", {
        /**
         * Gets or sets the title position relative to the axis labels.
        */
        get: function () {
            return this.i.bc ? this.i.bc.position : 0;
        },
        set: function (v) {
            this.ensureTitleSettings();
            this.i.bc.position = ensureEnum(AxisTitlePosition_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "titleTextStyle", {
        /**
         * Gets or sets the text style to use for axis labels.
        */
        get: function () {
            return this.i.bc ? this.i.bc.textStyle : null;
        },
        set: function (v) {
            this.ensureTitleSettings();
            this.i.bc.textStyle = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "titleTextColor", {
        /**
         * The color of the {0}.
        */
        get: function () {
            return brushToString(this.i.bc ? this.i.bc.textColor : null);
        },
        set: function (v) {
            this.ensureTitleSettings();
            this.i.bc.textColor = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "titleLocation", {
        /**
         * Gets or sets the location of the {0}.
        */
        get: function () {
            return this.i.bc ? this.i.bc.location : 0;
        },
        set: function (v) {
            this.ensureTitleSettings();
            this.i.bc.location = ensureEnum(AxisLabelsLocation_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "titleVisibility", {
        /**
         * Gets or sets the visibility of the {0}.
        */
        get: function () {
            return this.i.bc ? this.i.bc.visibility : 0;
        },
        set: function (v) {
            this.ensureTitleSettings();
            this.i.bc.visibility = ensureEnum(Visibility_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "titleShowFirstLabel", {
        /**
         * Gets or sets whether the first label is displayed when the zoom level is set to 1.
        */
        get: function () {
            return this.i.bc ? this.i.bc.showFirstLabel : false;
        },
        set: function (v) {
            this.ensureTitleSettings();
            this.i.bc.showFirstLabel = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "titleAngle", {
        /**
         * Gets or sets the angle of the {0}.
        */
        get: function () {
            return this.i.bc ? this.i.bc.angle : NaN;
        },
        set: function (v) {
            this.ensureTitleSettings();
            this.i.bc.angle = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "titleExtent", {
        /**
         * Distance between the axis and the edge of the control.
        */
        get: function () {
            return this.i.bc ? this.i.bc.extent : NaN;
        },
        set: function (v) {
            this.ensureTitleSettings();
            this.i.bc.extent = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "titleLeftMargin", {
        /**
         * Margin applied to the left of the {0}.
        */
        get: function () {
            return this.i.bc ? this.i.bc.leftMargin : NaN;
        },
        set: function (v) {
            this.ensureTitleSettings();
            this.i.bc.leftMargin = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "titleRightMargin", {
        /**
         * Margin applied to the right of the {0}.
        */
        get: function () {
            return this.i.bc ? this.i.bc.rightMargin : NaN;
        },
        set: function (v) {
            this.ensureTitleSettings();
            this.i.bc.rightMargin = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "titleTopMargin", {
        /**
         * Margin applied above the {0}.
        */
        get: function () {
            return this.i.bc ? this.i.bc.topMargin : NaN;
        },
        set: function (v) {
            this.ensureTitleSettings();
            this.i.bc.topMargin = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "titleBottomMargin", {
        /**
         * Margin applied below the {0}.
        */
        get: function () {
            return this.i.bc ? this.i.bc.bottomMargin : NaN;
        },
        set: function (v) {
            this.ensureTitleSettings();
            this.i.bc.bottomMargin = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "titleHorizontalAlignment", {
        /**
         * Gets or sets the horizontal alignment of the {0}.
        */
        get: function () {
            return this.i.bc ? this.i.bc.horizontalAlignment : 0;
        },
        set: function (v) {
            this.ensureTitleSettings();
            this.i.bc.horizontalAlignment = ensureEnum(HorizontalAlignment_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "titleVerticalAlignment", {
        /**
         * Gets or sets the vertical alignment of the {0}.
        */
        get: function () {
            return this.i.bc ? this.i.bc.verticalAlignment : 0;
        },
        set: function (v) {
            this.ensureTitleSettings();
            this.i.bc.verticalAlignment = ensureEnum(VerticalAlignment_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    IgrAxis.prototype.ensureTitleSettings = function () {
        if (this.i.bc) {
            return;
        }
        this.i.bc = new TitleSettings();
        this.i.bc.location = this.i.ay();
        this.i.bc.angle = this.i.dm();
        this.i.bc.leftMargin = this.i.dp();
        this.i.bc.rightMargin = this.i.dq();
        this.i.bc.topMargin = this.i.dr();
        this.i.bc.bottomMargin = this.i.dn();
        this.i.bc.horizontalAlignment = this.i.h7();
        this.i.bc.verticalAlignment = this.i.i1();
    };
    Object.defineProperty(IgrAxis.prototype, "annotations", {
        /**
         * Gets the current annotations for the axis.
        */
        get: function () {
            if (this._annotations === null) {
                var coll = new AxisAnnotationCollection();
                var innerColl = this.i.ak;
                var wasNull = false;
                if (!innerColl) {
                    wasNull = true;
                    innerColl = new AxisAnnotationCollection_internal();
                }
                this._annotations = coll._fromInner(innerColl);
            }
            return this._annotations;
        },
        set: function (v) {
            if (this._annotations !== null) {
                this._annotations._setSyncTarget(null);
                this._annotations = null;
            }
            var coll = new AxisAnnotationCollection();
            this._annotations = coll._fromOuter(v);
            var syncColl = new SyncableObservableCollection$1(IAxisAnnotation_$type);
            var innerColl = this.i.ak;
            var wasNull = false;
            if (!innerColl) {
                wasNull = true;
                innerColl = new AxisAnnotationCollection_internal();
            }
            syncColl._inner = innerColl;
            syncColl.clear();
            this._annotations._setSyncTarget(syncColl);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "coercionMethods", {
        /**
         * Gets or sets the coercion methods to use when loading data from data sources.
         * Should be specified before setting any member paths, if being used. Setting it later
         * will not cause data to be re-imported into the chart.
        */
        get: function () {
            return this.i.coercionMethods;
        },
        set: function (v) {
            this.i.coercionMethods = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "expectFunctions", {
        /**
         * Gets or sets whether the series should expect that properties in its items source may be functions that need to be
         * evaluated to yield their value. This defaults to false, as there will be a subtle performance impact to using this feature.
         * This value must be set before assigning an item's source to take effect.
        */
        get: function () {
            return this.i.expectFunctions;
        },
        set: function (v) {
            this.i.expectFunctions = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "label", {
        /**
         * Gets or sets the axis label format string.
        */
        get: function () {
            return this.i.e1;
        },
        set: function (v) {
            this.i.e1 = v;
        },
        enumerable: true,
        configurable: true
    });
    /**
 * Renders the axis with no animation.

*/
    IgrAxis.prototype.renderAxis = function () {
        this.i.gy();
    };
    /**
     * If using enhanced interval management and precise interval fitting, this will reset the cached maximum label width, and recalculate using the current labels.
    
    */
    IgrAxis.prototype.resetCachedEnhancedInterval = function () {
        this.i.g1();
    };
    /**
     * Scales a value from axis space into screen space.
    
    * @param unscaledValue  * The unscaled axis value to scale.
    */
    IgrAxis.prototype.scaleValue = function (unscaledValue) {
        var iv = this.i.d8(unscaledValue);
        return (iv);
    };
    Object.defineProperty(IgrAxis.prototype, "rangeChanged", {
        /**
         * Occurs when the axis range changes.
        */
        get: function () {
            return this._rangeChanged;
        },
        set: function (ev) {
            var _this = this;
            if (this._rangeChanged !== null) {
                this.i.rangeChanged = delegateRemove(this.i.rangeChanged, this._rangeChanged_wrapped);
                this._rangeChanged_wrapped = null;
                this._rangeChanged = null;
            }
            this._rangeChanged = ev;
            this._rangeChanged_wrapped = function (o, e) {
                var outerArgs = new AxisRangeChangedEventArgs();
                outerArgs._provideImplementation(e);
                _this._rangeChanged(_this, outerArgs);
            };
            this.i.rangeChanged = delegateCombine(this.i.rangeChanged, this._rangeChanged_wrapped);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrAxis.prototype, "renderRequested", {
        /**
         * This event is raised every time a render has been requested from a series.
        */
        get: function () {
            return this._renderRequested;
        },
        set: function (ev) {
            var _this = this;
            if (this._renderRequested !== null) {
                this.i.renderRequested = delegateRemove(this.i.renderRequested, this._renderRequested_wrapped);
                this._renderRequested_wrapped = null;
                this._renderRequested = null;
            }
            this._renderRequested = ev;
            this._renderRequested_wrapped = function (o, e) {
                var outerArgs = new RenderRequestedEventArgs();
                outerArgs._provideImplementation(e);
                _this._renderRequested(_this, outerArgs);
            };
            this.i.renderRequested = delegateCombine(this.i.renderRequested, this._renderRequested_wrapped);
        },
        enumerable: true,
        configurable: true
    });
    return IgrAxis;
}(React.Component));
export { IgrAxis };
