<script setup lang="ts">
const props = defineProps<{
  content: string
}>();
const { data: ast, status } = await useAsyncData(`markdown`, () => parseMarkdown(props.content, {}));
</script>

<template>
    <div v-if="status === 'pending'" class="loading-circle"></div>
    <MDCRenderer v-else-if="status === 'success'" :body="ast?.body" :data="ast?.data" />
    <div v-else>Impossible de traiter le contenu.</div>
</template>