<template>
  <div>
    <v-row v-for="event in events" :key="event.id" wrap>
      <v-flex xs12>
        <event-card
          :event="event"
          :has-user="hasUser"
          :toggle-ignore="toggleIgnore"
        />
      </v-flex>
    </v-row>
  </div>
</template>

<script setup lang='ts'>
import { type PropType } from 'vue'
import EventCard from '../Event/index.vue'
import { type Event } from '~/graphql/generated/operations'

defineProps({
  hasUser: {
    type: Boolean,
    required: true
  },
  toggleIgnore: {
    type: Function,
    required: true
  },
  events: {
    type: Array as PropType<Event[]>,
    required: true
  }
})
</script>
