<template>
  <stripe-element
    type='postalCode'
    :stripe='stripe'
    :value='value'
    :options='options'
    @blur='$emit("blur")'
    @focus='$emit("focus")'
    @empty='$emit("empty")'
    @complete='$emit("complete")'
    @brand='$emit("brand", $event)'
    @error='$emit("error", $event)'
    @value='$emit("value", $event)'
  />
</template>

<script>
import props from './props'
import StripeElement from './StripeElement'

export default {
  props,
  components: { StripeElement },
  methods: {
    blur () { this.$refs.element.blur() },
    focus () { this.$refs.element.focus() },
    update (options) { this.$refs.element.update(options) }
  }
}
</script>
