"use strict";
/*---------------------------------------------------------------------------------------------
 * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
 * See LICENSE.md in the project root for license terms and full copyright notice.
 *--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
 * @module Widget
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.getBadgeClassName = exports.WidgetPanelsTab = void 0;
const core_react_1 = require("@itwin/core-react");
const React = require("react");
const Tab_1 = require("../layout/widget/Tab");
const Content_1 = require("./Content");
require("./Tab.scss");
/** @internal */
function WidgetPanelsTab() {
    const widgetDef = (0, Content_1.useWidgetDef)();
    const badgeType = widgetDef?.badgeType;
    const badgeClassName = getBadgeClassName(badgeType);
    return (React.createElement(Tab_1.WidgetTab, { className: badgeClassName, badge: React.createElement(core_react_1.Badge, { type: badgeType }) }));
}
exports.WidgetPanelsTab = WidgetPanelsTab;
/** @internal */
function getBadgeClassName(badgeType) {
    if (badgeType === core_react_1.BadgeType.New)
        return "uifw-badge-new";
    else if (badgeType === core_react_1.BadgeType.TechnicalPreview)
        return "uifw-badge-tp";
    return undefined;
}
exports.getBadgeClassName = getBadgeClassName;
//# sourceMappingURL=Tab.js.map