UNPKG

@replyke/core

Version:

Replyke: Build interactive apps with social features like comments, votes, feeds, user lists, notifications, and more.

33 lines (32 loc) 897 B
import { List } from "../../interfaces/models/List"; export interface UseListsDataProps { } export interface UseListsDataValues { currentList: List | null; subLists: List[]; loading: boolean; openList: (list: List) => void; goBack: () => void; goToRoot: () => void; isEntityInList: (selectedEntityId: string) => boolean; createList: (props: { listName: string; }) => Promise<void>; updateList: (props: { listId: string; update: Partial<{ name: string; }>; }) => Promise<void>; deleteList: (props: { list: List; }) => Promise<void>; addToList: (props: { entityId: string; }) => Promise<void>; removeFromList: (props: { entityId: string; }) => Promise<void>; } declare function useListsData(_: UseListsDataProps): UseListsDataValues; export default useListsData;