import { h } from '@stencil/core';
import { RTEBlockRenderer } from './block-renderer.abstract';
import RTEDTORendererManager from '../../../../../helpers/rte-manager/dto-renderer-manager';
class RTEHTMLBlockRenderer extends RTEBlockRenderer {
  render(block, renderContext) {
    const BlockTag = block.htmlTag;
    return (h(BlockTag, Object.assign({}, this.getCustomAttrs(block), { key: block.id, ref: (ref) => super.registerRef(ref, block), style: block.getStyles(), class: block.getClasses() }), block.children.map((child) => {
      return RTEDTORendererManager.getRTERenderer(child.type).render(child, renderContext, h);
    })));
  }
}
export default new RTEHTMLBlockRenderer();
