<template>
  <a-dropdown v-if="item.list">
    <a-menu slot="overlay">
      <a-menu-item v-for="(btn, i) of item.list" :key="i" @click="btn.click">
        {{ $lang(btn.label) }}
      </a-menu-item>
    </a-menu>
    <a-button type="primary">
      {{ $lang(item.label) }}
      <a-icon type="down" />
    </a-button>
  </a-dropdown>
  <p-button v-else type="primary" @click="item.click">{{ $lang(item.label) }}</p-button>
</template>

<script>
export default {
  props: {
    item: {
      type: Object,
      default: null
    }
  }
}
</script>

<style></style>
