<template lang="pug">
  base-input(
    :type="choiceType"
    v-model="value",
    :placeholder="placeholder",
    :maxLength="maxLength",
    :mask="sharp"
  )
    slot
</template>

<script>
import BaseInput from "@/components/base/BaseInput";

export default {
  name: "ClientDetailInput",
  components: { BaseInput },
  emits: ["update:modelValue"],
  props: {
    modelValue: String,
    sharp: String,
    maxLength: String,
    placeholder: String,
  },
  computed: {
    choiceType() {
      return !this.sharp ? "textarea" : "text";
    },
    value: {
      get() {
        return this.modelValue;
      },
      set(value) {
        this.$emit("update:modelValue", value);
      },
    },
  },
};
</script>
