"use client";
import { j as r } from "./index.esm38.js";
import { useCallback as t } from "react";
import m from "./index.esm40.js";
import k from "./index.esm48.js";
import { Tag as u } from "./index.esm11.js";
const f = (o) => o.stopPropagation();
function d({ tag: o, baseTagProps: l }) {
  const c = t(
    (n) => {
      var i;
      f(n), (i = o.onClick) == null || i.call(o, n);
    },
    [o.onClick]
  ), e = t(
    (n) => {
      var i;
      (n.key === "Enter" || n.key === " ") && (n.preventDefault(), (i = o.onClick) == null || i.call(o, n));
    },
    [o.onClick]
  );
  return /* @__PURE__ */ r.jsx(
    u,
    {
      ...l,
      role: "button",
      tabIndex: 0,
      onClick: c,
      onKeyDown: e,
      className: m(k.tagInteractive, l == null ? void 0 : l.className),
      children: o.label
    }
  );
}
export {
  d as TagGroupItemButton
};
//# sourceMappingURL=index.esm94.js.map
