<template>
  <div class="q-pa-md q-gutter-y-md">
    <div
      class="flex justify-between items-center bg-white q-pa-md rounded-borders"
    >
      <div class="column justify-center text-h5" style="min-height: 36px">
        {{ $t('incidents.name') }}
      </div>
      <q-space />
      <q-btn
        color="primary"
        @click="resendSelected"
        :disable="!selectedIncidents.length"
      >
        {{ $t('base.actions.retry') }}
      </q-btn>
      <q-btn @click="test">-</q-btn>
    </div>
    <div class="bg-white rounded-borders">
      <IncidentsTable
        :model="incidents"
        :loading="loading"
        :table-filter="filter"
        :selected.sync="selectedIncidents"
        :toggle.sync="isPetitionToggleActive"
        @updatePagination="paginationChangeHandler"
        @search="search"
        @reload="fetchIncidents"
      />
    </div>
  </div>
</template>

<script lang="ts" src="./index.ts"></script>
