import React from "react";
import { Decoration_Type } from "./../../ricos-schema/legacy/wix/rich_content/v1/index.js";
const decorator = (boldDecoration, element) => {
  const { fontWeightValue } = boldDecoration;
  return /* @__PURE__ */ React.createElement("strong", { key: `bold-${element?.key}`, style: { fontWeight: fontWeightValue || 700 } }, element);
};
const BoldDecorator = {
  rule: (node) => !!node.textData?.decorations?.some(({ type }) => type === Decoration_Type.BOLD),
  decorate: ({ element, node }) => {
    const boldDecoration = node.textData?.decorations?.find(
      ({ type }) => type === Decoration_Type.BOLD
    );
    return decorator(boldDecoration, element);
  }
};
var viewer_default = BoldDecorator;
export {
  viewer_default as default
};
//# sourceMappingURL=viewer.js.map
