import { Component, Input } from '@angular/core';
import { IgxNumericXAxisComponent } from "./igx-numeric-x-axis-component";
import { IgxCategoryYAxisComponent } from "./igx-category-y-axis-component";
import { IgxAnchoredCategorySeriesComponent } from "./igx-anchored-category-series-component";
import { toPoint, fromRect, fromPoint } from "igniteui-angular-core";
import * as i0 from "@angular/core";
/**
 * Represents a vertically laid out category based series.
*/
export let IgxVerticalAnchoredCategorySeriesComponent = /*@__PURE__*/ (() => {
    class IgxVerticalAnchoredCategorySeriesComponent extends IgxAnchoredCategorySeriesComponent {
        constructor() {
            super();
        }
        /**
                                     * @hidden
                                     */
        get i() {
            return this._implementation;
        }
        /**
         * Gets or sets the effective x-axis for the current CategorySeries object.
        */
        get xAxis() {
            const r = this.i.xAxis;
            if (r == null) {
                return null;
            }
            if (!r.externalObject) {
                let e = IgxNumericXAxisComponent._createFromInternal(r);
                if (e) {
                    e._implementation = r;
                }
                r.externalObject = e;
            }
            return r.externalObject;
        }
        set xAxis(v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.xAxis = null : this.i.xAxis = v.i;
        }
        /**
         * Gets or sets the effective y-axis for the current CategorySeries object.
        */
        get yAxis() {
            const r = this.i.yAxis;
            if (r == null) {
                return null;
            }
            if (!r.externalObject) {
                let e = IgxCategoryYAxisComponent._createFromInternal(r);
                if (e) {
                    e._implementation = r;
                }
                r.externalObject = e;
            }
            return r.externalObject;
        }
        set yAxis(v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.yAxis = null : this.i.yAxis = v.i;
        }
        /**
         * Gets whether or not the current series is vertical series
        */
        get isVertical() {
            return this.i.isVertical;
        }
        findByName(name) {
            var baseResult = super.findByName(name);
            if (baseResult) {
                return baseResult;
            }
            if (this.xAxis && this.xAxis.name && this.xAxis.name == name) {
                return this.xAxis;
            }
            if (this.yAxis && this.yAxis.name && this.yAxis.name == name) {
                return this.yAxis;
            }
            return null;
        }
        _styling(container, component, parent) {
            super._styling(container, component, parent);
            this._inStyling = true;
            if (this.xAxis && this.xAxis._styling) {
                this.xAxis._styling(container, component, this);
            }
            if (this.yAxis && this.yAxis._styling) {
                this.yAxis._styling(container, component, this);
            }
            this._inStyling = false;
        }
        /**
         * Returns the offset value for this series if grouped on a category axis.
        
        */
        getOffsetValue() {
            let iv = this.i.getOffsetValue();
            return (iv);
        }
        /**
         * Returns the width of the category grouping this series is in.
        
        */
        getCategoryWidth() {
            let iv = this.i.getCategoryWidth();
            return (iv);
        }
        getNextOrExactIndex(world, skipUnknowns) {
            let iv = this.i.hj(toPoint(world), skipUnknowns);
            return (iv);
        }
        getPreviousOrExactIndex(world, skipUnknowns) {
            let iv = this.i.hl(toPoint(world), skipUnknowns);
            return (iv);
        }
        /**
         * If possible, will return the best available value marker bounding box within the series that has the best value match for the world position provided.
        
        * @param world  * The world coordinates for which to get a value marker bounding box for
        */
        getSeriesValueMarkerBoundingBox(world) {
            let iv = this.i.p1(toPoint(world));
            return fromRect(iv);
        }
        getSeriesValue(world, useInterpolation, skipUnknowns) {
            let iv = this.i.gl(toPoint(world), useInterpolation, skipUnknowns);
            return (iv);
        }
        getSeriesValuePosition(world, useInterpolation, skipUnknowns) {
            let iv = this.i.pq(toPoint(world), useInterpolation, skipUnknowns);
            return fromPoint(iv);
        }
        /**
         * Gets the precise item index, if possible, based on the closeness to the previous or next whole integer. If the series cannot provide this information, GetExactItemIndex will return the same integer value as GetItemIndex.
        
        * @param world  * The world position for which to return the index.
        */
        getExactItemIndex(world) {
            let iv = this.i.f7(toPoint(world));
            return (iv);
        }
        /**
         * Gets the index of the item that resides at the provided world coordinates.
        
        * @param world  * The world coordinates of the requested item.
        */
        getItemIndex(world) {
            let iv = this.i.hf(toPoint(world));
            return (iv);
        }
        /**
         * Gets the item that is the best match for the specified world coordinates.
        
        * @param world  * The world coordinates to use.
        */
        getItem(world) {
            let iv = this.i.hv(toPoint(world));
            return (iv);
        }
        /**
         * Determine if object can be used as YAxis
        
        * @param axis  * The object to check
        */
        canUseAsYAxis(axis) {
            let iv = this.i.ux(axis);
            return (iv);
        }
        /**
         * Determine if object can be used as XAxis
        
        * @param axis  * The object to check
        */
        canUseAsXAxis(axis) {
            let iv = this.i.uw(axis);
            return (iv);
        }
    }
    IgxVerticalAnchoredCategorySeriesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxVerticalAnchoredCategorySeriesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    IgxVerticalAnchoredCategorySeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: IgxVerticalAnchoredCategorySeriesComponent, selector: "ng-component", inputs: { xAxis: "xAxis", yAxis: "yAxis" }, usesInheritance: true, ngImport: i0, template: ``, isInline: true });
    return IgxVerticalAnchoredCategorySeriesComponent;
})();
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxVerticalAnchoredCategorySeriesComponent, decorators: [{
            type: Component,
            args: [{
                    template: ``,
                }]
        }], ctorParameters: function () { return []; }, propDecorators: { xAxis: [{
                type: Input
            }], yAxis: [{
                type: Input
            }] } });
