<template>
  <q-btn v-if="showComputed" icon="next_plan" color="primary" label="下一步" @click="rating.step.nextClick" />
</template>
<script setup lang="ts">
import { inject, computed } from 'vue';
import { Rating } from './ts/Rating';
import { Step } from './ts/Step';
import { Constant } from './ts/Constant';

const rating = <Rating>inject('rating');
const showComputed = computed(() => {
  if (rating.ratingData.value['processStatus'] === Constant.RATING_PROCESS_STATUS.BACK && rating.step.currStep.value === Step.type.reportInfo.value) {
    return false;
  } else {
    if (rating.cm.isApplyUserProcessStatus.value && rating.step.currStep.value !== Step.type.opinion.value) {
      return true;
    }
  }
  return false;
});
</script>
