<template>
  <div :class="hoverStatus ? 'body bodyHover ' : 'body'">
    <div class="box">
      <div>
        <div class="productName">{{ item.materialName }}</div>
        <div class="productMsg">
          <span :class="hoverStatus ? 'msgName msgNameHover' : 'msgName'">产品型号</span>
          <span class="msgValue">{{ item.materialCode }}</span>
        </div>
      </div>

      <div>
        <div style="display: flex; width: 100%; justify-content: space-between">
          <div class="productMsg" style="width: 50%">
            <span :class="hoverStatus ? 'msgName msgNameHover' : 'msgName'">不合格数</span>
            <span class="msgValue">{{ item.unqualifiedNum }}</span>
          </div>
          <div class="productMsg" style="width: 50%">
            <span :class="hoverStatus ? 'msgName msgNameHover' : 'msgName'">已维修数</span>
            <span class="msgValue">{{ item.endNum }}</span>
          </div>
        </div>

        <div class="productMsg">
          <span :class="hoverStatus ? 'msgName msgNameHover' : 'msgName'">审理时间</span>
          <span class="msgValue">{{ item.handleTime }}</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script lang="ts" setup>
import { reactive, ref } from "vue";

defineProps<{
  hoverStatus?: boolean;
  item: object;
}>();
</script>

<style lang="scss" scoped>
.body {
  position: relative;
  width: 100%;
  height: 244px;
  border-radius: 16px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px;
  background-color: #ffffff;
}

.box {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bodyHover {
  background-color: $select-hover;
  color: white;
}

.boxTextHover {
  color: white !important;
}

.productName {
  font-size: $f24;
}

.msgName {
  font-size: $f20;
  color: $font-default-60;
}

.msgNameHover {
  color: white !important;
}

.msgValue {
  margin-left: 5px;
  font-size: $f20;
}

.bottomArea {
  height: 60px;
}

.bottomBox {
  width: 80px;
  display: inline-block;
}

.textDivider {
  display: inline-block;

  .dividerBox {
    height: 60px;
    display: flex;
  }
}

.boxNum {
  text-align: center;
  line-height: 38px;
  font-size: $f38;
}

.boxText {
  text-align: center;
  font-size: $f20;
  line-height: 20px;
  color: $font-default-60;
}
</style>
