<script setup>
import ProductsPagination from "@/components/displays/pagination/models/SuperUserDashboard/ProductsPagination.vue";
import PageTitle from "@/components/global/PageTitle.vue";
import { showCreateProductForm } from "@/components/forms/superUser/createProductForm.vue";
import { SessionUser } from "@/components/session/token/SessionUser.vue";
import { loadList } from "@/components/pagination/paginatedList.vue";
</script>

<template>
  <div>
    <PageTitle title="Produkter" subtitle="Her kan du se en liste over alle produkter i systemet">
      <template #buttons>
        <button class="button is-dark" @click="SessionUser.objects.products.showCreateObjectForm(loadList)">
          <span class="icon">
            <i class="fas fa-plus"></i>
          </span>
          <span>Opret nyt produkt</span>
        </button>
      </template>
    </PageTitle>
    <ProductsPagination auto-load="true" />
  </div>
</template>

<style scoped>

</style>