import { defineComponent, useTemplateRef, createElementBlock, openBlock, createVNode, unref } from "vue";
import { ScalarMarkdown } from "@scalar/components";
import { useIntersection } from "../../../hooks/use-intersection.js";
const _hoisted_1 = ["id"];
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "InfoMarkdownSection",
  props: {
    id: {},
    content: {},
    transformHeading: { type: Function },
    eventBus: {}
  },
  setup(__props) {
    const element = useTemplateRef("element");
    useIntersection(
      element,
      () => __props.id ? __props.eventBus?.emit("intersecting:nav-item", { id: __props.id }) : void 0
    );
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock("div", {
        id: __props.id,
        ref_key: "element",
        ref: element,
        class: "introduction-description-heading scroll-mt-16"
      }, [
        createVNode(unref(ScalarMarkdown), {
          transform: __props.transformHeading,
          transformType: "heading",
          value: __props.content,
          withImages: ""
        }, null, 8, ["transform", "value"])
      ], 8, _hoisted_1);
    };
  }
});
export {
  _sfc_main as default
};
