import { preloadClaims } from "@/app/api/claims";
import ClaimSearch from "@/components/ClaimSearch";
import PoSearch from "@/components/PoSearch";
import { getServerI18n, I18nProvider } from "@/i18n";
import Add from "@mui/icons-material/Add";
import Button from "@mui/material/Button";
import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography";
import { Metadata } from "next";
import Link from "next/link";
import { Suspense } from "react";

export const metadata: Metadata = {
  title: "Purchase Order",
};

const PurchaseOrder: React.FC = async () => {
  const { t } = await getServerI18n("purchaseOrder");
  //   preloadClaims();
  return (
    <>
      <I18nProvider namespaces={["purchaseOrder", "common"]}>
        <Stack
          direction="row"
          justifyContent="space-between"
          flexWrap="wrap"
          rowGap={2}
        >
        </Stack>
          <Suspense fallback={<PoSearch.Loading />}>
            <PoSearch />
          </Suspense>
      </I18nProvider>
    </>
  );
};

export default PurchaseOrder;
