<script setup>
import { getSessionData, getUserList, getDepartmentListData } from "@/components/session/Session.vue";
import { showCreateUserForm } from "@/components/forms/superUser/createUserForm.vue";
import { showCreateDepartmentForm } from "@/components/forms/superUser/createDepartmentForm.vue";
import { showCreateProductForm } from "@/components/forms/superUser/createProductForm.vue";
import { getProducts } from "@/components/shop/Products.vue";
import { showCreateOrderForm } from "@/components/forms/superUser/createOrderForm.vue";
import { getOrders } from "@/components/shop/Orders.vue";
import { showCreateNumberPlateScanForm } from "@/components/forms/superUser/createNumberPlateScan.vue";
import SuperUserDashboardNavigation from "@/views/dashboards/superUserDashboard/SuperUserDashboardNavigation.vue";
import PageTitle from "@/components/global/PageTitle.vue";
import UserNavigation from "@/components/global/UserNavigation.vue";
import RestrictedPageWrapper from "@/components/page/wrappers/RestrictedPageWrapper.vue";
import { SessionUser } from "@/components/session/token/SessionUser.vue";
import { showCreateUserDiscountForm } from "@/components/forms/superUser/createUserDiscountForm.vue";
</script>

<template>
  <RestrictedPageWrapper :hasPermission="SessionUser.canAccessSuperUser()">
    <SuperUserDashboardNavigation />
    <PageTitle title="Super User Dashboard" />
    <div class="buttons mt-3">
      <button class="button" @click="getSessionData">Get Session Data</button>
      <button class="button" @click="getUserList">Get user list Data</button>
      <button class="button" @click="showCreateUserForm">Create user</button>
      <button class="button" @click="getDepartmentListData">Get department list Data</button>
      <button class="button" @click="showCreateDepartmentForm">Create department</button>
      <button class="button" @click="getProducts">Get products</button>
      <button class="button" @click="showCreateProductForm">Create product</button>
      <button class="button" @click="getOrders">Get orders</button>
      <button class="button" @click="showCreateOrderForm">Create order</button>
      <button class="button" @click="showCreateNumberPlateScanForm">Create number plate scan</button>
      <button class="button" @click="showCreateUserDiscountForm">Create user discount</button>
      <button class="button" @click="SessionUser.superUser.cron.runCron()">Run cron</button>
    </div>
  </RestrictedPageWrapper>
</template>

<style scoped>

</style>