import * as tslib_1 from "tslib";
import { IgrCategoryAxisBase } from "./igr-category-axis-base";
import { IgrNumericAxisBase } from "./igr-numeric-axis-base";
import { IgrFragmentBase } from "./igr-fragment-base";
import { ColumnFragment } from "./ColumnFragment";
import { toPoint, fromRect } from "igniteui-react-core";
/**
 * Represents one part of a StackedColumnSeries.
*/
var IgrColumnFragment = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(IgrColumnFragment, _super);
    function IgrColumnFragment(props) {
        return _super.call(this, props) || this;
    }
    IgrColumnFragment.prototype.createImplementation = function () {
        return new ColumnFragment();
    };
    Object.defineProperty(IgrColumnFragment.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrColumnFragment.prototype, "radiusX", {
        /**
         * Gets or sets the x-radius of the ellipse that is used to round the corners of the column.
        */
        get: function () {
            return this.i.tk;
        },
        set: function (v) {
            this.i.tk = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrColumnFragment.prototype, "radiusY", {
        /**
         * Gets or sets the y-radius of the ellipse that is used to round the corners of the column.
        */
        get: function () {
            return this.i.tl;
        },
        set: function (v) {
            this.i.tl = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrColumnFragment.prototype, "fragmentXAxis", {
        /**
         * Gets or sets the effective x-axis for this series.
        */
        get: function () {
            if (this.i.fragmentXAxis == null) {
                return null;
            }
            if (!this.i.fragmentXAxis.externalObject) {
                var e = IgrCategoryAxisBase._createFromInternal(this.i.fragmentXAxis);
                if (e) {
                    e._implementation = this.i.fragmentXAxis;
                }
                this.i.fragmentXAxis.externalObject = e;
            }
            return this.i.fragmentXAxis.externalObject;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrColumnFragment.prototype, "fragmentYAxis", {
        /**
         * Gets or sets the effective y-axis for this series.
        */
        get: function () {
            if (this.i.fragmentYAxis == null) {
                return null;
            }
            if (!this.i.fragmentYAxis.externalObject) {
                var e = IgrNumericAxisBase._createFromInternal(this.i.fragmentYAxis);
                if (e) {
                    e._implementation = this.i.fragmentYAxis;
                }
                this.i.fragmentYAxis.externalObject = e;
            }
            return this.i.fragmentYAxis.externalObject;
        },
        enumerable: true,
        configurable: true
    });
    IgrColumnFragment.prototype._styling = function (container, component, parent) {
        _super.prototype._styling.call(this, 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
    */
    IgrColumnFragment.prototype.getSeriesValueBoundingBox = function (world) {
        var iv = this.i.n2(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.
    */
    IgrColumnFragment.prototype.getItem = function (world) {
        var iv = this.i.gq(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.
    */
    IgrColumnFragment.prototype.getItemIndex = function (world) {
        var iv = this.i.f9(toPoint(world));
        return (iv);
    };
    return IgrColumnFragment;
}(IgrFragmentBase));
export { IgrColumnFragment };
//# sourceMappingURL=igr-column-fragment.js.map
