<script setup lang="ts">
import InputNumber from 'primevue/inputnumber'
defineProps<{ modelValue: number | null; inputId?: string; disabled?: boolean; invalid?: boolean; min?: number; max?: number; minFractionDigits?: number; maxFractionDigits?: number }>()
const emit = defineEmits<{ 'update:modelValue': [value: number | null]; blur: [event: Event] }>()
</script>
<template>
  <InputNumber
    :input-id="inputId"
    :model-value="modelValue"
    :disabled="disabled"
    :invalid="invalid"
    :min="min"
    :max="max"
    :min-fraction-digits="minFractionDigits"
    :max-fraction-digits="maxFractionDigits"
    @update:model-value="emit('update:modelValue', $event)"
    @blur="emit('blur', $event as unknown as Event)"
  />
</template>
