<template>
  <div class="Input">
    <input :type="type" :id="makeId()" placeholder=" " :min="min" :max="max" />
    <label :for="makeId()">{{ label }}</label>
  </div>
</template>

<script setup lang="ts">
type Props = {
  type ?: 'text' | 'number'
  max ?: number
  min ?: number
  label : string
  id : string
  uid : number
}

const {
  type = 'text',
  min = 1,
  max,
  label,
  id,
  uid,
} = defineProps<Props>()

const makeId = () => `${id}_${uid}`
</script>
