import { QueryConstraint } from "firebase/firestore";
import { useStudentPlacementList } from "../../../hooks";
import { UserData } from "../../../typeDefinitions";

export function useStudentPlacements({user, uid, queryConstraint}: {user: UserData, uid?: string, queryConstraint?: QueryConstraint[]}){ 
    const {placements, loadMoreIcon, loadMorePlacements, setQuery, setInitialQueryLimit, reset} = useStudentPlacementList({...{user: user as UserData, uid: uid || user?.id, queryConstraint}})

    return ({...{placements, loadMoreIcon, loadMorePlacements, setQuery, setInitialQueryLimit, resetPlacements: reset}});
}
