<script setup>
import { devToolsClient } from "../runtime/client";
defineProps({
  markdown: { type: String, required: true },
  tag: { type: String, required: false }
});
</script>

<template>
  <template v-if="markdown && devToolsClient?.devtools?.renderMarkdown">
    <component :is="tag || 'span'" class="n-markdown" v-html="devToolsClient.devtools.renderMarkdown(markdown)" />
  </template>
  <template v-else>
    <component :is="tag || 'span'" class="n-markdown" v-text="markdown" />
  </template>
</template>
