import { __extends } from "tslib";
import { Component, forwardRef, ChangeDetectionStrategy } from '@angular/core';
import { IgxNumericXAxisComponent } from "./igx-numeric-x-axis-component";
import { IgxCategoryYAxisComponent } from "./igx-category-y-axis-component";
import { IgxColumnFragmentComponent } from "./igx-column-fragment-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 { BarFragment } from "./BarFragment";
import { toPoint, fromRect } from "igniteui-angular-core";
import * as i0 from "@angular/core";
/**
 * Represents one part of a StackedBarSeries.
*/
var IgxBarFragmentComponent = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(IgxBarFragmentComponent, _super);
    function IgxBarFragmentComponent() {
        return _super.call(this) || this;
    }
    IgxBarFragmentComponent.prototype.createImplementation = function () {
        return new BarFragment();
    };
    Object.defineProperty(IgxBarFragmentComponent.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxBarFragmentComponent.prototype, "isBar", {
        /**
         * Gets whether the current series shows a bar shape.
        */
        get: function () {
            return this.i.dg;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxBarFragmentComponent.prototype, "isMarkerlessDisplayPreferred", {
        /**
         * Overridden by derived series classes to indicate when marker-less display is preferred or not.
        */
        get: function () {
            return this.i.d3;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxBarFragmentComponent.prototype, "isColumn", {
        /**
         * Gets whether the current series shows a column shape.
        */
        get: function () {
            return this.i.di;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxBarFragmentComponent.prototype, "barFragmentXAxis", {
        /**
         * The X-Axis for this BarFragment.
        */
        get: function () {
            var r = this.i.barFragmentXAxis;
            if (r == null) {
                return null;
            }
            if (!r.externalObject) {
                var e = IgxNumericXAxisComponent._createFromInternal(r);
                if (e) {
                    e._implementation = r;
                }
                r.externalObject = e;
            }
            return r.externalObject;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxBarFragmentComponent.prototype, "barFragmentYAxis", {
        /**
         * The Y-Axis for this BarFragment.
        */
        get: function () {
            var r = this.i.barFragmentYAxis;
            if (r == null) {
                return null;
            }
            if (!r.externalObject) {
                var e = IgxCategoryYAxisComponent._createFromInternal(r);
                if (e) {
                    e._implementation = r;
                }
                r.externalObject = e;
            }
            return r.externalObject;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxBarFragmentComponent.prototype, "isVertical", {
        get: function () {
            return this.i.isVertical;
        },
        enumerable: false,
        configurable: true
    });
    IgxBarFragmentComponent.prototype._styling = function (container, component, parent) {
        _super.prototype._styling.call(this, container, component, parent);
        this._inStyling = true;
        if (this.barFragmentXAxis && this.barFragmentXAxis._styling) {
            this.barFragmentXAxis._styling(container, component, this);
        }
        if (this.barFragmentYAxis && this.barFragmentYAxis._styling) {
            this.barFragmentYAxis._styling(container, component, this);
        }
        this._inStyling = false;
    };
    /**
     * 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.
    */
    IgxBarFragmentComponent.prototype.getExactItemIndex = function (world) {
        var iv = this.i.f7(toPoint(world));
        return (iv);
    };
    /**
     * 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
    */
    IgxBarFragmentComponent.prototype.getSeriesValueBoundingBox = function (world) {
        var 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.
    */
    IgxBarFragmentComponent.prototype.getItem = function (world) {
        var iv = this.i.hv(toPoint(world));
        return (iv);
    };
    IgxBarFragmentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxBarFragmentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    IgxBarFragmentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: IgxBarFragmentComponent, selector: "igx-bar-fragment", providers: [{ provide: IgxColumnFragmentComponent, useExisting: forwardRef(function () { return IgxBarFragmentComponent; }) }, { provide: IgxFragmentBaseComponent, useExisting: forwardRef(function () { return IgxBarFragmentComponent; }) }, { provide: IgxHorizontalAnchoredCategorySeriesComponent, useExisting: forwardRef(function () { return IgxBarFragmentComponent; }) }, { provide: IgxAnchoredCategorySeriesComponent, useExisting: forwardRef(function () { return IgxBarFragmentComponent; }) }, { provide: IgxCategorySeriesComponent, useExisting: forwardRef(function () { return IgxBarFragmentComponent; }) }, { provide: IgxMarkerSeriesComponent, useExisting: forwardRef(function () { return IgxBarFragmentComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxBarFragmentComponent; }) }], usesInheritance: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
    return IgxBarFragmentComponent;
}(IgxColumnFragmentComponent));
export { IgxBarFragmentComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxBarFragmentComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'igx-bar-fragment',
                    template: "",
                    providers: [{ provide: IgxColumnFragmentComponent, useExisting: forwardRef(function () { return IgxBarFragmentComponent; }) }, { provide: IgxFragmentBaseComponent, useExisting: forwardRef(function () { return IgxBarFragmentComponent; }) }, { provide: IgxHorizontalAnchoredCategorySeriesComponent, useExisting: forwardRef(function () { return IgxBarFragmentComponent; }) }, { provide: IgxAnchoredCategorySeriesComponent, useExisting: forwardRef(function () { return IgxBarFragmentComponent; }) }, { provide: IgxCategorySeriesComponent, useExisting: forwardRef(function () { return IgxBarFragmentComponent; }) }, { provide: IgxMarkerSeriesComponent, useExisting: forwardRef(function () { return IgxBarFragmentComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxBarFragmentComponent; }) }],
                    changeDetection: ChangeDetectionStrategy.OnPush
                }]
        }], ctorParameters: function () { return []; } });
