<template>
  <div class="commonTitle">流转卡号</div>
  <div class="body">
    <el-scrollbar class="scrollbar">
      <Empty v-if="selectSeqArray.length < 1" />

      <div class="row" v-for="(item, index) in selectSeqArray" :key="index">
        <el-tooltip effect="dark" :content="item.seqNo" placement="right" trigger="click" @click="clickCardNum(index)">
          <span :class="index == selectSeqIndex ? 'describeText active' : 'describeText'
            " style="cursor: pointer">{{ item.seqNo }}</span>
        </el-tooltip>

        <div class="status">
          {{ dictS.getLableByValue("outsource_state", item.state) }}
        </div>
      </div>
    </el-scrollbar>
  </div>
</template>

<script lang="ts" setup>
import { useDictionaryStore } from "@/store";
const dictS = useDictionaryStore();
const selectSeqIndex = inject("selectSeqIndex");
const selectSeqArray = inject("selectSeqArray");
const clickCardNum = (index: number) => {
  selectSeqIndex.value = index;
};
</script>

<style lang="scss" scoped>
.body {
  width: 100%;
  max-height: calc(100% - 44px);
  background-color: white;
  border-radius: 16px;
  padding: 20px;

  .row {
    display: flex;

    .status {
      width: 60px;
    }
  }
}

.describeText {
  color: black;
  font-weight: $Medium;
  font-size: 30px;
  margin-bottom: $p10;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.active {
  color: $select-hover;
}
</style>
