<template>
  <qm-dialog
    v-if="markStore.isScoreBoardCollapsed"
    title="给分板"
    top="10%"
    fixedWidth
    width="380px"
    height="600px"
    customClass="board-track-dialog"
    @close="close"
  >
    <mark-board-track
      modal
      :isCheckAnswer="isCheckAnswer"
      @submit="$emit('submit')"
      @allZeroSubmit="$emit('allZeroSubmit')"
      @unselectiveSubmit="$emit('unselectiveSubmit')"
    />
  </qm-dialog>
</template>

<script setup lang="ts">
import QmDialog from "@/components/QmDialog.vue";
import { useMarkStore } from "@/store";
import MarkBoardTrack from "./MarkBoardTrack.vue";

const markStore = useMarkStore();

defineEmits(["submit", "allZeroSubmit", "unselectiveSubmit"]);
defineProps<{ isCheckAnswer?: boolean }>();

const close = () => {
  markStore.toggleScoreBoard();
};
</script>
