<template>
  <!-- 划转历史 -->
  <div class="loan-header">
    <div class="header-content pf600 fs16 fc1F2937">
      <img
        class="left-arrow-image"
        src="../../../assets/icon/index/left-arrow.svg"
        @click="toPath()" />
      划转历史
      <div class="save pf600 fs14 fcA8A8A8">
        <img src="../../../assets/icon/index/CalendarDots.svg" alt="" />
      </div>
    </div>
  </div>
  <div class="transfer-history">
    <div class="history-item" v-for="(item, index) in 3" :key="index">
      <div class="item-flag">
        <div class="flag-left">
          <img src="@/assets/icon/coin/bnb.svg" class="coin-first" alt="" />
          <img src="@/assets/icon/index/exchange-right-arrow.svg" class="exchange" />
          <img
            src="@/assets/icon/coin/EthereumClassicBadge.svg"
            class="coin-second"
            alt="" />
        </div>
        <div class="flag-right pf500 fs12 fc45B26B">成功</div>
      </div>
      <div class="item-info pf500 fc666666 margin-top13">
        <div class="fs14">BTC</div>
        <div class="fs12">1000.05 USDT</div>
      </div>
      <div class="item-info pf500 fc666666 margin-top11">
        <div class="fs14">ETH</div>
        <div class="fs12">521000.05 ETH</div>
      </div>
      <div class="item-info pf500 fc666666 margin-top11">
        <div class="fs14">换算汇率</div>
        <div class="info-right fs12">
          1 BTC <img src="@/assets/icon/index/exchange.svg" alt="" /> 0.0025 ETH
        </div>
      </div>
      <div class="item-info pf500 fc666666 margin-top11">
        <div class="fs14">划转时间</div>
        <div class="fs12">2025-11-07 12:25:12</div>
      </div>
    </div>
  </div>
</template>
<script setup>
  import { useRoute, useRouter } from "vue-router";

  const router = useRouter();

  const toPath = () => {
    router.back();
  };
</script>
<style lang="less" scoped>
  .loan-header {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1;
    width: 100%;
    height: 48px;
    background: #ffffff;
    overflow: hidden;

    .header-content {
      display: flex;
      flex-direction: row;
      justify-content: center;
      align-items: center;
      position: relative;
      width: 100%;
      height: 48px;

      .left-arrow-image {
        position: absolute;
        left: 14px;
        top: 16px;
        width: 9px;
        height: 16px;
      }

      .save {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        position: absolute;
        top: 12.3px;
        right: 16px;
        height: 24px;

        img {
          margin-right: 4px;
        }
      }
    }
  }

  .transfer-history {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    margin-top: 48px;

    .history-item {
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      align-items: center;
      margin-top: 10px;
      width: 345px;
      height: 170px;
      border-radius: 8px;
      border: 1px solid #ebebeb;

      .margin-top13 {
        margin-top: 13px;
      }

      .margin-top11 {
        margin-top: 11px;
      }

      .item-flag {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-top: 15px;
        width: 326px;
        height: 24px;

        .flag-left {
          display: flex;
          flex-direction: row;
          justify-content: flex-start;
          align-items: center;
          height: 24px;

          .coin-first {
            width: 24px;
            height: 24px;
          }

          .exchange {
            margin-left: 8px;
            width: 12px;
            height: 10px;
          }

          .coin-second {
            margin-left: 8px;
            width: 24px;
            height: 24px;
          }
        }

        .flag-right {
          width: 58px;
          height: 24px;
          line-height: 24px;
          text-align: center;
          border-radius: 5px;
          background: #45b26b1a;
        }
      }

      .item-info {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 326px;
        height: 18px;

        .info-right {
          display: flex;
          flex-direction: row;
          justify-content: flex-start;
          align-items: center;

          img {
            margin-left: 4px;
            margin-right: 4px;
            width: 14px;
            height: 14px;
          }
        }
      }
    }
  }
</style>
