import { jsxs as i, jsx as l } from "react/jsx-runtime";
import { useCallback as a } from "react";
import s from "../../../box/Box.js";
import r from "../../../button/Button.js";
import u from "../../../icon/Icon.js";
const t = ({ selectedTable: b, onAction: e }) => {
  const d = a(() => {
    e == null || e("addColumnAfter");
  }, [e]), m = a(() => {
    e == null || e("addRowAfter");
  }, [e]), h = a(() => {
    e == null || e("mergeCells");
  }, [e]), g = a(() => {
    e == null || e("splitCell");
  }, [e]), p = a(() => {
    e == null || e("deleteTable");
  }, [e]);
  return b ? (
    // Container styling (bg, shadow, border, rounded, padding) is provided by the
    // parent PopoverContent. This component only handles inner layout.
    /* @__PURE__ */ i(s, { className: "flex flex-row items-center gap-[var(--spacing-1)]", children: [
      /* @__PURE__ */ l(r, { variant: "ghost", size: "sm", label: "Spalte hinzufügen", onClick: d, "aria-label": "Spalte hinzufügen" }),
      /* @__PURE__ */ l(r, { variant: "ghost", size: "sm", label: "Zeile hinzufügen", onClick: m, "aria-label": "Zeile hinzufügen" }),
      /* @__PURE__ */ l(s, { className: "w-[1px] h-[var(--spacing-6)] bg-[var(--base-border)]" }),
      /* @__PURE__ */ l(r, { variant: "ghost", icon: "Split", "aria-label": "Zelle teilen", onClick: g }),
      /* @__PURE__ */ l(r, { variant: "ghost", icon: "Merge", "aria-label": "Zellen verbinden", onClick: h }),
      /* @__PURE__ */ l(s, { className: "w-[1px] h-[var(--spacing-6)] bg-[var(--base-border)]" }),
      /* @__PURE__ */ l(
        r,
        {
          variant: "ghost",
          icon: /* @__PURE__ */ l(u, { name: "Trash2", color: "var(--base-destructive)" }),
          "aria-label": "Tabelle löschen",
          onClick: p
        }
      )
    ] })
  ) : null;
};
t.displayName = "HtmlEditorTableBubbleMenu";
export {
  t as default
};
//# sourceMappingURL=HtmlEditorTableBubbleMenu.js.map
