import { jsx as l } from "react/jsx-runtime";
import { aa as i } from "./chunk-3RDGTRSB.DySNCMmQ.js";
import "@sinclair/typebox";
import { _ as m } from "./twind.D7be0E5m.js";
import { b as p } from "./use-section-style.CihCUEtb.js";
import { B as f } from "./BrickRoot.C1PanknS.js";
function y({ brick: e, editable: o }) {
  const r = p(e), { props: t } = e, n = Object.values(r), a = (s) => {
    if (o) {
      s.preventDefault();
      return;
    }
    t.linkToUrlOrPageId && (t.linkToUrlOrPageId.startsWith("http") ? window.open(t.linkToUrlOrPageId, "_blank") : console.log(`Navigate to page ID: ${t.linkToUrlOrPageId}`));
  };
  return /* @__PURE__ */ l(
    f,
    {
      manifest: i,
      as: "button",
      type: "button",
      className: m(
        n,
        t.color,
        t.size,
        "h-full font-medium text-nowrap min-h-max max-h-fit my-auto",
        o && "pointer-events-none"
      ),
      "data-prevented-by-editor": o ? "true" : "false",
      onClick: a,
      children: t.label
    }
  );
}
export {
  y as default
};
//# sourceMappingURL=button.BeFGVxcq.js.map
