import { IgxRingSeriesBaseComponent } from "./igx-ring-series-base-component";
import { Ring as Ring_internal } from "./Ring";
import { toSize, fromSize, fromPoint, toPoint } from "igniteui-angular-core";
/**
 * Represents data for Ring.RingControl element.
*/
export class IgxRing {
    createImplementation() {
        return new Ring_internal();
    }
    /**
     * @hidden
     */
    get i() {
        return this._implementation;
    }
    onImplementationCreated() {
    }
    constructor() {
        this._implementation = this.createImplementation();
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    }
    _provideImplementation(i) {
        this._implementation = i;
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    }
    /**
     * Gets the index of ring in the chart.
    */
    get index() {
        return this.i.j;
    }
    set index(v) {
        this.i.j = +v;
    }
    /**
     * Gets the inner extend of the ring in percentage.
    */
    get innerExtend() {
        return this.i.h;
    }
    set innerExtend(v) {
        this.i.h = +v;
    }
    /**
     * Gets the size of the ring.
    */
    get controlSize() {
        return fromSize(this.i.q);
    }
    set controlSize(v) {
        this.i.q = toSize(v);
    }
    /**
     * Gets the center point of the ring.
    */
    get center() {
        return fromPoint(this.i.p);
    }
    set center(v) {
        this.i.p = toPoint(v);
    }
    /**
     * Gets reference to ring series.
    */
    get ringSeries() {
        if (this.i.c == null) {
            return null;
        }
        if (!this.i.c.externalObject) {
            let e = IgxRingSeriesBaseComponent._createFromInternal(this.i.c);
            if (e) {
                e._implementation = this.i.c;
            }
            this.i.c.externalObject = e;
        }
        return this.i.c.externalObject;
    }
    set ringSeries(v) {
        v == null ? this.i.c = null : this.i.c = v.i;
    }
    /**
     * Gets the ring breadth.
    */
    get ringBreadth() {
        return this.i.i;
    }
    set ringBreadth(v) {
        this.i.i = +v;
    }
    /**
     * Renders the arcs.
    
    */
    renderArcs() {
        let iv = this.i.f();
        return (iv);
    }
    /**
     * Prepares data needed to create Arcs.
    
    */
    prepareArcs() {
        this.i.o();
    }
}
//# sourceMappingURL=igx-ring.js.map