import { Ring as Ring_internal } from "./Ring";
import { toSize, fromSize, fromPoint, toPoint } from "igniteui-react-core/ES5/componentUtil";
/**
 * Represents data for Ring.RingControl element.
*/
var Ring = /** @class */ (function () {
    function Ring() {
        this._implementation = this.createImplementation();
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    }
    Ring.prototype.createImplementation = function () {
        return new Ring_internal();
    };
    Object.defineProperty(Ring.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Ring.prototype.onImplementationCreated = function () {
    };
    Ring.prototype._provideImplementation = function (i) {
        this._implementation = i;
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    };
    Object.defineProperty(Ring.prototype, "index", {
        /**
         * Gets the index of ring in the chart.
        */
        get: function () {
            return this.i.j;
        },
        set: function (v) {
            this.i.j = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Ring.prototype, "innerExtend", {
        /**
         * Gets the inner extend of the ring in percentage.
        */
        get: function () {
            return this.i.h;
        },
        set: function (v) {
            this.i.h = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Ring.prototype, "controlSize", {
        /**
         * Gets the size of the ring.
        */
        get: function () {
            return fromSize(this.i.q);
        },
        set: function (v) {
            this.i.q = toSize(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Ring.prototype, "center", {
        /**
         * Gets the center point of the ring.
        */
        get: function () {
            return fromPoint(this.i.p);
        },
        set: function (v) {
            this.i.p = toPoint(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Ring.prototype, "ringSeries", {
        /**
         * Gets reference to ring series.
        */
        get: function () {
            if (this.i.c == null) {
                return null;
            }
            return this.i.c.externalObject;
        },
        set: function (v) {
            v == null ? this.i.c = null : this.i.c = v.i;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Ring.prototype, "ringBreadth", {
        /**
         * Gets the ring breadth.
        */
        get: function () {
            return this.i.i;
        },
        set: function (v) {
            this.i.i = +v;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Renders the arcs.
    
    */
    Ring.prototype.renderArcs = function () {
        var iv = this.i.f();
        return (iv);
    };
    /**
     * Prepares data needed to create Arcs.
    
    */
    Ring.prototype.prepareArcs = function () {
        this.i.o();
    };
    return Ring;
}());
export { Ring };
