<template>
  <view class="payment-view">
    <image
      class="payment-icon"
      src="@/static/icons/icon-payment.png"/>
    <view class="payment-info">
      <view class="flexc">
        <text class="payment-name">Pay-Per-Use</text>
        <view :class="'payment-status ' + info.paymentStatus" v-if="info.paymentStatus">{{info.paymentStatus}}</view>
      </view>
      <view class="payment-amount">{{info.preAuthAmount + " Pre-Authorization"}}</view>
    </view>
    <i-icon
      v-if="false"
      name="arrow-right-s-line"
      size="48rpx"
      color="#333"/>
  </view>
</template>

<script>
export default {
  name: "PaymentView",
  props: {
    info: {
      type: Object,
      default: () => ({})
    }
  },
  data() {
    return {
      
    };
  },
  mounted() {
    
  },
  methods: {
    
  }
}
</script>

<style scoped>
.payment-view {
  display: flex;
  padding: 32rpx;
  margin: 32rpx 32rpx 0;
  align-items: center;
  border-radius: 24rpx;
  padding-right: 24rpx;
  background-color: white;
}
.payment-icon {
  width: 65rpx;
  height: 65rpx;
}
.payment-info {
  flex: 1;
  padding: 0 32rpx;
}
.payment-name {
  color: #222;
  font-size: 32rpx;
  font-weight: bold;
}
.payment-amount {
  color: #009E81;
  font-size: 28rpx;
  padding-top: 8rpx;
}
.payment-status {
  color: #fff;
  font-size: 25rpx;
  border-radius: 12px;
  padding: 4px 10px;
  margin-left: 8rpx;
  transform: scale(0.8);
  background-color: #009E81;
}
.payment-status.FAILED,
.payment-status.EXPIRED {
  background-color: #FF2222;
}
.payment-status.CANCELLED {
  background-color: #999;
}
.payment-status.PENDING {
  background-color: #7c9e0c;
}
</style>