<template>
  <q-page class="q-pa-md">
    <q-toolbar class="q-mb-md">
      <q-toolbar-title>Configuratore Pagine</q-toolbar-title>
      <q-space />
      <q-btn
        flat
        dense
        icon="fas fa-rotate"
        label="Ricarica elenco"
        @click="reloadAll"
      />
      <q-btn
        color="primary"
        dense
        class="q-ml-sm"
        icon="fas fa-floppy-disk"
        label="Salva tutto"
        :loading="savingAll"
        @click="saveAll"
      />
    </q-toolbar>

    <PagesConfigurator
      v-model="pagesLocal"
      @save="saveOne"
      @change-order="saveOrder"
    />
  </q-page>
</template>

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

</script>
