<template>
  <div class="flex flex-col gap-12">
    <AisFileUpload @select="onFileSelect"></AisFileUpload>
    <pre>Selected file: {{computeDisplayFileName}}</pre>
  </div>
</template>

<script setup>
import {ref, computed} from 'vue';
import AisFileUpload from "@/components/fileupload/AisFileUpload.vue";

const file = ref(null);

const onFileSelect = (event) => {
  file.value = event
}

const computeDisplayFileName = computed(() => {
  if (file.value !== null){
    return file.value.name
  }
})

</script>