<template>
  <div class="lesson-objectives-content">
    <div v-if="lesson.objectives" class="objectives-wrapper">
      <a-alert
        message="教学目标"
        description="本课程的教学目标，包含认知、技能、情感三个维度"
        type="info"
        show-icon
        closable
        class="objectives-alert"
      />

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

    <a-empty v-else description="暂无教学目标" />
  </div>
</template>

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

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

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

.objectives-wrapper {
  background: white;
}

.objectives-content {
  padding: 24px;
  background: linear-gradient(135deg, #FFF9F5 0%, #FFF 100%);
  border-radius: 12px;
  border-left: 4px solid #FF8C42;
  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: #FF8C42;
}
</style>
