import { SCCourseType, SCUserType } from '@selfcommunity/types'; /** :::info This custom hook is used to manage the courses followed. ::: :::tip How to use it: Follow these steps: ```jsx 1. const scUserContext: SCUserContextType = useSCUser(); 2. const scJoinedCoursesManager: SCJoinedCoursesManagerType = scUserContext.manager.courses; 3. scJoinedCoursesManager.isJoined(course) ``` ::: */ export default function useSCJoinedCoursesManager(user?: SCUserType): { courses: any[]; loading: any[]; isLoading: (v: number | { id: number; }) => boolean; join?: undefined; leave?: undefined; joinStatus?: undefined; refresh?: undefined; emptyCache?: undefined; } | { courses: any[]; loading: any[]; isLoading: (v: number | { id: number; }) => boolean; join: (course: SCCourseType) => Promise; leave: (course: SCCourseType) => Promise; joinStatus: (course: SCCourseType) => string; refresh: () => void; emptyCache: () => void; };