<script setup lang="ts">
interface Props {
  screenshotPreviewUrl: string
  sectionTitle: string
}

defineProps<Props>()
</script>

<template>
  <section class="info-card">
    <h3>{{ sectionTitle }}</h3>
    <p v-if="!screenshotPreviewUrl" class="screenshot-empty">截图加载中或当前不可读取。</p>
    <a
      v-else
      class="screenshot-link"
      :href="screenshotPreviewUrl"
      target="_blank"
      rel="noreferrer"
      >打开原图</a
    >
    <img
      v-if="screenshotPreviewUrl"
      class="screenshot-preview"
      :src="screenshotPreviewUrl"
      :alt="sectionTitle"
    />
  </section>
</template>

<style scoped src="../AdminTaskDetail.css"></style>
