<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('resources.resources') }}
      </div>
      <q-btn
        color="primary"
        icon="create"
        :label="$t('resources.create')"
        @click="create"
      />
    </div>
    <div class="bg-white rounded-borders">
      <BaseTable
        :attributes.sync="attributes"
        v-model="inputSearch"
        :columns="columns"
        :data="resourcesRecords"
        :use-search="true"
        :loading="resourcesLoading"
        :pagination.sync="model.pagination"
        :title="$t('resources.title')"
        :visible-columns="model.visibleColumns"
        @requestTable="init"
        @update="init"
        @query="setQuery"
      />
    </div>
  </div>
</template>

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