<template>
  <CommonMarkHeader
    :isSingleStudent="isSingleStudent"
    :clearTasks="clearTasks"
    showPaperAndAnswer
    showScoreBoard
  >
    <span>
      <span class="header-small-text">待处理</span>
      <span class="highlight-text">{{ store.status.totalCount ?? "-" }}</span>
    </span>
    <span>
      <span class="header-small-text">已处理</span>
      <span class="highlight-text">{{ store.status.markedCount ?? "-" }}</span>
    </span>
  </CommonMarkHeader>
</template>

<script setup lang="ts">
import { store } from "@/store/store";
import { useRoute } from "vue-router";
import { clearArbitrateTask } from "@/api/arbitratePage";
import CommonMarkHeader from "@/components/CommonMarkHeader.vue";

const route = useRoute();
let isSingleStudent = !!route.query.historyId;
const {
  subjectCode,
  groupNumber,
  historyId: libraryId,
} = route.query as {
  subjectCode: string;
  groupNumber: string;
  historyId: string;
};

let clearTasks = clearArbitrateTask.bind(
  null,
  libraryId,
  subjectCode,
  groupNumber
);
</script>
