"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TreeItemOverlay = TreeItemOverlay;
const jsx_runtime_1 = require("react/jsx-runtime");
const uikit_1 = require("@gravity-ui/uikit");
const components_1 = require("../../../components/index.js");
const utils_1 = require("../../utils/index.js");
const cn_1 = require("../../utils/cn.js");
const blocksBridge_1 = require("./utils/blocksBridge.js");
const b = (0, cn_1.editorCn)('tree-item');
function TreeItemOverlay({ block, count, indentLeft }) {
    const typeLabel = (0, blocksBridge_1.getBlockTypeLabel)(block);
    const treeTitle = (0, utils_1.getItemTitle)(block);
    return ((0, jsx_runtime_1.jsxs)(uikit_1.Card, { className: b({ overlay: true }), style: { marginLeft: indentLeft }, "data-overlay": true, children: [(0, jsx_runtime_1.jsx)("div", { className: b('main'), children: (0, jsx_runtime_1.jsxs)("div", { className: b('text'), children: [(0, jsx_runtime_1.jsx)("div", { className: b('type'), children: typeLabel }), (0, jsx_runtime_1.jsx)(components_1.HTML, { className: b('title'), children: treeTitle })] }) }), count > 0 ? (0, jsx_runtime_1.jsx)("span", { className: b('badge'), children: count }) : null] }));
}
//# sourceMappingURL=TreeItemOverlay.js.map
