<script setup>
import multiselect from '@suadelabs/vue3-multiselect';
import { onMounted, ref } from 'vue';
import { defineEmits } from 'vue'


defineProps(['modelValue', 'options', 'trackby', 'label']);
defineEmits(['update:modelValue']);

const input = ref(null);

function update(t) {
  console.log(t);
  context.emit("update:modelValue",t);
}

</script>
  
<!-- Vue component -->
<template>

  
  <multiselect :value="modelValue" v-model="value" @select='$emit("update:modelValue", $event)'  :track-by="trackby" :label="label" placeholder="Vyber jednu" :options="options" :clear-on-select="false" :searchable="true"  ref="input">
    
  </multiselect>

</template>