/*
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 { Base, markType } from "igniteui-angular-core";
import { LegendItemHelper } from "igniteui-angular-core";
import { RenderingContext } from "igniteui-angular-core";
import { Rectangle } from "igniteui-angular-core";
import { CanvasViewRenderer } from "igniteui-angular-core";
/**
 * @hidden
 */
export let PieLegendTemplates = /*@__PURE__*/ (() => {
    class PieLegendTemplates extends Base {
        static f(a) {
            let b = a.data;
            let c = b.series;
            let d = c.legendItemBadgeTemplate;
            let 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);
        }
        static c(a) {
            let b = a.data;
            let c = b.series;
            let d = c.legendItemBadgeTemplate;
            let 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);
        }
        static a(a) {
        }
        static d(a) {
        }
        static e(a) {
            let b = a.data;
            let c = a.context;
            let d = new RenderingContext(new CanvasViewRenderer(), c);
            let e = b.series;
            let f = b.itemBrush;
            let g = b.outline;
            let h = b.thickness;
            let 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);
        }
        static b(a) {
            let b = a.data;
            let c = a.context;
            let d = new RenderingContext(new CanvasViewRenderer(), c);
            let e = b.itemBrush;
            let f = b.outline;
            let g = b.thickness;
            let 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;
})();
