import { Edit } from "@mui/icons-material";
// import EditStaff from "@/components/EditStaff";
import { Suspense } from "react";
import { I18nProvider, getServerI18n } from "@/i18n";
// import EditStaffWrapper from "@/components/EditStaff/EditStaffWrapper";
import { Metadata } from "next";
import EditSkill from "@/components/EditSkill";
import { Typography } from "@mui/material";
import { fetchSkill } from "@/app/api/skill";
import { searchParamsProps } from "@/app/utils/fetchUtil";

const EditSkillPage: React.FC<searchParamsProps> = async ({
  searchParams,
}) => {
    console.log(searchParams.id)
    const { t } = await getServerI18n("skill");

  return (

      <>
        <Typography variant="h4">{t("Edit Skill")}</Typography>
        <I18nProvider namespaces={["skill", "common"]}>
          <Suspense fallback={<EditSkill.Loading />}>
            <EditSkill id={parseInt(searchParams.id as string)}/>
          </Suspense>
        </I18nProvider>
      </> 
  );
};

export default EditSkillPage;
