<template>
  <q-card class='q-pa-sm'>
    <q-card-section class='row items-center'>
      <q-btn
        padding="xs"
        class="text-grey-7 q-mr-md"
        color="grey-3"
        icon="arrow_back"
        @click="$router.go(-1)"
      />
      <p class='text-h4' style="margin: 0">Шаблоны сообщений</p>
    </q-card-section>
    <q-card-section>
      <BaseTable
        :columns="columns"
        :data="templates"
        :loading="loading"
        :pagination.sync="pagination"
        title="Шаблоны"
        @requestTable="init"
        @update="init"
      >
        <template v-slot:body-item-name="props">
          <q-chip
            clickable
            @click="selectTemplate(props.row.id)"
          >{{ props.row.name }}</q-chip>
        </template>
      </BaseTable>
    </q-card-section>
  </q-card>
</template>

<script src="./index.js" />
