<script setup lang="ts">
import { computed, ref } from "vue";
import { MessageSquareText } from "lucide-vue-next";

const feedbackCode = ref("");
const statusUrl = computed(() => feedbackCode.value.trim() ? `/?api=status&code=${encodeURIComponent(feedbackCode.value.trim())}` : "/?api=status&code=");
</script>

<template>
  <section class="page-heading">
    <p class="eyebrow">Feedback</p>
    <h1>反馈查询</h1>
    <p>已有反馈可通过反馈码查询公开处理状态。</p>
  </section>

  <section class="panel feedback-panel">
    <h2>查询反馈状态</h2>
    <div class="feedback-box">
      <input v-model="feedbackCode" placeholder="输入反馈码，例如 FB-20260626-0001" />
      <a class="button primary" :href="statusUrl"><MessageSquareText :size="18" />查询状态</a>
    </div>
    <p class="muted">状态查询只返回公开进度、公开回复和接收时间，不展示后台内部处理记录。</p>
  </section>
</template>
