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

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