import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core';
import { IgxCategoryAxisBaseComponent } from "./igx-category-axis-base-component";
import { IgxNumericAxisBaseComponent } from "./igx-numeric-axis-base-component";
import { IgxFragmentBaseComponent } from "./igx-fragment-base-component";
import { IgxHorizontalAnchoredCategorySeriesComponent } from "./igx-horizontal-anchored-category-series-component";
import { IgxAnchoredCategorySeriesComponent } from "./igx-anchored-category-series-component";
import { IgxCategorySeriesComponent } from "./igx-category-series-component";
import { IgxMarkerSeriesComponent } from "./igx-marker-series-component";
import { IgxSeriesComponent } from "./igx-series-component";
import { ColumnFragment } from "./ColumnFragment";
import { toPoint, fromRect } from "igniteui-angular-core";
import * as i0 from "@angular/core";
/**
 * Represents one part of a StackedColumnSeries.
*/
export let IgxColumnFragmentComponent = /*@__PURE__*/ (() => {
    class IgxColumnFragmentComponent extends IgxFragmentBaseComponent {
        constructor() {
            super();
        }
        createImplementation() {
            return new ColumnFragment();
        }
        /**
                                     * @hidden
                                     */
        get i() {
            return this._implementation;
        }
        /**
         * Gets whether the current series shows a column shape.
        */
        get isColumn() {
            return this.i.di;
        }
        /**
         * Overridden by derived series classes to indicate when marker-less display is preferred or not.
        */
        get isMarkerlessDisplayPreferred() {
            return this.i.d3;
        }
        /**
         * Gets or sets the x-radius of the ellipse that is used to round the corners of the column.
        */
        get radiusX() {
            return this.i.vp;
        }
        set radiusX(v) {
            this.i.vp = +v;
        }
        /**
         * Gets or sets the y-radius of the ellipse that is used to round the corners of the column.
        */
        get radiusY() {
            return this.i.vq;
        }
        set radiusY(v) {
            this.i.vq = +v;
        }
        /**
         * Gets or sets the effective x-axis for this series.
        */
        get fragmentXAxis() {
            const r = this.i.fragmentXAxis;
            if (r == null) {
                return null;
            }
            if (!r.externalObject) {
                let e = IgxCategoryAxisBaseComponent._createFromInternal(r);
                if (e) {
                    e._implementation = r;
                }
                r.externalObject = e;
            }
            return r.externalObject;
        }
        /**
         * Gets or sets the effective y-axis for this series.
        */
        get fragmentYAxis() {
            const r = this.i.fragmentYAxis;
            if (r == null) {
                return null;
            }
            if (!r.externalObject) {
                let e = IgxNumericAxisBaseComponent._createFromInternal(r);
                if (e) {
                    e._implementation = r;
                }
                r.externalObject = e;
            }
            return r.externalObject;
        }
        _styling(container, component, parent) {
            super._styling(container, component, parent);
            this._inStyling = true;
            if (this.fragmentXAxis && this.fragmentXAxis._styling) {
                this.fragmentXAxis._styling(container, component, this);
            }
            if (this.fragmentYAxis && this.fragmentYAxis._styling) {
                this.fragmentYAxis._styling(container, component, this);
            }
            this._inStyling = false;
        }
        /**
         * If possible, will return the best available value bounding box within the series that has the best value match for the world position provided.
        
        * @param world  * The world coordinate for which to get a value bounding box for
        */
        getSeriesValueBoundingBox(world) {
            let iv = this.i.pz(toPoint(world));
            return fromRect(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);
        }
        /**
         * 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);
        }
    }
    IgxColumnFragmentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxColumnFragmentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    IgxColumnFragmentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: IgxColumnFragmentComponent, selector: "igx-column-fragment", inputs: { radiusX: "radiusX", radiusY: "radiusY" }, providers: [{ provide: IgxFragmentBaseComponent, useExisting: forwardRef(() => IgxColumnFragmentComponent) }, { provide: IgxHorizontalAnchoredCategorySeriesComponent, useExisting: forwardRef(() => IgxColumnFragmentComponent) }, { provide: IgxAnchoredCategorySeriesComponent, useExisting: forwardRef(() => IgxColumnFragmentComponent) }, { provide: IgxCategorySeriesComponent, useExisting: forwardRef(() => IgxColumnFragmentComponent) }, { provide: IgxMarkerSeriesComponent, useExisting: forwardRef(() => IgxColumnFragmentComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxColumnFragmentComponent) }], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
    return IgxColumnFragmentComponent;
})();
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxColumnFragmentComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'igx-column-fragment',
                    template: ``,
                    providers: [{ provide: IgxFragmentBaseComponent, useExisting: forwardRef(() => IgxColumnFragmentComponent) }, { provide: IgxHorizontalAnchoredCategorySeriesComponent, useExisting: forwardRef(() => IgxColumnFragmentComponent) }, { provide: IgxAnchoredCategorySeriesComponent, useExisting: forwardRef(() => IgxColumnFragmentComponent) }, { provide: IgxCategorySeriesComponent, useExisting: forwardRef(() => IgxColumnFragmentComponent) }, { provide: IgxMarkerSeriesComponent, useExisting: forwardRef(() => IgxColumnFragmentComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxColumnFragmentComponent) }],
                    changeDetection: ChangeDetectionStrategy.OnPush
                }]
        }], ctorParameters: function () { return []; }, propDecorators: { radiusX: [{
                type: Input
            }], radiusY: [{
                type: Input
            }] } });
