import * as tslib_1 from "tslib";
var IgxBarFragmentComponent_1;
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/ES2015/componentUtil";
/**
 * Represents one part of a StackedBarSeries.
*/
export const IgxBarFragmentComponent_PROVIDERS = [{ provide: IgxColumnFragmentComponent, useExisting: forwardRef(() => IgxBarFragmentComponent) }, { provide: IgxFragmentBaseComponent, useExisting: forwardRef(() => IgxBarFragmentComponent) }, { provide: IgxHorizontalAnchoredCategorySeriesComponent, useExisting: forwardRef(() => IgxBarFragmentComponent) }, { provide: IgxAnchoredCategorySeriesComponent, useExisting: forwardRef(() => IgxBarFragmentComponent) }, { provide: IgxCategorySeriesComponent, useExisting: forwardRef(() => IgxBarFragmentComponent) }, { provide: IgxMarkerSeriesComponent, useExisting: forwardRef(() => IgxBarFragmentComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxBarFragmentComponent) }];
let IgxBarFragmentComponent = IgxBarFragmentComponent_1 = class IgxBarFragmentComponent extends IgxColumnFragmentComponent {
    constructor() {
        super();
    }
    createImplementation() {
        return new BarFragment();
    }
    get i() {
        return this._implementation;
    }
    /**
     * The X-Axis for this BarFragment.
    */
    get barFragmentXAxis() {
        if (this.i.barFragmentXAxis == null) {
            return null;
        }
        if (!this.i.barFragmentXAxis.externalObject) {
            let e = new IgxNumericXAxisComponent();
            e._implementation = this.i.barFragmentXAxis;
            this.i.barFragmentXAxis.externalObject = e;
        }
        return this.i.barFragmentXAxis.externalObject;
    }
    /**
     * The Y-Axis for this BarFragment.
    */
    get barFragmentYAxis() {
        if (this.i.barFragmentYAxis == null) {
            return null;
        }
        if (!this.i.barFragmentYAxis.externalObject) {
            let e = new IgxCategoryYAxisComponent();
            e._implementation = this.i.barFragmentYAxis;
            this.i.barFragmentYAxis.externalObject = e;
        }
        return this.i.barFragmentYAxis.externalObject;
    }
    /**
     * 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.d8(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
    */
    getSeriesValueBoundingBox(world) {
        let iv = this.i.lm(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.fm(toPoint(world));
        return (iv);
    }
};
IgxBarFragmentComponent = IgxBarFragmentComponent_1 = tslib_1.__decorate([
    Component({
        selector: 'igx-bar-fragment',
        template: ``,
        providers: [{ provide: IgxColumnFragmentComponent, useExisting: forwardRef(() => IgxBarFragmentComponent_1) }, { provide: IgxFragmentBaseComponent, useExisting: forwardRef(() => IgxBarFragmentComponent_1) }, { provide: IgxHorizontalAnchoredCategorySeriesComponent, useExisting: forwardRef(() => IgxBarFragmentComponent_1) }, { provide: IgxAnchoredCategorySeriesComponent, useExisting: forwardRef(() => IgxBarFragmentComponent_1) }, { provide: IgxCategorySeriesComponent, useExisting: forwardRef(() => IgxBarFragmentComponent_1) }, { provide: IgxMarkerSeriesComponent, useExisting: forwardRef(() => IgxBarFragmentComponent_1) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxBarFragmentComponent_1) }],
        changeDetection: ChangeDetectionStrategy.OnPush
    }),
    tslib_1.__metadata("design:paramtypes", [])
], IgxBarFragmentComponent);
export { IgxBarFragmentComponent };
//# sourceMappingURL=igx-bar-fragment-component.js.map