<template>
  <k-field
    class="k-doi-field"

    :disabled="disabled"
    :help="help"
    :label="label"
    :required="required"
    :when="when"
    >
    <k-input
      :after="after"
      :before="before"
      :icon="icon"
      theme="field"
      type="text"
      name="textfield"
      :value="value"
      @input="onInput"/>
  </k-field>
</template>

<script>
export default {
  props: {
    after: String,
    before: String,
    disabled: Boolean,
    help: String,
    icon: String,
    label: String,
    required: Boolean,
    when: String,
    value: String,
  },
  methods: {
    onInput(value) {
      this.$emit("input", value);
    }
  }
}
</script>

<style>
  /* optional scoped styles for the component */
</style>
