"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 Toolbar
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.toUIAToolbarItem = void 0;
const ToolbarItem_1 = require("./ToolbarItem");
/** @internal */
function toUIAToolbarItem(item) {
    if ((0, ToolbarItem_1.isToolbarCustomItem)(item)) {
        // eslint-disable-next-line deprecation/deprecation
        const customItem = {
            ...item,
            badgeType: item.badge,
            isCustom: true,
            icon: item.icon,
            panelContentNode: item.panelContent,
        };
        return customItem;
    }
    if ((0, ToolbarItem_1.isToolbarGroupItem)(item)) {
        return {
            ...item,
            items: item.items.map(toUIAToolbarItem),
            badgeType: item.badge,
        };
    }
    return {
        ...item,
        badgeType: item.badge,
    };
}
exports.toUIAToolbarItem = toUIAToolbarItem;
//# sourceMappingURL=toUIAToolbarItem.js.map