<template>
  <input
    v-model="modelValue"
    :type="type"
    :required="required"
    :placeholder="placeholder"
    class="input-bordered input w-full"
  />
</template>

<script lang="ts" setup>
defineProps({
  type: {
    type: String,
    default: 'text',
  },
  required: {
    type: Boolean,
    default: false,
  },
  placeholder: {
    type: String,
    default: '',
  },
});

/* global defineModel */
const modelValue = defineModel();
</script>

<style lang="scss" scoped>
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
}
</style>