import { SCGroupType, SCUserType } from '@selfcommunity/types'; /** :::info This custom hook is used to manage the groups followed. ::: :::tip How to use it: Follow these steps: ```jsx 1. const scUserContext: SCUserContextType = useSCUser(); 2. const scSubscribedGroupsManager: SCSubscribedGroupsManagerType = scUserContext.manager.groups; 3. scSubscribedGroupsManager.isSubscribed(group) ``` ::: */ export default function useSCSubscribedGroupsManager(user?: SCUserType): { groups: any[]; loading: any[]; isLoading: (v: number | { id: number; }) => boolean; subscribe?: undefined; unsubscribe?: undefined; subscriptionStatus?: undefined; refresh?: undefined; emptyCache?: undefined; } | { groups: any[]; loading: any[]; isLoading: (v: number | { id: number; }) => boolean; subscribe: (group: SCGroupType) => Promise; unsubscribe: (group: SCGroupType) => Promise; subscriptionStatus: (group: SCGroupType) => string; refresh: () => void; emptyCache: () => void; };