/*
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";
import { isNaN_ } from "igniteui-angular-core";
/**
 * @hidden
 */
export let FunnelLegendTemplates = /*@__PURE__*/ (() => {
    class FunnelLegendTemplates extends Base {
        static c(a) {
            let b = a.data;
            let c = b.series;
            let d = c.legendItemBadgeTemplate;
            let e = b.itemLabel;
            if (e == null) {
                e = "Funnel Item";
            }
            LegendItemHelper.c(a.context, a.xPosition, a.yPosition, a.availableWidth, a.availableHeight, a.data, e.toString(), d, a.passInfo);
        }
        static b(a) {
            let b = a.data;
            let c = a.context;
            if (b.itemBrush != null) {
                b.actualItemBrush = b.itemBrush;
            }
            let d = new RenderingContext(new CanvasViewRenderer(), c);
            let e = b.thickness;
            if (isNaN_(e)) {
                e = 1;
            }
            let f = new Rectangle();
            f.width = a.availableWidth - (e * 2) - 2;
            f.height = a.availableHeight - (e * 2);
            f.n = e + 1;
            f.o = e;
            f.ac = e;
            f._fill = b.actualItemBrush;
            f._stroke = b.outline;
            d.v(f);
        }
        static a(a) {
        }
        static d(a) {
        }
    }
    FunnelLegendTemplates.$t = markType(FunnelLegendTemplates, 'FunnelLegendTemplates');
    return FunnelLegendTemplates;
})();
