<script setup lang="ts">
import LearningContentSimpleLayout from "@/pages/learningPath/learningContentPage/layouts/LearningContentSimpleLayout.vue";
import type { LearningContentRichText } from "@/types";
import RichText from "@/components/ui/RichText.vue";

const props = defineProps<{
  content: LearningContentRichText;
}>();
</script>

<template>
  <LearningContentSimpleLayout
    :title="props.content.title"
    :learning-content="props.content"
  >
    <!-- eslint-disable vue/no-v-html -->
    <div class="container-medium">
      <RichText
        v-if="props.content.description"
        class="my-4"
        :content="props.content.description"
      />

      <RichText v-if="props.content.text" class="my-4" :content="props.content.text" />
    </div>
  </LearningContentSimpleLayout>
</template>
