<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" @click="toTransferHistory">
        <img src="../../../assets/icon/index/history.svg" alt="" />历史
      </div>
    </div>
  </div>
  <div class="transfer">
    <div class="account">
      <div class="account-left">
        <div class="money-account">
          <div class="pf500 fs12 fc999999">从</div>
          <div class="pf500 fs14 fc333333">资金账户</div>
        </div>
        <div class="line"></div>
        <div class="money-account">
          <div class="pf500 fs12 fc999999">到</div>
          <div class="pf500 fs14 fc333333">交易账户</div>
        </div>
      </div>
      <div class="account-right">
        <img src="@/assets/icon/index/transer.svg" alt="" />
      </div>
    </div>
    <div class="exchange-rate pf400 fs16 fc4B5563">
      1 BTC <img src="@/assets/icon/index/exchange.svg" alt="" /> 0.0025 ETH
    </div>
    <div class="exchange-number">
      <div class="exchange-coin margin-top38">
        <div class="pf400 fs22 fc999999">数量</div>
        <div class="coin-choose pf400 fs18 fc1F2937">
          <img src="@/assets/icon/coin/bnb.svg" class="coin" alt="" />
          BTC
          <img src="@/assets/icon/index/bottom-arrow.svg" class="bottom" alt="" />
        </div>
      </div>
      <div class="exchange-line">
        <div class="line"></div>
        <div class="account-right">
          <img src="@/assets/icon/index/transer.svg" alt="" />
        </div>
        <div class="line"></div>
      </div>
      <div class="exchange-coin margin-top15">
        <div class="pf400 fs22 fc999999">数量</div>
        <div class="coin-choose pf400 fs18 fc1F2937">
          <img src="@/assets/icon/coin/CardanoBadge.svg" class="coin" alt="" />
          BTC
          <img src="@/assets/icon/index/bottom-arrow.svg" class="bottom" alt="" />
        </div>
      </div>
    </div>
    <div class="submit pf600 fs14 fcFFFFFF">划转</div>
  </div>
</template>
<script setup>
  import { useRoute, useRouter } from "vue-router";

  const router = useRouter();

  const toPath = () => {
    router.back();
  };

  const toTransferHistory = () => {
    router.push("transferHistory");
  };
</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 {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    margin-top: calc(48px + 50px);
    width: 100%;

    .account {
      display: flex;
      flex-direction: row;
      justify-content: flex-start;
      width: 345px;
      height: 90px;
      border-radius: 6px;
      border: 1px solid #ebebeb;

      .account-left {
        .money-account {
          display: flex;
          flex-direction: row;
          justify-content: flex-start;
          align-items: center;
          margin-top: 16px;
          margin-left: 11px;
          height: 18px;

          div {
            &:nth-child(1) {
              margin-right: 13px;
              width: 12px;
              height: 18px;
              line-height: 18px;
              text-align: center;
            }
          }
        }

        .line {
          margin-top: 11px;
          margin-left: 17px;
          width: 271px;
          height: 1px;
          background: #e2e8f0;
        }
      }

      .account-right {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        margin-top: 25px;
        margin-left: 5px;
        width: 40px;
        height: 40px;
        border-radius: 123px;
        background: #f8fafc;

        img {
          width: 14.38px;
          height: 14.38px;
        }
      }
    }

    .exchange-rate {
      display: flex;
      flex-direction: row;
      justify-content: flex-start;
      align-items: center;
      margin-top: 45px;
      height: 24px;

      img {
        margin-left: 11px;
        margin-right: 11px;
        width: 18px;
        height: 10.5px;
      }
    }

    .exchange-number {
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      align-items: center;
      margin-top: 15px;
      width: 345px;
      height: 233px;
      border-radius: 8px;
      border: 1px solid #ebebeb;

      .margin-top38 {
        margin-top: 38px;
      }

      .margin-top15 {
        margin-top: 15px;
      }

      .exchange-coin {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 311px;
        height: 40px;

        .coin-choose {
          display: flex;
          flex-direction: row;
          justify-content: flex-start;
          align-items: center;
          width: 105px;
          height: 40px;
          border-radius: 30px;
          border: 1px solid #ebebeb;

          .coin {
            margin-left: 10px;
            margin-right: 6px;
            width: 24px;
            height: 24px;
          }

          .bottom {
            margin-left: 6px;
          }
        }
      }

      .exchange-line {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        margin-top: 17px;
        width: 311px;
        height: 40px;

        .line {
          width: 135px;
          height: 1px;
          background: #e2e8f0;
        }

        .account-right {
          display: flex;
          flex-direction: row;
          justify-content: center;
          align-items: center;
          width: 40px;
          height: 40px;
          border-radius: 123px;
          background: #f8fafc;

          img {
            width: 14.38px;
            height: 14.38px;
          }
        }
      }
    }

    .submit {
      margin-top: 73px;
      width: 311px;
      height: 40px;
      line-height: 40px;
      text-align: center;
      border-radius: 100px;
      background: #df384c;
      letter-spacing: 0.2px;
    }
  }
</style>
