"use client";
import { jsxs as s, jsx as e } from "react/jsx-runtime";
import { BuilderConfiguration as c } from "../../../config/builder.config.js";
import { useAppDispatch as p } from "../../../hooks/use-app-dispatch.js";
import { useFrame as d } from "../../../hooks/use-frame.js";
import { duplicateTab as u, removeBlock as h } from "../../../store/builder-slice.js";
import { classNames as f } from "../../../utils/index.js";
import { memo as b, Suspense as x } from "react";
import { FiTrash2 as g } from "../../../../../../node_modules/.pnpm/react-icons@5.5.0_react@19.0.0/node_modules/react-icons/fi/index.js";
import { IoDuplicateOutline as v } from "../../../../../../node_modules/.pnpm/react-icons@5.5.0_react@19.0.0/node_modules/react-icons/io5/index.js";
const N = b(({ blockId: r, blockType: i }) => {
  const t = c.getBlock(i), { document: n } = d(), a = p(), l = (o) => {
    o.stopPropagation(), a(u({ blockId: r }));
  }, m = (o) => {
    o.stopPropagation(), a(h(r));
  };
  return n ? /* @__PURE__ */ s(
    "div",
    {
      className: f(
        "flex items-center gap-3 rounded-sm bg-slate-800 px-2 py-1 text-slate-300"
      ),
      children: [
        /* @__PURE__ */ s(
          "div",
          {
            role: "button",
            className: "flex items-center gap-1 bg-transparent text-slate-100 hover:bg-transparent hover:text-white",
            children: [
              /* @__PURE__ */ e(x, { fallback: null, children: t.icon && /* @__PURE__ */ e(t.icon, {}) }),
              /* @__PURE__ */ e("span", { className: "text-xs", children: t.label })
            ]
          }
        ),
        /* @__PURE__ */ e(
          "div",
          {
            role: "button",
            onClick: l,
            className: "rounded-tr text-slate-100 hover:bg-transparent hover:text-white",
            children: /* @__PURE__ */ e(v, { size: 16 })
          }
        ),
        /* @__PURE__ */ e(
          "div",
          {
            role: "button",
            onClick: m,
            className: "rounded-tr text-slate-100 hover:bg-transparent hover:text-white",
            children: /* @__PURE__ */ e(g, { size: 16 })
          }
        )
      ]
    }
  ) : null;
});
N.displayName = "TabsToolbar";
export {
  N as default
};
//# sourceMappingURL=tabs-toolbar.js.map
