<template>
<div class="entries">
  <span class="entry" v-for="entry in entries"
  @click="$emit('select', entry.value)"
  >{{entry.text}}</span>
</div>
</template>

<style scoped>
  .entries {
    display: flex;
    flex-flow: column;
    position: absolute;
    left: 0;
    background: var(--secondary-bg);
    width: 100%;
    margin-top: 5px;
    z-index: 3;
    border: 1px solid black;
  }
  
  .entry {
    border-bottom: 1px solid var(--text);
    padding: 5px;
    cursor: pointer;
  }
</style>

<script setup>
const props = defineProps(['entries'])
const emits = defineEmits(['select'])
</script>
