<template>
  <div class="child" v-loading.body.fullscreen="fullscreenLoading" element-loading-background="rgba(255, 255, 255, 0)">
    <div class="title">
      <!-- 市价开仓 -->
      {{ type == 1 ? $t('exchange.l80') : $t('exchange.l78') }}
    </div>
    <div class="tip flex" @click="checked = !checked">
      <van-checkbox icon-size="14px" checked-color="#000000" v-model="checked"></van-checkbox>
      <div>
        <!-- 不再提示 -->
        {{ $t('exchange.l79') }}
      </div>
    </div>
    <div class="btn-box flex">
      <div class="btn ltn" @click="cancel">
        <!-- 取消 -->
        {{ $t('common.l2') }}
      </div>
      <div class="btn rth" @click="openPosition">
        <!-- 确定 -->
        {{ $t('common.l3') }}
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: ['type'],
  data () {
    return {
      checked: false
    }
  },
  methods: {
    cancel() {
      this.$emit('cancel')
    },
    openPosition() {
      this.$emit('success', this.checked)
    },
  }
}
</script>
<style lang="less" scoped>
.child {
  padding: 18px 20px 20px;
  text-align: center;
}
.title {
  font-size: 18px;
  font-weight: 600;
  color: #000000;
  padding-bottom: 11px;
}
.tip {
  font-size: 12px;
  color: #888888;
  padding-top: 15px;
  justify-content: center;
  column-gap: 4px;
  .check {
    width: 14px;
  }
}
.btn-box {
  padding-top: 26px;
  column-gap: 15px;
  .btn {
    border-radius: 4px;
    line-height: 48px;
    cursor: pointer;
    flex: 1;
    font-size: 16px;
  }
  .ltn {
    border: 1px solid #F6F6F6;
    color: #B6B6B6;
  }
  .rth {
    border: 1px solid #000000;
    background-color: #000000;
    color: #FFFFFF;
  }
}
</style>