// packages/block-library/src/column/save.js
import clsx from "clsx";
import { useInnerBlocksProps, useBlockProps } from "@wordpress/block-editor";
import { jsx } from "react/jsx-runtime";
function save({ attributes }) {
  const { verticalAlignment, width } = attributes;
  const wrapperClasses = clsx({
    [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment
  });
  let style;
  if (width && /\d/.test(width)) {
    let flexBasis = Number.isFinite(width) ? width + "%" : width;
    if (!Number.isFinite(width) && width?.endsWith("%")) {
      const multiplier = 1e12;
      flexBasis = Math.round(Number.parseFloat(width) * multiplier) / multiplier + "%";
    }
    style = { flexBasis };
  }
  const blockProps = useBlockProps.save({
    className: wrapperClasses,
    style
  });
  const innerBlocksProps = useInnerBlocksProps.save(blockProps);
  return /* @__PURE__ */ jsx("div", { ...innerBlocksProps });
}
export {
  save as default
};
//# sourceMappingURL=save.js.map
