/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import * as tslib_1 from "tslib";
import { Base, markType } from "igniteui-react-core/ES5/type";
import { LegendItemHelper } from "igniteui-react-core/ES5/LegendItemHelper";
import { RenderingContext } from "igniteui-react-core/ES5/RenderingContext";
import { Rectangle } from "igniteui-react-core/ES5/Rectangle";
import { CanvasViewRenderer } from "igniteui-react-core/ES5/CanvasViewRenderer";
/**
 * @hidden
 */
var PieLegendTemplates = /** @class */ (function (_super) {
    tslib_1.__extends(PieLegendTemplates, _super);
    function PieLegendTemplates() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    PieLegendTemplates.f = function (a) {
        var b = a.data;
        var c = b.series;
        var d = c.legendItemBadgeTemplate;
        var e = b.legendLabel != null ? b.legendLabel : b.itemLabel;
        if (e == null) {
            e = "Pie Item";
        }
        LegendItemHelper.c(a.context, a.xPosition, a.yPosition, a.availableWidth, a.availableHeight, a.data, e.toString(), d, a.passInfo);
    };
    PieLegendTemplates.c = function (a) {
        var b = a.data;
        var c = b.series;
        var d = c.legendItemBadgeTemplate;
        var e = b.legendLabel != null ? b.legendLabel : b.itemLabel;
        if (e == null) {
            e = "Doughnut Item";
        }
        LegendItemHelper.c(a.context, a.xPosition, a.yPosition, a.availableWidth, a.availableHeight, a.data, e.toString(), d, a.passInfo);
    };
    PieLegendTemplates.a = function (a) {
    };
    PieLegendTemplates.d = function (a) {
    };
    PieLegendTemplates.e = function (a) {
        var b = a.data;
        var c = a.context;
        var d = new RenderingContext(new CanvasViewRenderer(), c);
        var e = b.series;
        var f = b.itemBrush;
        var g = b.outline;
        var h = b.thickness;
        var i = new Rectangle();
        i.width = a.availableWidth - (h * 2) - 2;
        i.height = a.availableHeight - (h * 2);
        i.n = h + 1;
        i.o = h;
        i.ac = h;
        i._fill = f;
        i._stroke = g;
        d.v(i);
    };
    PieLegendTemplates.b = function (a) {
        var b = a.data;
        var c = a.context;
        var d = new RenderingContext(new CanvasViewRenderer(), c);
        var e = b.itemBrush;
        var f = b.outline;
        var g = b.thickness;
        var h = new Rectangle();
        h.width = a.availableWidth - (g * 2) - 2;
        h.height = a.availableHeight - (g * 2);
        h.n = g + 1;
        h.o = g;
        h.ac = g;
        h._fill = e;
        h._stroke = f;
        d.v(h);
    };
    PieLegendTemplates.$t = markType(PieLegendTemplates, 'PieLegendTemplates');
    return PieLegendTemplates;
}(Base));
export { PieLegendTemplates };
