<template>
  <div class="pop">
    <div class="tip">
      <!-- 本人承诺已完整阅读并完全同意本协议内容 -->
      {{ $t('statement.l15') }}
    </div>
    <div v-if="!inputShow" class="box flex" @click="inputShow = true">
      <div>
        <!-- 请点击输入与您身份认证一致的姓名 -->
        {{ $t('statement.l16') }}
      </div>
    </div>
    <!-- 请输入与您身份认证一致的姓名 -->
    <el-input v-if="inputShow" :placeholder="$t('statement.l18')" v-model="name">
    </el-input>
    <div class="btns flex">
      <div class="btn ltn" @click="cancel">
        <!-- 取 消 -->
        {{ $t('statement.l10') }}
      </div>
      <div class="btn rtn" @click="submit">
        <!-- 同 意 -->
        {{ $t('statement.l17') }}
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data () {
    return {
      inputShow: false,
      name: ''
    }
  },
  methods: {
    submit() {
      if (this.name.trim() != this.userInfo.identity_name) {
        this.$toast({
          // message: '姓名输入不一致',
          message: this.$t('statement.l19'),
        });
        return
      }
      this.$emit('submit')
    },
    cancel() {
      this.$emit('cancel')
    }
  }
}
</script>
<style lang="less" scoped>
.pop {
  padding: 20px 14px 10px;
}
.tip {
  text-align: center;
  font-size: 16px;
  padding-bottom: 20px
}
.box {
  background-color: #F6F6F6;
  justify-content: center;
  padding: 0 12px;
  color: #888888;
  cursor: pointer;
  height: 118px;
}
.btns {
  padding-top: 20px;
  column-gap: 7px;
  .btn {
    cursor: pointer;
    text-align: center;
    flex: 1;
    line-height: 50px;
    font-weight: 600;
    font-size: 16px;
  }
  .ltn {
    background-color: #F6F6F6;
    color: #B6B6B6;
  }
  .rtn {
    background-color: #000000;
    color: #FFFFFF;
  }
}
::v-deep {
  .el-input__inner {
    border: 1px solid #DCDFE6 !important;
  }
}
</style>