// import { fetchDepartmentCategories, fetchDepartments } from "@/app/api/companys";
import React from "react";
import DepartmentSearch from "./DepartmentSearch";
import DepartmentSearchLoading from "./DepartmentSearchLoading";
import { fetchDepartments } from "@/app/api/departments";

interface SubComponents {
  Loading: typeof DepartmentSearchLoading;
}

const DepartmentSearchWrapper: React.FC & SubComponents = async () => {
  const Departments = await fetchDepartments();
  // const Departments:any[] = []

  return <DepartmentSearch departments={Departments} />;
};

DepartmentSearchWrapper.Loading = DepartmentSearchLoading;

export default DepartmentSearchWrapper;
