/*
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 { Output, EventEmitter, Component, Input } from '@angular/core';
import { Visibility_$type } from "igniteui-angular-core";
import { HorizontalAlignment_$type } from "igniteui-angular-core";
import { VerticalAlignment_$type } from "igniteui-angular-core";
import { AxisLabelsLocation_$type } from './AxisLabelsLocation';
import { AxisLabelSettings } from './AxisLabelSettings';
import { TitleSettings } from './TitleSettings';
import { AxisTitlePosition_$type } from './AxisTitlePosition';
import { ensureEnum, arrayFindByName, brushToString, stringToBrush, ensureBool, toSpinal, initializePropertiesFromCss, NamePatcher } from "igniteui-angular-core";
import { delegateCombine } from "igniteui-angular-core";
import { IgxRenderRequestedEventArgs } from './igx-render-requested-event-args';
import { TypeRegistrar } from "igniteui-angular-core";
import { IgxAxisRangeChangedEventArgs } from './igx-axis-range-changed-event-args';
import { IgxAxisAnnotationCollection } from './igx-axis-annotation-collection';
import { AxisAnnotationCollection as AxisAnnotationCollection_internal } from './AxisAnnotationCollection';
import { SyncableObservableCollection$1 } from "igniteui-angular-core";
import { IAxisAnnotation_$type } from './IAxisAnnotation';
import * as i0 from "@angular/core";
/**
 * Represents the base class from which all axis types are derived.
*
* The `IgxAxisComponent` is an array of axis objects.
*
* ```html
* <igx-data-chart
*     [dataSource]="data" >
*     <igx-category-x-axis
* 		label="label"
* 		#xAxis>
*     </igx-category-x-axis>
*     <igx-numeric-y-axis
* 		#yAxis>
*     </igx-numeric-y-axis>
* </igx-data-chart>
* ```
*/
export let IgxAxisComponent = /*@__PURE__*/ (() => {
    class IgxAxisComponent {
        constructor() {
            this._renderer = null;
            this._annotations = null;
            this.__p = null;
            this._hasUserValues = new Set();
            this._stylingContainer = null;
            this._stylingParent = null;
            this._inStyling = false;
            this._rangeChanged = null;
            this._renderRequested = null;
            this._zoneRunner = null;
            if (this._styling) {
                NamePatcher.ensureStylablePatched(Object.getPrototypeOf(this));
            }
            this._implementation = this.createImplementation();
            this._implementation.externalObject = this;
            this.onImplementationCreated();
        }
        get i() {
            return this._implementation;
        }
        onImplementationCreated() {
        }
        get axisInternal() {
            return this.i;
        }
        createImplementation() {
            return null;
        }
        ngOnInit() {
        }
        set name(value) {
            //console.log("setting axis name: " + value);
            this.i.name = value;
            //console.log("checking axis anme: " + this.i.name)
        }
        get name() {
            //console.log("getting axis anme: " + this.i.name)
            return this.i.name;
        }
        provideData(data) {
        }
        _provideRenderer(renderer) {
            this._renderer = renderer;
            this._zoneRunner = (act) => renderer._ngZone.run(act);
        }
        static _createFromInternal(internal) {
            if (!internal) {
                return null;
            }
            if (!internal.$type) {
                return null;
            }
            let name = internal.$type.name;
            let externalName = "Igx" + name + "Component";
            if (!TypeRegistrar.isRegistered(externalName)) {
                return null;
            }
            return TypeRegistrar.create(externalName);
        }
        /**
     * Gets or sets if the current axis is of category axis type
    */
        get isCategory() {
            return this.i.ca;
        }
        /**
         * Gets or sets if the current axis is of numeric axis type
        *
        *     Gets or sets if the current axis is of numeric axis type
        */
        get isNumeric() {
            return this.i.ci;
        }
        /**
         * Gets if the current axis is of angular axis type
        */
        get isAngular() {
            return this.i.b8;
        }
        /**
         * Gets or sets if the current axis is of radial axis type
        */
        get isRadial() {
            return this.i.cl;
        }
        /**
         * Gets if the current axis is a vertical axis.
        */
        get isVertical() {
            return this.i.co;
        }
        /**
         * Gets or sets if the current axis is sorting data items
        */
        get isSorting() {
            return this.i.cm;
        }
        /**
         * Gets or sets if the current axis is of date time axis type
        */
        get isDateTime() {
            return this.i.cd;
        }
        /**
         * Gets or sets if the current axis is of ordinal axis type
        */
        get isOrdinal() {
            return this.i.cj;
        }
        /**
         * Gets or sets if the axis is a piecewise scaling function.
        */
        get isPiecewise() {
            return this.i.ck;
        }
        /**
         * Gets if the current axis is of category date time axis type
        */
        get isCategoryDateTime() {
            return this.i.cb;
        }
        /**
         * Gets if the current axis is a continuous rather than a discrete scale
        */
        get isContinuous() {
            return this.i.cc;
        }
        /**
         * Sets or gets a function which takes an object that produces a formatted label for displaying in the chart.
        *
        * The `formatLabel` function takes an object that produces a formatted label for displaying in the chart.
        *
        * ```html
        * <igx-data-chart [dataSource]="data" >
        *     <igx-category-x-axis
        * 		name="xAxis"
        * 		FormatLabel="xAxis_FormatLabel" />
        * </igx-data-chart>
        * ```
        */
        get formatLabel() {
            return this.i.at;
        }
        set formatLabel(v) {
            this.i.at = v;
        }
        /**
         * Gets or sets the Title property.
        *
        * Use `title` property to display the title of the component.
        *
        * ```html
        * <igx-data-chart
        *     [dataSource]="data" >
        *     <igx-category-x-axis
        * 		label="label"
        * 		#xAxis>
        *     </igx-category-x-axis>
        *     <igx-numeric-y-axis
        * 		#yAxis>
        *     </igx-numeric-y-axis>
        *
        * </igx-data-chart>
        * ```
        */
        get title() {
            return this.i.g5;
        }
        set title(v) {
            this.i.g5 = v;
        }
        /**
         * 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.
        *
        * Use `stroke` property to set the stroke of the chart.
        *
        * ```html
        * <igx-data-chart
        *     [dataSource]="data" >
        *     <igx-category-x-axis
        * 		label="label"
        * 		stroke="blue"
        * 		#xAxis>
        *     </igx-category-x-axis>
        *     <igx-numeric-y-axis
        * 		#yAxis>
        *     </igx-numeric-y-axis>
        * </igx-data-chart>
        * ```
        */
        get stroke() {
            return brushToString(this.i.jy);
        }
        set stroke(v) {
            this.i.jy = stringToBrush(v);
        }
        /**
         * Gets or sets the effective stroke used for the axis.
        */
        get actualStroke() {
            return brushToString(this.i.ju);
        }
        set actualStroke(v) {
            this.i.ju = stringToBrush(v);
        }
        /**
         * Gets or sets the StrokeThickness property.
        *
        * Use `strokeThickness` property for the thickness of the stroke.
        *
        * ```html
        * <igx-data-chart
        *     [dataSource]="data" >
        *     <igx-category-x-axis
        * 		label="label"
        * 		strokeThickness= 5
        * 		#xAxis>
        *     </igx-category-x-axis>
        *     <igx-numeric-y-axis
        * 		#yAxis>
        *     </igx-numeric-y-axis>
        *
        * </igx-data-chart>
        * ```
        */
        get strokeThickness() {
            return this.i.ff;
        }
        set strokeThickness(v) {
            this.i.ff = +v;
        }
        /**
         * Gets or sets the Strip property.
        *
        * Use `strip` property to set the strip of the chart.
        *
        * ```html
        * <igx-data-chart
        *     [dataSource]="data" >
        *     <igx-category-x-axis
        * 		label="label"
        * 		 strip= "grey"
        * 		#xAxis>
        *     </igx-category-x-axis>
        *     <igx-numeric-y-axis
        * 		#yAxis>
        *     </igx-numeric-y-axis>
        *
        * </igx-data-chart>
        * ```
        */
        get strip() {
            return brushToString(this.i.jx);
        }
        set strip(v) {
            this.i.jx = stringToBrush(v);
        }
        /**
         * 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.
        *
        * Gets or sets the `majorStroke` using this property.
        *
        * ```html
        * <igx-data-chart
        *     [dataSource]="data" >
        *     <igx-category-x-axis
        * 		label="label"
        * 		#xAxis>
        *     </igx-category-x-axis>
        *     <igx-numeric-y-axis
        * 	   majorStroke="black"
        * 		#yAxis>
        *     </igx-numeric-y-axis>
        * </igx-data-chart>
        * ```
        */
        get majorStroke() {
            return brushToString(this.i.jv);
        }
        set majorStroke(v) {
            this.i.jv = stringToBrush(v);
        }
        /**
         * Gets or sets the ActualMajorStroke property.
        *
        * The `actualMajorStroke` property is used for ActualMajorStroke of the axis.
        */
        get actualMajorStroke() {
            return brushToString(this.i.js);
        }
        set actualMajorStroke(v) {
            this.i.js = stringToBrush(v);
        }
        /**
         * Gets or sets the MajorStrokeThickness property.
        *
        * Gets or sets the `majorStrokeThickness` using this property.
        *
        * ```html
        * <igx-data-chart
        *     [dataSource]="data" >
        *     <igx-category-x-axis
        * 		label="label"
        * 		#xAxis>
        *     </igx-category-x-axis>
        *     <igx-numeric-y-axis
        * 	  majorStrokeThickness="1"
        * 		#yAxis>
        *     </igx-numeric-y-axis>
        * </igx-data-chart>
        * ```
        */
        get majorStrokeThickness() {
            return this.i.eq;
        }
        set majorStrokeThickness(v) {
            this.i.eq = +v;
        }
        /**
         * Gets or sets the MinorStroke property.
        *
        * Gets or sets the minorStroke thickness using `minorStrokeThickness` property.
        *
        * ```html
        * <igx-data-chart
        *     [dataSource]="data" >
        *     <igx-category-x-axis
        * 		label="label"
        * 		#xAxis>
        *     </igx-category-x-axis>
        *     <igx-numeric-y-axis
        * 	 minorStrokeThickness="1"
        * 		#yAxis>
        *     </igx-numeric-y-axis>
        * </igx-data-chart>
        * ```
        */
        get minorStroke() {
            return brushToString(this.i.jw);
        }
        set minorStroke(v) {
            this.i.jw = stringToBrush(v);
        }
        /**
         * Gets or sets the ActualMinorStroke property.
        *
        * The `actualMinorStroke` property is used for ActualMinorStroke of the axis.
        */
        get actualMinorStroke() {
            return brushToString(this.i.jt);
        }
        set actualMinorStroke(v) {
            this.i.jt = stringToBrush(v);
        }
        /**
         * Gets or sets the MinorStrokeThickness property.
        */
        get minorStrokeThickness() {
            return this.i.et;
        }
        set minorStrokeThickness(v) {
            this.i.et = +v;
        }
        /**
         * Gets or sets the TickStroke property.
        *
        * Use `tickStroke` property for the color of the tickmarks.
        *
        * ```html
        * <igx-data-chart
        *     [dataSource]="data" >
        *     <igx-category-x-axis
        * 		label="label"
        * 		tickStroke="black"
        * 		#xAxis>
        *     </igx-category-x-axis>
        *     <igx-numeric-y-axis
        * 		#yAxis>
        *     </igx-numeric-y-axis>
        * </igx-data-chart>
        * ```
        */
        get tickStroke() {
            return brushToString(this.i.jz);
        }
        set tickStroke(v) {
            this.i.jz = stringToBrush(v);
        }
        /**
         * Gets or sets the TickStrokeThickness property.
        *
        * Use `tickStrokeThickness` property for thickness of the stroke tickmarks.
        *
        * ```html
        * <igx-data-chart
        *     [dataSource]="data" >
        *     <igx-category-x-axis
        * 		label="label"
        * 		tickStrokeThicknes="2"
        * 		#xAxis>
        *     </igx-category-x-axis>
        *     <igx-numeric-y-axis
        * 		#yAxis>
        *     </igx-numeric-y-axis>
        *
        * </igx-data-chart>
        * ```
        */
        get tickStrokeThickness() {
            return this.i.fh;
        }
        set tickStrokeThickness(v) {
            this.i.fh = +v;
        }
        /**
         * Gets or sets the TickLength property.
        *
        * Use `tickLength` property for The length of the tickmarks to display for this axis.
        *
        * ```html
        * <igx-data-chart
        *     [dataSource]="data" >
        *     <igx-category-x-axis
        * 		label="label"
        * 		tickLength="5"
        * 		#xAxis>
        *     </igx-category-x-axis>
        *     <igx-numeric-y-axis
        * 		#yAxis>
        *     </igx-numeric-y-axis>
        *
        * </igx-data-chart>
        * ```
        */
        get tickLength() {
            return this.i.fg;
        }
        set tickLength(v) {
            this.i.fg = +v;
        }
        /**
         * Gets or sets the IsDisabled property. If true, the axis will not be rendered.
        *
        * The `isDisabled` property is used to decide if the axis will not be rendered.
        */
        get isDisabled() {
            return this.i.ce;
        }
        set isDisabled(v) {
            this.i.ce = ensureBool(v);
        }
        /**
         * Gets or sets the IsInverted property.
        *
        * Gets or sets the `isInverted` property.
        *
        * ```html
        * <igx-data-chart
        *     [dataSource]="data" >
        *     <igx-category-x-axis
        * 		label="label"
        * 		isInverted= true
        * 		#xAxis>
        *     </igx-category-x-axis>
        *     <igx-numeric-y-axis
        * 		#yAxis>
        *     </igx-numeric-y-axis>
        *
        * </igx-data-chart>
        * ```
        */
        get isInverted() {
            return this.i.cg;
        }
        set isInverted(v) {
            this.i.cg = ensureBool(v);
        }
        /**
         * Gets or sets whether annotations should be shifted to avoid collision, even if this would result in them appearing where they shouldn't be along the scale.
        */
        get shouldAvoidAnnotationCollisions() {
            return this.i.ct;
        }
        set shouldAvoidAnnotationCollisions(v) {
            this.i.ct = ensureBool(v);
        }
        /**
         * ets or sets whether annotations should be kept in view, even if they aren't positioned where they should appear on the scale.
        */
        get shouldKeepAnnotationsInView() {
            return this.i.cv;
        }
        set shouldKeepAnnotationsInView(v) {
            this.i.cv = ensureBool(v);
        }
        /**
         * Gets or sets whether to use more advanced heuristics when determining the initial number of labels to render, before resolving collisions, etc.
        */
        get usePerLabelHeightMeasurement() {
            return this.i.c4;
        }
        set usePerLabelHeightMeasurement(v) {
            this.i.c4 = ensureBool(v);
        }
        /**
         * Gets or sets whether to use more advanced heuristics when determining the initial number of labels to render, before resolving collisions, etc.
        *
        * Use `useEnhancedIntervalManagement` property to gets/sets whether to use more advanced heuristics when determining the initial number of labels to render,
        * before resolving collisions, etc.
        */
        get useEnhancedIntervalManagement() {
            return this.i.c3;
        }
        set useEnhancedIntervalManagement(v) {
            this.i.c3 = ensureBool(v);
        }
        /**
         * Gets or sets the minimum 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.
        *
        * The `enhancedIntervalMinimumCharacters` property is used to set the mininum desired characters to be displayed for horizontal axes when using advanced label heuristics.
        *
        * ```html
        * <igx-data-chart
        *     [dataSource]="data" >
        *     <igx-category-x-axis
        * 		label="label"
        * 		#xAxis>
        *     </igx-category-x-axis>
        *     <igx-numeric-y-axis
        * 		enhancedIntervalMinimumCharacters=5
        * 		#yAxis>
        *     </igx-numeric-y-axis>
        *
        * </igx-data-chart>
        * ```
        */
        get enhancedIntervalMinimumCharacters() {
            return this.i.fp;
        }
        set enhancedIntervalMinimumCharacters(v) {
            this.i.fp = +v;
        }
        /**
         * Gets or sets whether the enhanced interval management should prefer to show all the labels if possible without collisions for supported types of category axes. This is for use with EnhancedIntervalMinimumCharacters = -1 and axes that have an integral interval.
        */
        get enhancedIntervalPreferMoreCategoryLabels() {
            return this.i.b0;
        }
        set enhancedIntervalPreferMoreCategoryLabels(v) {
            this.i.b0 = ensureBool(v);
        }
        /**
         * Gets or sets the text style to use for axis labels.
        *
        * The `labelTextStyle` property Overrides the style of the text used for the axis labels.
        */
        get labelTextStyle() {
            return this.i.ay ? this.i.ay.textStyle : null;
        }
        set labelTextStyle(v) {
            this.ensureLabelSettings();
            this.i.ay.textStyle = v;
        }
        /**
         * The color of the {0}.
        *
        * The `labelTextColor` property Overrides the color of the text used for the axis labels.
        */
        get labelTextColor() {
            return brushToString(this.i.ay ? this.i.ay.textColor : null);
        }
        set labelTextColor(v) {
            this.ensureLabelSettings();
            this.i.ay.textColor = stringToBrush(v);
        }
        /**
         * Gets or sets the location of the {0}.
        *
        * The `Location` property is used for the location.
        */
        get labelLocation() {
            return this.i.ay ? this.i.ay.location : 0;
        }
        set labelLocation(v) {
            this.ensureLabelSettings();
            this.i.ay.location = ensureEnum(AxisLabelsLocation_$type, v);
        }
        /**
         * Gets or sets the visibility of the {0}.
        *
        * The `Visibility` property is used for the visibility of the axis.
        */
        get labelVisibility() {
            return this.i.ay ? this.i.ay.visibility : 0;
        }
        set labelVisibility(v) {
            this.ensureLabelSettings();
            this.i.ay.visibility = ensureEnum(Visibility_$type, v);
        }
        /**
         * Gets or sets whether the first label is displayed when the zoom level is set to 1.
        *
        * The `ShowFirstLabel` is used to check whether the first label is displayed when the zoom level is set to 1.
        */
        get labelShowFirstLabel() {
            return this.i.ay ? this.i.ay.showFirstLabel : false;
        }
        set labelShowFirstLabel(v) {
            this.ensureLabelSettings();
            this.i.ay.showFirstLabel = ensureBool(v);
        }
        /**
         * Gets or sets the angle of the {0}.
        *
        * The `Angle` property is used to set the angle of the axis.
        */
        get labelAngle() {
            return this.i.ay ? this.i.ay.angle : NaN;
        }
        set labelAngle(v) {
            this.ensureLabelSettings();
            this.i.ay.angle = +v;
        }
        /**
         * Distance between the axis and the edge of the control.
        *
        * The `Extent` property is used for the extent.
        */
        get labelExtent() {
            return this.i.ay ? this.i.ay.extent : NaN;
        }
        set labelExtent(v) {
            this.ensureLabelSettings();
            this.i.ay.extent = +v;
        }
        /**
         * Margin applied to the left of the {0}.
        *
        * The `labelLeftMargin` property is used for the left margin of the labels.
        */
        get labelLeftMargin() {
            return this.i.ay ? this.i.ay.leftMargin : NaN;
        }
        set labelLeftMargin(v) {
            this.ensureLabelSettings();
            this.i.ay.leftMargin = +v;
        }
        /**
         * Margin applied to the right of the {0}.
        *
        * The `labelRightMargin` property is used for the right margin of the labels.
        */
        get labelRightMargin() {
            return this.i.ay ? this.i.ay.rightMargin : NaN;
        }
        set labelRightMargin(v) {
            this.ensureLabelSettings();
            this.i.ay.rightMargin = +v;
        }
        /**
         * Margin applied above the {0}.
        *
        * The `labelTopMargin` property is used for the top margin of the labels.
        */
        get labelTopMargin() {
            return this.i.ay ? this.i.ay.topMargin : NaN;
        }
        set labelTopMargin(v) {
            this.ensureLabelSettings();
            this.i.ay.topMargin = +v;
        }
        /**
         * Margin applied below the {0}.
        *
        * The `labelBottomMargin` is used to set the bottom margin of the labels.
        */
        get labelBottomMargin() {
            return this.i.ay ? this.i.ay.bottomMargin : NaN;
        }
        set labelBottomMargin(v) {
            this.ensureLabelSettings();
            this.i.ay.bottomMargin = +v;
        }
        /**
         * Gets or sets the horizontal alignment of the {0}.
        *
        * The `HorizontalAlignment` property is used for the horizontal alignment.
        */
        get labelHorizontalAlignment() {
            return this.i.ay ? this.i.ay.horizontalAlignment : 0;
        }
        set labelHorizontalAlignment(v) {
            this.ensureLabelSettings();
            this.i.ay.horizontalAlignment = ensureEnum(HorizontalAlignment_$type, v);
        }
        /**
         * Gets or sets the vertical alignment of the {0}.
        *
        * The `VerticalAlignment` property is used for the vertical alignment of the axis.
        */
        get labelVerticalAlignment() {
            return this.i.ay ? this.i.ay.verticalAlignment : 0;
        }
        set labelVerticalAlignment(v) {
            this.ensureLabelSettings();
            this.i.ay.verticalAlignment = ensureEnum(VerticalAlignment_$type, v);
        }
        ensureLabelSettings() {
            if (this.i.ay) {
                return;
            }
            this.i.ay = new AxisLabelSettings();
            this.i.ay.location = this.i.az();
            this.i.ay.angle = this.i.d4();
            this.i.ay.leftMargin = this.i.d6();
            this.i.ay.rightMargin = this.i.d7();
            this.i.ay.topMargin = this.i.d8();
            this.i.ay.bottomMargin = this.i.d5();
            this.i.ay.horizontalAlignment = this.i.jq();
            this.i.ay.verticalAlignment = this.i.kj();
        }
        /**
         * Gets or sets the CrossingAxis property.
        *
        * The `crossingAxis` property is used for CrossingAxis .
        *
        * ```html
        * <igx-data-chart
        *     [dataSource]="data" >
        *     <igx-category-x-axis
        * 		label="label"
        * 		#xAxis>
        *     </igx-category-x-axis>
        *     <igx-numeric-y-axis
        * 		crossingAxis= "xAxis"
        * 		crossingValue= 700
        * 		#yAxis>
        *     </igx-numeric-y-axis>
        * </igx-data-chart>
        * ```
        */
        get crossingAxis() {
            if (this.i.ai == null) {
                return null;
            }
            if (!this.i.ai.externalObject) {
                let e = IgxAxisComponent._createFromInternal(this.i.ai);
                if (e) {
                    e._implementation = this.i.ai;
                }
                this.i.ai.externalObject = e;
            }
            return this.i.ai.externalObject;
        }
        set crossingAxis(v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.ai = null : this.i.ai = v.i;
        }
        /**
         * Gets or sets the CrossingValue property.
        *
        * The `crossingValue` property is used for CrossingValue of the axis.
        *
        * ```html
        * <igx-data-chart
        *     [dataSource]="data" >
        *     <igx-category-x-axis
        * 		label="label"
        * 		#xAxis>
        *     </igx-category-x-axis>
        *     <igx-numeric-y-axis
        * 		crossingAxis= "xAxis"
        * 		crossingValue= 700
        * 		#yAxis>
        *     </igx-numeric-y-axis>
        * </igx-data-chart>
        * ```
        */
        get crossingValue() {
            return this.i.fu;
        }
        set crossingValue(v) {
            this.i.fu = v;
        }
        /**
         * Gets or sets the title position relative to the axis labels.
        */
        get titlePosition() {
            return this.i.be ? this.i.be.position : 0;
        }
        set titlePosition(v) {
            this.ensureTitleSettings();
            this.i.be.position = ensureEnum(AxisTitlePosition_$type, v);
        }
        /**
         * Gets or sets the text style to use for axis labels.
        *
        * The `labelTextStyle` property Overrides the style of the text used for the axis labels.
        */
        get titleTextStyle() {
            return this.i.be ? this.i.be.textStyle : null;
        }
        set titleTextStyle(v) {
            this.ensureTitleSettings();
            this.i.be.textStyle = v;
        }
        /**
         * The color of the {0}.
        *
        * The `labelTextColor` property Overrides the color of the text used for the axis labels.
        */
        get titleTextColor() {
            return brushToString(this.i.be ? this.i.be.textColor : null);
        }
        set titleTextColor(v) {
            this.ensureTitleSettings();
            this.i.be.textColor = stringToBrush(v);
        }
        /**
         * Gets or sets the location of the {0}.
        *
        * The `Location` property is used for the location.
        */
        get titleLocation() {
            return this.i.be ? this.i.be.location : 0;
        }
        set titleLocation(v) {
            this.ensureTitleSettings();
            this.i.be.location = ensureEnum(AxisLabelsLocation_$type, v);
        }
        /**
         * Gets or sets the visibility of the {0}.
        *
        * The `Visibility` property is used for the visibility of the axis.
        */
        get titleVisibility() {
            return this.i.be ? this.i.be.visibility : 0;
        }
        set titleVisibility(v) {
            this.ensureTitleSettings();
            this.i.be.visibility = ensureEnum(Visibility_$type, v);
        }
        /**
         * Gets or sets whether the first label is displayed when the zoom level is set to 1.
        *
        * The `ShowFirstLabel` is used to check whether the first label is displayed when the zoom level is set to 1.
        */
        get titleShowFirstLabel() {
            return this.i.be ? this.i.be.showFirstLabel : false;
        }
        set titleShowFirstLabel(v) {
            this.ensureTitleSettings();
            this.i.be.showFirstLabel = ensureBool(v);
        }
        /**
         * Gets or sets the angle of the {0}.
        *
        * The `Angle` property is used to set the angle of the axis.
        */
        get titleAngle() {
            return this.i.be ? this.i.be.angle : NaN;
        }
        set titleAngle(v) {
            this.ensureTitleSettings();
            this.i.be.angle = +v;
        }
        /**
         * Distance between the axis and the edge of the control.
        *
        * The `Extent` property is used for the extent.
        */
        get titleExtent() {
            return this.i.be ? this.i.be.extent : NaN;
        }
        set titleExtent(v) {
            this.ensureTitleSettings();
            this.i.be.extent = +v;
        }
        /**
         * Margin applied to the left of the {0}.
        *
        * The `labelLeftMargin` property is used for the left margin of the labels.
        */
        get titleLeftMargin() {
            return this.i.be ? this.i.be.leftMargin : NaN;
        }
        set titleLeftMargin(v) {
            this.ensureTitleSettings();
            this.i.be.leftMargin = +v;
        }
        /**
         * Margin applied to the right of the {0}.
        *
        * The `labelRightMargin` property is used for the right margin of the labels.
        */
        get titleRightMargin() {
            return this.i.be ? this.i.be.rightMargin : NaN;
        }
        set titleRightMargin(v) {
            this.ensureTitleSettings();
            this.i.be.rightMargin = +v;
        }
        /**
         * Margin applied above the {0}.
        *
        * The `labelTopMargin` property is used for the top margin of the labels.
        */
        get titleTopMargin() {
            return this.i.be ? this.i.be.topMargin : NaN;
        }
        set titleTopMargin(v) {
            this.ensureTitleSettings();
            this.i.be.topMargin = +v;
        }
        /**
         * Margin applied below the {0}.
        *
        * The `labelBottomMargin` is used to set the bottom margin of the labels.
        */
        get titleBottomMargin() {
            return this.i.be ? this.i.be.bottomMargin : NaN;
        }
        set titleBottomMargin(v) {
            this.ensureTitleSettings();
            this.i.be.bottomMargin = +v;
        }
        /**
         * Gets or sets the horizontal alignment of the {0}.
        *
        * The `HorizontalAlignment` property is used for the horizontal alignment.
        */
        get titleHorizontalAlignment() {
            return this.i.be ? this.i.be.horizontalAlignment : 0;
        }
        set titleHorizontalAlignment(v) {
            this.ensureTitleSettings();
            this.i.be.horizontalAlignment = ensureEnum(HorizontalAlignment_$type, v);
        }
        /**
         * Gets or sets the vertical alignment of the {0}.
        *
        * The `VerticalAlignment` property is used for the vertical alignment of the axis.
        */
        get titleVerticalAlignment() {
            return this.i.be ? this.i.be.verticalAlignment : 0;
        }
        set titleVerticalAlignment(v) {
            this.ensureTitleSettings();
            this.i.be.verticalAlignment = ensureEnum(VerticalAlignment_$type, v);
        }
        ensureTitleSettings() {
            if (this.i.be) {
                return;
            }
            this.i.be = new TitleSettings();
            this.i.be.location = this.i.a0();
            this.i.be.angle = this.i.d9();
            this.i.be.leftMargin = this.i.eb();
            this.i.be.rightMargin = this.i.ec();
            this.i.be.topMargin = this.i.ed();
            this.i.be.bottomMargin = this.i.ea();
            this.i.be.horizontalAlignment = this.i.jr();
            this.i.be.verticalAlignment = this.i.kk();
        }
        /**
         * Gets the current annotations for the axis.
        */
        get annotations() {
            if (this._annotations === null) {
                let coll = new IgxAxisAnnotationCollection();
                let innerColl = this.i.am;
                if (!innerColl) {
                    innerColl = new AxisAnnotationCollection_internal();
                }
                this._annotations = coll._fromInner(innerColl);
            }
            return this._annotations;
        }
        set annotations(v) {
            if (this._annotations !== null) {
                this._annotations._setSyncTarget(null);
                this._annotations = null;
            }
            let coll = new IgxAxisAnnotationCollection();
            this._annotations = coll._fromOuter(v);
            let syncColl = new SyncableObservableCollection$1(IAxisAnnotation_$type);
            let innerColl = this.i.am;
            if (!innerColl) {
                innerColl = new AxisAnnotationCollection_internal();
            }
            syncColl._inner = innerColl;
            syncColl.clear();
            this._annotations._setSyncTarget(syncColl);
        }
        /**
         * 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.
        *
        * The	`coercionMethods` methods is 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 reimported into the chart.
        */
        get coercionMethods() {
            return this.i.coercionMethods;
        }
        set coercionMethods(v) {
            this.i.coercionMethods = v;
        }
        /**
         * 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 expectFunctions() {
            return this.i.expectFunctions;
        }
        set expectFunctions(v) {
            this.i.expectFunctions = ensureBool(v);
        }
        /**
         * Gets or sets the axis label format string.
        *
        * The `label` property is used for label mapping of the axis labels.
        */
        get label() {
            return this.i.fz;
        }
        set label(v) {
            this.i.fz = v;
        }
        /**
         * Gets or sets the label format string to use for the label.
        */
        get labelFormat() {
            return this.i.gf;
        }
        set labelFormat(v) {
            this.i.gf = v;
        }
        /**
         * Gets or sets the format specifiers to use with the LabelFormat string.
        */
        get labelFormatSpecifiers() {
            return this.i.ag;
        }
        set labelFormatSpecifiers(v) {
            if (v && !Array.isArray(v) && typeof (v) == "string") {
                const re = /\s*(?:,|\s|$)\s*/gm;
                v = v.split(re);
            }
            this.i.ag = v;
        }
        findByName(name) {
            if (this.crossingAxis && this.crossingAxis.name && this.crossingAxis.name == name) {
                return this.crossingAxis;
            }
            if (this.annotations != null && this.annotations.findByName && this.annotations.findByName(name)) {
                return this.annotations.findByName(name);
            }
            if (this.labelFormatSpecifiers != null && arrayFindByName(this.labelFormatSpecifiers, name)) {
                return arrayFindByName(this.labelFormatSpecifiers, name);
            }
            return null;
        }
        get hasUserValues() {
            return this._hasUserValues;
        }
        __m(propertyName) {
            if (!this._inStyling) {
                this._hasUserValues.add(propertyName);
            }
        }
        _styling(container, component, parent) {
            if (this._inStyling) {
                return;
            }
            this._inStyling = true;
            this._stylingContainer = container;
            this._stylingParent = component;
            let genericPrefix = "";
            let typeName = this.i.$type.name;
            if (typeName.indexOf("Xam") === 0) {
                typeName = typeName.substring(3);
            }
            genericPrefix = toSpinal("AxisComponent");
            let additionalPrefixes = [];
            let prefix = toSpinal(typeName);
            additionalPrefixes.push(prefix + "-");
            let b = this.i.$type.baseType;
            while (b && b.name != "Object" &&
                b.name != "Base" &&
                b.name != "Control" &&
                b.Name != "DependencyObject" &&
                b.Name != "FrameworkElement") {
                typeName = b.name;
                if (typeName.indexOf("Xam") === 0) {
                    typeName = typeName.substring(3);
                }
                let basePrefix = toSpinal(typeName);
                additionalPrefixes.push(basePrefix + "-");
                b = b.baseType;
            }
            if (parent) {
                let parentTypeName = parent.i.$type.name;
                if (parentTypeName.indexOf("Xam") === 0) {
                    parentTypeName = parentTypeName.substring(3);
                }
                let parentPrefix = toSpinal(parentTypeName);
                additionalPrefixes.push(parentPrefix + "-" + genericPrefix + "-");
                additionalPrefixes.push(parentPrefix + "-" + prefix + "-");
            }
            initializePropertiesFromCss(container, this, genericPrefix + "-", this.hasUserValues, false, additionalPrefixes);
            if (this.crossingAxis && this.crossingAxis._styling) {
                this.crossingAxis._styling(container, component, this);
            }
            if (this._otherStyling) {
                this._otherStyling(container, component, parent);
            }
            this._inStyling = false;
        }
        /**
     * Renders the axis with no animation.
    
    */
        renderAxis() {
            this.i.h6();
        }
        /**
         * If using enhanced interval management and precise interval fitting, this will reset the cached maximum label width, and recalculate using the current labels.
        
        */
        resetCachedEnhancedInterval() {
            this.i.ia();
        }
        getItemValue(item, memberPathName) {
            let iv = this.i.fw(item, memberPathName);
            return (iv);
        }
        /**
         * Gets the label for a data item.
        
        * @param value  * The unscaled value to get a label for.
        */
        getValueLabel(value) {
            let iv = this.i.gc(value);
            return (iv);
        }
        /**
         * Scales a value from axis space into screen space.
        
        * @param unscaledValue  * The unscaled axis value to scale.
        */
        scaleValue(unscaledValue) {
            let iv = this.i.e3(unscaledValue);
            return (iv);
        }
        /**
         * Occurs when the axis range changes.
        */
        get rangeChanged() {
            if (this._rangeChanged == null) {
                this._rangeChanged = new EventEmitter();
                this.i.rangeChanged = delegateCombine(this.i.rangeChanged, (o, e) => {
                    this._runInZone(() => {
                        let outerArgs = new IgxAxisRangeChangedEventArgs();
                        outerArgs._provideImplementation(e);
                        if (this.beforeRangeChanged) {
                            this.beforeRangeChanged(this, outerArgs);
                        }
                        this._rangeChanged.emit({
                            sender: this,
                            args: outerArgs
                        });
                    });
                });
            }
            return this._rangeChanged;
        }
        /**
         * This event is raised every time a render has been requested from a series.
        */
        get renderRequested() {
            if (this._renderRequested == null) {
                this._renderRequested = new EventEmitter();
                this.i.renderRequested = delegateCombine(this.i.renderRequested, (o, e) => {
                    this._runInZone(() => {
                        let outerArgs = new IgxRenderRequestedEventArgs();
                        outerArgs._provideImplementation(e);
                        if (this.beforeRenderRequested) {
                            this.beforeRenderRequested(this, outerArgs);
                        }
                        this._renderRequested.emit({
                            sender: this,
                            args: outerArgs
                        });
                    });
                });
            }
            return this._renderRequested;
        }
        _runInZone(act) {
            if (this._zoneRunner != null) {
                this._zoneRunner(act);
            }
            else {
                act();
            }
        }
    }
    IgxAxisComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxAxisComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    IgxAxisComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: IgxAxisComponent, selector: "ng-component", inputs: { name: "name", formatLabel: "formatLabel", title: "title", stroke: "stroke", actualStroke: "actualStroke", strokeThickness: "strokeThickness", strip: "strip", majorStroke: "majorStroke", actualMajorStroke: "actualMajorStroke", majorStrokeThickness: "majorStrokeThickness", minorStroke: "minorStroke", actualMinorStroke: "actualMinorStroke", minorStrokeThickness: "minorStrokeThickness", tickStroke: "tickStroke", tickStrokeThickness: "tickStrokeThickness", tickLength: "tickLength", isDisabled: "isDisabled", isInverted: "isInverted", shouldAvoidAnnotationCollisions: "shouldAvoidAnnotationCollisions", shouldKeepAnnotationsInView: "shouldKeepAnnotationsInView", usePerLabelHeightMeasurement: "usePerLabelHeightMeasurement", useEnhancedIntervalManagement: "useEnhancedIntervalManagement", enhancedIntervalMinimumCharacters: "enhancedIntervalMinimumCharacters", enhancedIntervalPreferMoreCategoryLabels: "enhancedIntervalPreferMoreCategoryLabels", labelTextStyle: "labelTextStyle", labelTextColor: "labelTextColor", labelLocation: "labelLocation", labelVisibility: "labelVisibility", labelShowFirstLabel: "labelShowFirstLabel", labelAngle: "labelAngle", labelExtent: "labelExtent", labelLeftMargin: "labelLeftMargin", labelRightMargin: "labelRightMargin", labelTopMargin: "labelTopMargin", labelBottomMargin: "labelBottomMargin", labelHorizontalAlignment: "labelHorizontalAlignment", labelVerticalAlignment: "labelVerticalAlignment", crossingAxis: "crossingAxis", crossingValue: "crossingValue", titlePosition: "titlePosition", titleTextStyle: "titleTextStyle", titleTextColor: "titleTextColor", titleLocation: "titleLocation", titleVisibility: "titleVisibility", titleShowFirstLabel: "titleShowFirstLabel", titleAngle: "titleAngle", titleExtent: "titleExtent", titleLeftMargin: "titleLeftMargin", titleRightMargin: "titleRightMargin", titleTopMargin: "titleTopMargin", titleBottomMargin: "titleBottomMargin", titleHorizontalAlignment: "titleHorizontalAlignment", titleVerticalAlignment: "titleVerticalAlignment", annotations: "annotations", coercionMethods: "coercionMethods", expectFunctions: "expectFunctions", label: "label", labelFormat: "labelFormat", labelFormatSpecifiers: "labelFormatSpecifiers" }, outputs: { rangeChanged: "rangeChanged", renderRequested: "renderRequested" }, ngImport: i0, template: ``, isInline: true });
    return IgxAxisComponent;
})();
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxAxisComponent, decorators: [{
            type: Component,
            args: [{
                    template: ``,
                }]
        }], ctorParameters: function () { return []; }, propDecorators: { name: [{
                type: Input
            }], formatLabel: [{
                type: Input
            }], title: [{
                type: Input
            }], stroke: [{
                type: Input
            }], actualStroke: [{
                type: Input
            }], strokeThickness: [{
                type: Input
            }], strip: [{
                type: Input
            }], majorStroke: [{
                type: Input
            }], actualMajorStroke: [{
                type: Input
            }], majorStrokeThickness: [{
                type: Input
            }], minorStroke: [{
                type: Input
            }], actualMinorStroke: [{
                type: Input
            }], minorStrokeThickness: [{
                type: Input
            }], tickStroke: [{
                type: Input
            }], tickStrokeThickness: [{
                type: Input
            }], tickLength: [{
                type: Input
            }], isDisabled: [{
                type: Input
            }], isInverted: [{
                type: Input
            }], shouldAvoidAnnotationCollisions: [{
                type: Input
            }], shouldKeepAnnotationsInView: [{
                type: Input
            }], usePerLabelHeightMeasurement: [{
                type: Input
            }], useEnhancedIntervalManagement: [{
                type: Input
            }], enhancedIntervalMinimumCharacters: [{
                type: Input
            }], enhancedIntervalPreferMoreCategoryLabels: [{
                type: Input
            }], labelTextStyle: [{
                type: Input
            }], labelTextColor: [{
                type: Input
            }], labelLocation: [{
                type: Input
            }], labelVisibility: [{
                type: Input
            }], labelShowFirstLabel: [{
                type: Input
            }], labelAngle: [{
                type: Input
            }], labelExtent: [{
                type: Input
            }], labelLeftMargin: [{
                type: Input
            }], labelRightMargin: [{
                type: Input
            }], labelTopMargin: [{
                type: Input
            }], labelBottomMargin: [{
                type: Input
            }], labelHorizontalAlignment: [{
                type: Input
            }], labelVerticalAlignment: [{
                type: Input
            }], crossingAxis: [{
                type: Input
            }], crossingValue: [{
                type: Input
            }], titlePosition: [{
                type: Input
            }], titleTextStyle: [{
                type: Input
            }], titleTextColor: [{
                type: Input
            }], titleLocation: [{
                type: Input
            }], titleVisibility: [{
                type: Input
            }], titleShowFirstLabel: [{
                type: Input
            }], titleAngle: [{
                type: Input
            }], titleExtent: [{
                type: Input
            }], titleLeftMargin: [{
                type: Input
            }], titleRightMargin: [{
                type: Input
            }], titleTopMargin: [{
                type: Input
            }], titleBottomMargin: [{
                type: Input
            }], titleHorizontalAlignment: [{
                type: Input
            }], titleVerticalAlignment: [{
                type: Input
            }], annotations: [{
                type: Input
            }], coercionMethods: [{
                type: Input
            }], expectFunctions: [{
                type: Input
            }], label: [{
                type: Input
            }], labelFormat: [{
                type: Input
            }], labelFormatSpecifiers: [{
                type: Input
            }], rangeChanged: [{
                type: Output
            }], renderRequested: [{
                type: Output
            }] } });
