// packages/block-library/src/buttons/edit.js
import clsx from "clsx";
import { useBlockProps, useInnerBlocksProps } from "@wordpress/block-editor";
import { jsx } from "react/jsx-runtime";
var DEFAULT_BLOCK = {
  name: "core/button",
  attributesToCopy: [
    "backgroundColor",
    "border",
    "className",
    "fontFamily",
    "fontSize",
    "gradient",
    "style",
    "textColor",
    "width"
  ]
};
function ButtonsEdit({ attributes, className }) {
  const { fontSize, layout, style } = attributes;
  const blockProps = useBlockProps({
    className: clsx(className, {
      "has-custom-font-size": fontSize || style?.typography?.fontSize
    })
  });
  const innerBlocksProps = useInnerBlocksProps(blockProps, {
    defaultBlock: DEFAULT_BLOCK,
    template: [["core/button"]],
    templateInsertUpdatesSelection: true,
    orientation: layout?.orientation ?? "horizontal"
  });
  return /* @__PURE__ */ jsx("div", { ...innerBlocksProps });
}
var edit_default = ButtonsEdit;
export {
  edit_default as default
};
//# sourceMappingURL=edit.mjs.map
