import * as tslib_1 from "tslib";
import { DataContext } from "igniteui-react-core/ES5/igr-data-context";
import { PieSliceDataContext as PieSliceDataContext_internal } from "./PieSliceDataContext";
import { ensureBool } from "igniteui-react-core/ES5/componentUtil";
/**
 * DataContext for a pie slice.
*/
var PieSliceDataContext = /** @class */ (function (_super) {
    tslib_1.__extends(PieSliceDataContext, _super);
    function PieSliceDataContext() {
        return _super.call(this) || this;
    }
    PieSliceDataContext.prototype.createImplementation = function () {
        return new PieSliceDataContext_internal();
    };
    Object.defineProperty(PieSliceDataContext.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PieSliceDataContext.prototype, "percentValue", {
        /**
         * Gets or sets the value of this slice as a percentage of the total pie.
        */
        get: function () {
            return this.i.percentValue;
        },
        set: function (v) {
            this.i.percentValue = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PieSliceDataContext.prototype, "isOthersSlice", {
        /**
         * Gets or sets whether this slice is an Others slice or not.
        */
        get: function () {
            return this.i.isOthersSlice;
        },
        set: function (v) {
            this.i.isOthersSlice = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    return PieSliceDataContext;
}(DataContext));
export { PieSliceDataContext };
