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

const PageName = "sendOrderPayRelive";
const baseUrl = "/postSupplierOrder/sendOrderPayReliveDetail";

const { push } = useRouter();

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

// { code: "023", name: "撤销对账付款申请" }
// const { hasPermissionWithCode } = usePermission(PageName);

const events: PageEvents = {
  content: {
    preview: ({ returnCode }) => push(`${baseUrl}?id=${returnCode}`),
    create: () => push(baseUrl)
  }
};
</script>

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