import { __extends } from "tslib";
import { EventEmitter, Output, Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core';
import { delegateCombine } from "igniteui-angular-core";
import { IgxCategoryAxisBaseComponent } from "./igx-category-axis-base-component";
import { IgxAxisComponent } from "./igx-axis-component";
import { CategoryYAxis } from "./CategoryYAxis";
import { toPoint, fromRect } from "igniteui-angular-core";
import * as i0 from "@angular/core";
/**
 * Represents a IgxDataChartComponent category Y axis.
*/
var IgxCategoryYAxisComponent = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(IgxCategoryYAxisComponent, _super);
    function IgxCategoryYAxisComponent() {
        var _this = _super.call(this) || this;
        _this._actualIntervalChange = null;
        _this._actualMinorIntervalChange = null;
        return _this;
    }
    IgxCategoryYAxisComponent.prototype.createImplementation = function () {
        return new CategoryYAxis();
    };
    Object.defineProperty(IgxCategoryYAxisComponent.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxCategoryYAxisComponent.prototype, "isVertical", {
        /**
         * Gets if the current axis is a vertical axis.
        */
        get: function () {
            return this.i.co;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxCategoryYAxisComponent.prototype, "interval", {
        /**
         * Gets or sets the frequency of displayed labels.
         * The set value is a factor that determines which labels will be hidden. For example, an interval of 2 will display every other label.
        */
        get: function () {
            return this.i.mn;
        },
        set: function (v) {
            this.i.mn = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxCategoryYAxisComponent.prototype, "actualInterval", {
        /**
         * Gets the effective value for the current Interval.
        */
        get: function () {
            return this.i.mk;
        },
        set: function (v) {
            this.i.mk = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxCategoryYAxisComponent.prototype, "minorInterval", {
        /**
         * Gets or sets the frequency of displayed minor lines.
         * The set value is a factor that determines how the minor lines will be displayed.
        */
        get: function () {
            return this.i.mo;
        },
        set: function (v) {
            this.i.mo = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxCategoryYAxisComponent.prototype, "actualMinorInterval", {
        /**
         * Gets the effective value for the current MinorInterval.
        */
        get: function () {
            return this.i.ml;
        },
        set: function (v) {
            this.i.ml = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxCategoryYAxisComponent.prototype, "zoomMaximumCategoryRange", {
        /**
         * Gets or sets number of visible categories at maximum zooming level
         * This property is overridden by chart's WindowRectMinWidth property
        */
        get: function () {
            return this.i.zoomMaximumCategoryRange;
        },
        set: function (v) {
            this.i.zoomMaximumCategoryRange = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxCategoryYAxisComponent.prototype, "zoomMaximumItemSpan", {
        /**
         * Gets or sets maximum pixel span of series item that will be visible at maximum zooming level
         * This property ensures that series item does not get stretch above specified value.
         * This property is overridden by chart's WindowRectMinWidth property
        */
        get: function () {
            return this.i.zoomMaximumItemSpan;
        },
        set: function (v) {
            this.i.zoomMaximumItemSpan = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxCategoryYAxisComponent.prototype, "zoomToCategoryRange", {
        /**
         * Gets or sets range of categories that the chart will zoom in and fill plot area
         * This property is overridden by chart's WindowRect or WindowScaleHorizontal properties
        */
        get: function () {
            return this.i.zoomToCategoryRange;
        },
        set: function (v) {
            this.i.zoomToCategoryRange = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxCategoryYAxisComponent.prototype, "zoomToCategoryStart", {
        /**
         * Gets or sets starting category that chart will move its zoom window. Acceptable value is between 0 and number of data items
         * This property is overridden by chart's WindowRect or WindowScaleHorizontal properties
        */
        get: function () {
            return this.i.zoomToCategoryStart;
        },
        set: function (v) {
            this.i.zoomToCategoryStart = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxCategoryYAxisComponent.prototype, "zoomToItemSpan", {
        /**
         * Gets or sets pixel span of series item that will be used to zoom chart such that the item has desired span
         * Chart will automaticlly zoom in until series item has specified pixel span.
         * This property is overridden by chart's WindowRect or WindowScaleHorizontal properties
        */
        get: function () {
            return this.i.zoomToItemSpan;
        },
        set: function (v) {
            this.i.zoomToItemSpan = +v;
        },
        enumerable: false,
        configurable: true
    });
    IgxCategoryYAxisComponent.prototype.getCategoryBoundingBox = function (point, useInterpolation, singularWidth) {
        var iv = this.i.md(toPoint(point), useInterpolation, singularWidth);
        return fromRect(iv);
    };
    IgxCategoryYAxisComponent.prototype.scrollRangeIntoView = function (minimum, maximum) {
        this.i.m3(minimum, maximum);
    };
    /**
     * Scrolls the specified item into view.
    
    * @param item  * Data item to scroll into view
    */
    IgxCategoryYAxisComponent.prototype.scrollIntoView = function (item) {
        this.i.m2(item);
    };
    /**
     * Gets window zoom scale required to zoom to specified number of categories
    
    */
    IgxCategoryYAxisComponent.prototype.getWindowZoomFromCategories = function (categoriesCount) {
        var iv = this.i.getWindowZoomFromCategories(categoriesCount);
        return (iv);
    };
    /**
     * Gets window zoom scale required to zoom to specified span of series item
    
    */
    IgxCategoryYAxisComponent.prototype.getWindowZoomFromItemSpan = function (pixels) {
        var iv = this.i.getWindowZoomFromItemSpan(pixels);
        return (iv);
    };
    Object.defineProperty(IgxCategoryYAxisComponent.prototype, "actualIntervalChange", {
        get: function () {
            var _this = this;
            if (this._actualIntervalChange == null) {
                this._actualIntervalChange = new EventEmitter();
                this.i.propertyChanged = delegateCombine(this.i.propertyChanged, function (o, e) {
                    var iv = e;
                    var ext = _this.actualInterval;
                    if (_this.beforeActualIntervalChange) {
                        _this.beforeActualIntervalChange(_this, ext);
                    }
                    _this._actualIntervalChange.emit(ext);
                });
            }
            return this._actualIntervalChange;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxCategoryYAxisComponent.prototype, "actualMinorIntervalChange", {
        get: function () {
            var _this = this;
            if (this._actualMinorIntervalChange == null) {
                this._actualMinorIntervalChange = new EventEmitter();
                this.i.propertyChanged = delegateCombine(this.i.propertyChanged, function (o, e) {
                    var iv = e;
                    var ext = _this.actualMinorInterval;
                    if (_this.beforeActualMinorIntervalChange) {
                        _this.beforeActualMinorIntervalChange(_this, ext);
                    }
                    _this._actualMinorIntervalChange.emit(ext);
                });
            }
            return this._actualMinorIntervalChange;
        },
        enumerable: false,
        configurable: true
    });
    IgxCategoryYAxisComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxCategoryYAxisComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    IgxCategoryYAxisComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxCategoryYAxisComponent, selector: "igx-category-y-axis", inputs: { interval: "interval", actualInterval: "actualInterval", minorInterval: "minorInterval", actualMinorInterval: "actualMinorInterval", zoomMaximumCategoryRange: "zoomMaximumCategoryRange", zoomMaximumItemSpan: "zoomMaximumItemSpan", zoomToCategoryRange: "zoomToCategoryRange", zoomToCategoryStart: "zoomToCategoryStart", zoomToItemSpan: "zoomToItemSpan" }, outputs: { actualIntervalChange: "actualIntervalChange", actualMinorIntervalChange: "actualMinorIntervalChange" }, providers: [{ provide: IgxCategoryAxisBaseComponent, useExisting: forwardRef(function () { return IgxCategoryYAxisComponent; }) }, { provide: IgxAxisComponent, useExisting: forwardRef(function () { return IgxCategoryYAxisComponent; }) }], usesInheritance: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
    return IgxCategoryYAxisComponent;
}(IgxCategoryAxisBaseComponent));
export { IgxCategoryYAxisComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxCategoryYAxisComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'igx-category-y-axis',
                    template: "",
                    providers: [{ provide: IgxCategoryAxisBaseComponent, useExisting: forwardRef(function () { return IgxCategoryYAxisComponent; }) }, { provide: IgxAxisComponent, useExisting: forwardRef(function () { return IgxCategoryYAxisComponent; }) }],
                    changeDetection: ChangeDetectionStrategy.OnPush
                }]
        }], ctorParameters: function () { return []; }, propDecorators: { interval: [{
                type: Input
            }], actualInterval: [{
                type: Input
            }], minorInterval: [{
                type: Input
            }], actualMinorInterval: [{
                type: Input
            }], zoomMaximumCategoryRange: [{
                type: Input
            }], zoomMaximumItemSpan: [{
                type: Input
            }], zoomToCategoryRange: [{
                type: Input
            }], zoomToCategoryStart: [{
                type: Input
            }], zoomToItemSpan: [{
                type: Input
            }], actualIntervalChange: [{
                type: Output
            }], actualMinorIntervalChange: [{
                type: Output
            }] } });
