import { jsx as a } from "react/jsx-runtime";
import { _ as f } from "./twind.D7be0E5m.js";
import { forwardRef as p } from "react";
import { b as c } from "./use-section-style.D7ZN4IXn.js";
const k = p(({ brick: o, editable: e }, r) => {
  const n = c(o), { props: t } = o, l = Object.values(n), s = (i) => {
    if (e) {
      i.preventDefault();
      return;
    }
    t.linkToUrlOrPageId && (t.linkToUrlOrPageId.startsWith("http") ? window.open(t.linkToUrlOrPageId, "_blank") : console.log(`Navigate to page ID: ${t.linkToUrlOrPageId}`));
  };
  return /* @__PURE__ */ a(
    "button",
    {
      type: "button",
      className: f(
        l,
        t.color,
        t.size,
        "flex-grow shrink-0 h-full font-medium min-w-fit text-nowrap min-h-fit",
        e && "pointer-events-none"
      ),
      "data-prevented-by-editor": e ? "true" : "false",
      ref: r,
      onClick: s,
      children: t.label
    }
  );
});
export {
  k as default
};
//# sourceMappingURL=button.BiPP5iRr.js.map
