/*
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 { __extends } from "tslib";
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
 */
var FunnelLegendTemplates = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(FunnelLegendTemplates, _super);
    function FunnelLegendTemplates() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    FunnelLegendTemplates.c = function (a) {
        var b = a.data;
        var c = b.series;
        var d = c.legendItemBadgeTemplate;
        var 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);
    };
    FunnelLegendTemplates.b = function (a) {
        var b = a.data;
        var c = a.context;
        if (b.itemBrush != null) {
            b.actualItemBrush = b.itemBrush;
        }
        var d = new RenderingContext(new CanvasViewRenderer(), c);
        var e = b.thickness;
        if (isNaN_(e)) {
            e = 1;
        }
        var 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);
    };
    FunnelLegendTemplates.a = function (a) {
    };
    FunnelLegendTemplates.d = function (a) {
    };
    FunnelLegendTemplates.$t = markType(FunnelLegendTemplates, 'FunnelLegendTemplates');
    return FunnelLegendTemplates;
}(Base));
export { FunnelLegendTemplates };
