<script setup>
import { useI18n } from 'vue-i18n';
import FormModel from 'src/components/FormModel.vue';
import VnInput from 'src/components/common/VnInput.vue';
const { t } = useI18n();
</script>

<template>
    <FormModel
        model="WorkerPbx"
        :url="`Workers/${$route.params.id}/sip`"
        url-update="Sips"
        :mapper="
            ({ userFk, extension }) => ({
                userFk,
                extension,
            })
        "
        auto-load
    >
        <template #form="{ data }">
            <VnInput
                :label="$t('worker.summary.sipExtension')"
                v-model="data.extension"
            />
        </template>
    </FormModel>
</template>

<i18n>
    es:
        It must be a 4-digit number and must not end in 00: Debe ser un número de 4 cifras y no terminar en 00
</i18n>
