<template>
    <v-autocomplete
        dense
        hide-details
        :items="options"
        outlined
        label="Selectați un client"
        clearable
        v-model="customer_id"
    >
    </v-autocomplete>
</template>

<script>
    export default {
        props: {
            value: {required: true},
            items: {default: null},
        },

        computed: {

            customer_id: {
                get: function() {
                    return this.value;
                },

                set: function(value) {
                    return this.$emit('input', value);
                }
            },

            options() {
                return [...this.items];
            }
        },

        name: 'CustomersAutocomplete',
    }
</script>