<script setup lang="ts">
import { orderState, pageUrl } from '@/utils/constants'

const props = withDefaults(
  defineProps<{
    status: number
    id: number
    type?: string
    className?: string
  }>(),
  {
    className: 'button primary',
  },
)
</script>

<template>
  <view v-if="props.status === orderState.toEvaluate">
    <view v-if="props.type === 'all'">
      <navigator
        :url="`${pageUrl['order-evaluate']}?order_id=${props.id}`"
        :class="className"
        hover-class="none"
        >一键评价</navigator
      >
    </view>
    <view v-else>
      <navigator
        :url="`${pageUrl['order-evaluate']}?detail_id=${props.id}`"
        :class="className"
        hover-class="none"
        >评价</navigator
      >
    </view>
  </view>
</template>
