import { r as registerInstance, h, F as Fragment, H as Host } from './index-ecdfb761.js';

const dvnRichContentCss = "dvn-rich-content{--content-gap-size:24px}dvn-rich-content .separator{height:var(--content-gap-size)}dvn-rich-content h1{font-size:2rem;margin:0;display:block}dvn-rich-content h2{font-size:1.6rem;margin:0;display:block}dvn-rich-content h3{font-size:1.2rem;margin:0;display:block}dvn-rich-content dvn-markdown{line-height:24px}dvn-rich-content dvn-markdown *:first-child{margin-top:0}dvn-rich-content dvn-markdown *:last-child{margin-bottom:0}";

const DvnRichContent = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
    this.value = [];
  }
  render() {
    return (h(Host, null, h("div", { class: "separator" }), this.value.map(component => {
      let content = null;
      switch (component.type) {
        case 'h1':
          content = h("h1", null, component.value.text);
          break;
        case 'h2':
          content = h("h2", null, component.value.text);
          break;
        case 'h3':
          content = h("h3", null, component.value.text);
          break;
        case 'text':
          content = h("dvn-markdown", { content: component.value.text });
          break;
      }
      return (h(Fragment, null, content, h("div", { class: "separator" })));
    })));
  }
};
DvnRichContent.style = dvnRichContentCss;

export { DvnRichContent as dvn_rich_content };
