import { delegateCombine, delegateRemove } from "igniteui-react-core";
import { IgrCategoryAxisBase } from "./igr-category-axis-base";
import { CategoryYAxis } from "./CategoryYAxis";
import { toPoint, fromRect } from "igniteui-react-core";
/**
 * Represents a IgxDataChartComponent category Y axis.
*/
export class IgrCategoryYAxis extends IgrCategoryAxisBase {
    constructor(props) {
        super(props);
        this._actualIntervalChange = null;
        this._actualIntervalChange_wrapped = null;
        this._actualMinorIntervalChange = null;
        this._actualMinorIntervalChange_wrapped = null;
    }
    createImplementation() {
        return new CategoryYAxis();
    }
    /**
                                 * @hidden
                                 */
    get i() {
        return this._implementation;
    }
    /**
     * Gets if the current axis is a vertical axis.
    */
    get isVertical() {
        return this.i.ch;
    }
    /**
     * 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 interval() {
        return this.i.lc;
    }
    set interval(v) {
        this.i.lc = +v;
    }
    /**
     * Gets the effective value for the current Interval.
    */
    get actualInterval() {
        return this.i.k9;
    }
    set actualInterval(v) {
        this.i.k9 = +v;
    }
    /**
     * 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 minorInterval() {
        return this.i.ld;
    }
    set minorInterval(v) {
        this.i.ld = +v;
    }
    /**
     * Gets the effective value for the current MinorInterval.
    */
    get actualMinorInterval() {
        return this.i.la;
    }
    set actualMinorInterval(v) {
        this.i.la = +v;
    }
    getCategoryBoundingBox(point, useInterpolation, singularWidth) {
        let iv = this.i.k3(toPoint(point), useInterpolation, singularWidth);
        return fromRect(iv);
    }
    scrollRangeIntoView(minimum, maximum) {
        this.i.ln(minimum, maximum);
    }
    /**
     * Scrolls the specified item into view.
    
    * @param item  * Data item to scroll into view
    */
    scrollIntoView(item) {
        this.i.lm(item);
    }
    get actualIntervalChange() {
        return this._actualIntervalChange;
    }
    set actualIntervalChange(ev) {
        if (this._actualIntervalChange_wrapped !== null) {
            this.i.propertyChanged = delegateRemove(this.i.propertyChanged, this._actualIntervalChange_wrapped);
            this._actualIntervalChange_wrapped = null;
            this._actualIntervalChange = null;
        }
        this._actualIntervalChange = ev;
        this._actualIntervalChange_wrapped = (o, e) => {
            let ext = this.actualInterval;
            if (this.beforeActualIntervalChange) {
                this.beforeActualIntervalChange(this, ext);
            }
            if (this._actualIntervalChange) {
                this._actualIntervalChange(this, ext);
            }
        };
        this.i.propertyChanged = delegateCombine(this.i.propertyChanged, this._actualIntervalChange_wrapped);
    }
    get actualMinorIntervalChange() {
        return this._actualMinorIntervalChange;
    }
    set actualMinorIntervalChange(ev) {
        if (this._actualMinorIntervalChange_wrapped !== null) {
            this.i.propertyChanged = delegateRemove(this.i.propertyChanged, this._actualMinorIntervalChange_wrapped);
            this._actualMinorIntervalChange_wrapped = null;
            this._actualMinorIntervalChange = null;
        }
        this._actualMinorIntervalChange = ev;
        this._actualMinorIntervalChange_wrapped = (o, e) => {
            let ext = this.actualMinorInterval;
            if (this.beforeActualMinorIntervalChange) {
                this.beforeActualMinorIntervalChange(this, ext);
            }
            if (this._actualMinorIntervalChange) {
                this._actualMinorIntervalChange(this, ext);
            }
        };
        this.i.propertyChanged = delegateCombine(this.i.propertyChanged, this._actualMinorIntervalChange_wrapped);
    }
}
//# sourceMappingURL=igr-category-y-axis.js.map
