import {
  CROSS_PARAGRAPH_MERGE_STYLES,
  DEFAULT_ANIMATE,
  DEFAULT_COLOR,
  DEFAULT_STYLE
} from "./defaults.js";
const getAnnotationSignature = (attrs) => {
  const style = attrs.style || DEFAULT_STYLE;
  const color = attrs.color || DEFAULT_COLOR;
  const animate = attrs.animate ?? DEFAULT_ANIMATE;
  return `${style}|${color}|${animate}`;
};
const isCrossParagraphMergeStyle = (style) => CROSS_PARAGRAPH_MERGE_STYLES.has(style);
const canMergeAdjacentByStructure = (style, context) => {
  if (context.sameBlock) {
    return true;
  }
  return isCrossParagraphMergeStyle(style) && context.sameStructuralContainer;
};
export {
  canMergeAdjacentByStructure,
  getAnnotationSignature,
  isCrossParagraphMergeStyle
};
//# sourceMappingURL=merge-rules.js.map
