<template>
    <Table columns="auto auto auto auto 1fr auto" v-if="events">
        <HeaderRow>
            <HeaderCell></HeaderCell>
            <HeaderCell>Group ID</HeaderCell>
            <HeaderCell>Artifact ID</HeaderCell>
            <HeaderCell>Version</HeaderCell>
            <HeaderCell>User</HeaderCell>
            <HeaderCell></HeaderCell>
        </HeaderRow>
        <EventComponent :event="event" v-for="event in events"></EventComponent>
    </Table>
</template>

<script setup lang="ts">
import Table from "~/components/ui/table/Table.vue";
import HeaderRow from "~/components/ui/table/HeaderRow.vue";
import EventComponent from "~/components/events/EventComponent.vue";
import HeaderCell from "~/components/ui/table/HeaderCell.vue";
import {Event} from "~/components/events/Event";

const events: Ref<Event[] | undefined> = ref(undefined);

onMounted(() => {
    Event.get((_events: Event[]) => {
        events.value = _events;
    })
})
</script>

<style scoped>

</style>