<template>
  <div class="lesson-extension-content">
    <div v-if="lesson.extensionActivities" class="extension-wrapper">
      <a-alert
        message="教学延伸"
        description="课后延伸活动建议，巩固和拓展教学效果"
        type="info"
        show-icon
        closable
        class="extension-alert"
      />

      <div class="extension-content rich-content" v-html="lesson.extensionActivities"></div>
    </div>

    <a-empty v-else description="暂无教学延伸内容" />
  </div>
</template>

<script setup lang="ts">
defineProps<{
  lesson: any;
}>();
</script>

<style scoped>
.lesson-extension-content {
  min-height: 400px;
}

.extension-alert {
  margin-bottom: 20px;
}

.extension-wrapper {
  background: white;
}

.extension-content {
  padding: 24px;
  background: linear-gradient(135deg, #F6FFED 0%, #F9F9F9 100%);
  border-radius: 12px;
  border-left: 4px solid #52c41a;
  line-height: 2;
  color: #666;
  font-size: 14px;
}

.rich-content :deep(p) {
  margin-bottom: 16px;
}

.rich-content :deep(p:last-child) {
  margin-bottom: 0;
}

.rich-content :deep(ul),
.rich-content :deep(ol) {
  padding-left: 28px;
  margin-bottom: 16px;
}

.rich-content :deep(li) {
  margin-bottom: 8px;
}

.rich-content :deep(strong) {
  color: #333;
  font-weight: 600;
}

.rich-content :deep(h3) {
  margin-top: 20px;
  margin-bottom: 12px;
  font-weight: 600;
  color: #52c41a;
}
</style>
