<script setup>
import { computed } from 'vue';
import { useI18n } from 'vue-i18n';
import { useCapitalize } from 'src/composables/useCapitalize';
import VnInput from 'src/components/common/VnInput.vue';

const props = defineProps({
    modelValue: { type: String, default: '' },
});

const { t } = useI18n();
const emit = defineEmits(['update:modelValue']);

const amount = computed({
    get() {
        return props.modelValue;
    },
    set(val) {
        emit('update:modelValue', val);
    },
});
</script>
<template>
    <VnInput
        v-model="amount"
        type="number"
        step="any"
        :label="useCapitalize(t('amount'))"
    />
</template>
<i18n>
es:
    amount: importe
</i18n>
