"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.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");
/** @internal */
function WidgetPanelsTab() {
    const widgetDef = (0, Content_1.useWidgetDef)();
    // eslint-disable-next-line deprecation/deprecation
    const iconSpec = widgetDef?.initialConfig?.icon;
    const icon = widgetDef?.initialConfig?.iconNode ??
        (iconSpec ? (
        // eslint-disable-next-line deprecation/deprecation
        React.createElement(core_react_1.Icon, { iconSpec: iconSpec })) : undefined);
    return (React.createElement(Tab_1.WidgetTab
    // eslint-disable-next-line deprecation/deprecation
    , { 
        // eslint-disable-next-line deprecation/deprecation
        badge: React.createElement(core_react_1.Badge, { type: widgetDef?.badgeKind || widgetDef?.badgeType }), icon: icon }));
}
exports.WidgetPanelsTab = WidgetPanelsTab;
//# sourceMappingURL=Tab.js.map