<template>
  <div class="com">
    <div class="header">
      <div class="back">
        <backIcon back="cancel" @cancel="cancel"/>
      </div>
      <!-- 收款人账户类别 -->
      {{ $t('fund.l14') }}
    </div>
    <div class="list">
      <div class="item flex" @click="selectPay(1)">
        <div>
          <!-- 本地银行取款 -->
          {{ $t('fund.l15') }}
        </div>
        <van-icon v-if="type == 1" name="passed" />
        <van-icon v-else name="circle" />
      </div>
      <div class="item flex" @click="selectPay(2)">
        <div>
          <!-- 国际电汇 -->
          {{ $t('account.l32') }}
        </div>
        <van-icon v-if="type == 2" name="passed" />
        <van-icon v-else name="circle" />
      </div>
      <div class="item flex" @click="selectPay(3)">
        <div>
          <!-- 数字货币 -->
          {{ $t('account.l33') }}
        </div>
        <van-icon v-if="type == 3" name="passed" />
        <van-icon v-else name="circle" />
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: ['type'],
  data () {
    return {
    }
  },
  methods: {
    selectPay(type) {
      this.$emit('success', type)
    },
    cancel() {
      this.$emit('cancel')
    }
  }
}
</script>
<style lang="less" scoped>
.com {
  min-height: 100vh;
  background-color: var(--bg2-);
}
.header {
  position: sticky;
  top: 0;
  text-align: center;
  padding-top: 15px;
  padding-bottom: 17px;
  font-size: 18px;
  font-weight: 600;
  background-color: var(--bg-);
  margin-bottom: 1px;
  .back {
    position: absolute;
    left: 9px;
    top: 11px;
  }
}
.item {
  height: 62px;
  margin-bottom: 1px;
  justify-content: space-between;
  cursor: pointer;
  padding: 0 18px;
  font-size: 18px;
  background-color: var(--bg-);
  color: var(--color-1-);
  .van-icon-circle {
    color: #C3C3C3;
    font-size: 20px;
  }
  .van-icon-passed {
    color: var(--color-);
    font-size: 20px;
  }
}
</style>