<template>
  <div class="van-picker__toolbar van-hairline--top-bottom ibps-picker__toolbar" style="border-bottom: 0;">
    <van-button class="van-picker__cancel" @click="onCancel">{{ cancelButtonText || $t('cancel') }}</van-button>
    <div v-if="title" class="van-picker__title  van-ellipsis" @click="onTitle" v-text="title" />
    <van-button class="van-picker__confirm" @click="onConfirm">{{ confirmButtonText || $t('confirm') }}</van-button>
  </div>
</template>
<script>
export default {
  props: {
    title: String,
    cancelButtonText: String,
    confirmButtonText: String
  },
  methods: {
    onCancel(e) {
      this.$emit('cancel', e, this)
    },
    onConfirm(e) {
      this.$emit('confirm', e, this)
    },
    onTitle(e) {
      this.$emit('title', e, this)
    }
  }
}
</script>
