<script setup lang="ts">
import { usePageSearch, type PageHooks, type PageEvents } from "/@/hooks/page";
import contentConfig from "./config/content.config";
import searchConfig from "./config/search.config";
import { useRouter } from "vue-router";

const PageName = "productManager";
const router = useRouter();

const hooks: PageHooks = {
  pageSearchHook: () => usePageSearch(undefined, undefined, searchConfig)
};

const events: PageEvents = {
  content: {
    preview: ({ id }) => router.push("/invoiceInOut/productManagerDetail?id=" + id),
    create: () => router.push('/invoiceInOut/productManagerDetail')
  }
};
</script>

<template>
  <PageAuth :pageName="PageName">
    <PageContainer
      :hooks="hooks"
      :events="events"
      :searchConfig="searchConfig"
      :contentConfig="contentConfig"
    />
  </PageAuth>
</template>
