<script setup lang="ts">
import render, { type MDProperties } from '~~/shared/markdown'
const { content, filter, properties } = defineProps<{
    content?: string,
    filter?: string,
    properties?: MDProperties
}>();

const container = useTemplateRef('container');

content && onMounted(() => {
    queueMicrotask(() => {
        container.value && content && container.value.replaceChildren(render(content, filter, properties));
    })
})
</script>

<template>
    <div ref="container"></div>
</template>