import { searchParamsProps } from "@/app/utils/fetchUtil";
import EditPosition from "@/components/EditPosition";
import EditUserGroup from "@/components/EditUserGroup";
import { I18nProvider, getServerI18n } from "@/i18n";
import Typography from "@mui/material/Typography";
import { Metadata } from "next";

export const metadata: Metadata = {
  title: "Edit User Group",
};

const Group: React.FC<searchParamsProps> = async ({
  searchParams,
}) => {
  const { t } = await getServerI18n("group");

  // Preload necessary dependencies

  return (
    <>
      {/* <Typography variant="h4">{t("Edit User Group")}</Typography> */}
      <I18nProvider namespaces={["group"]}>
        <EditUserGroup id={parseInt(searchParams.id as string)}/>
      </I18nProvider>
    </>
  );
};

export default Group;