import React from "react";
import EditSkill from "./EditSkill";
import EditSkillLoading from "./EditSkillLoading";
import { fetchStaff, fetchTeamLeads } from "@/app/api/staff";
import { useSearchParams } from "next/navigation";
import { fetchSkill, fetchSkillDetail } from "@/app/api/skill";

interface SubComponents {
  Loading: typeof EditSkillLoading;
} 

interface Props {
  id: number
}

const EditSkillWrapper: React.FC<Props> & SubComponents = async ({ id }) => {
    const skills = await fetchSkillDetail(id)
    const skillList = await fetchSkill()

  return <EditSkill skills={skills} skillList={skillList}/>;
};

EditSkillWrapper.Loading = EditSkillLoading;

export default EditSkillWrapper;
