<route lang="json5" type="page">
{
  style: {
    navigationStyle: 'custom',
  },
}
</route>

<template>
  <view :scroll-y="true" class="flex flex-col h-screen relative custom-bg">
    <Navbar
      safeAreaInsetTop
      :bordered="false"
      leftArrow
      @clickLeft="handleBack"
      bg-color="transparent"
    >
      <template #title>
        <text class="text-[#1F2329] text-[36rpx] font-medium text-[#fff]">MHT心理健康自评</text>
      </template>
    </Navbar>

    <view class="flex-1 overflow-auto relative">
      <!-- 顶部卡片 -->
      <view class="mt-[30rpx] mx-[24rpx]">
        <StatusCard />
      </view>
    </view>
  </view>
</template>
<script setup lang="ts">
import Navbar from '@/pages-evaluation-sub/components/navbar/Navbar.vue'
import StatusCard from '../components/StatusCard.vue'
import { handleBack } from '../hooks/useEvaluateBack'

import { getCustomScaleExplains } from '@/service/index/api'

const pageType = ref(0)
const pageId = ref(0)

const studyRecord = ref({
  description: '',
  title: '',
  linChart: [],
  reportItems: [],
  hTag: '',
})

onLoad((options) => {
  pageType.value = +options.type
  pageId.value = options.id

  getCustomScaleExplains({ CustomScaleId: pageId.value }).then((resp) => {
    if (resp.code === 200) {
      studyRecord.value = resp.result as {
        description: string
        title: string
        linChart: any[]
        reportItems: any[]
        hTag: string
      }
    }
  })
})
</script>

<style scoped lang="scss">
.custom-bg {
  background: linear-gradient(184deg, #0d79fc 0%, #2186fc 100%);
}
:deep(.icon-class) {
  color: #fff !important;
}

.custom-border {
  width: 162rpx;
  height: 162rpx;
  border-radius: 50%;
  border: 6rpx dashed;
  border-color: #05d69c transparent transparent transparent;
}
</style>
