import { DepartmentService } from "../../../../../client";
import ObjectList from "../../../../../hooks/objectList.tsx";


type Props = {
    sectionId: number;
}

const useAvailableUsersList = ({ sectionId }: Props) =>
    ObjectList({
        queryFn: () => DepartmentService.getAvailableUsersForSection({ sectionId }),
        getObjectsFn: response => response.users,
        queryKey: "getAvailableUsersForDepartmentSection",
    });

export default useAvailableUsersList;