import { type SpaceListFilters, type SpaceListConfig, type SpaceListFetchOptions } from "../../store/slices/spaceListsSlice"; import { Space, ReadingPermission, PostingPermission } from "../../interfaces/models/Space"; import { SpaceListSortByOptions } from "../../interfaces/SpaceListSortByOptions"; export interface UseSpaceListProps { listId: string; } export interface SpaceListCreateSpaceProps { name: string; slug?: string | null; description?: string | null; readingPermission?: ReadingPermission; postingPermission?: PostingPermission; requireJoinApproval?: boolean; metadata?: Record; parentSpaceId?: string | null; insertPosition?: "first" | "last"; } export interface SpaceListDeleteSpaceProps { spaceId: string; } export interface UseSpaceListValues { spaces: Space[]; loading: boolean; hasMore: boolean; sortBy: SpaceListSortByOptions | null; searchSlug: string | null; searchName: string | null; searchDescription: string | null; searchAny: string | null; memberOf: boolean; parentSpaceId: string | null; fetchSpaces: (filters: Partial, config?: SpaceListConfig, options?: SpaceListFetchOptions) => void; loadMore: () => void; createSpace: (props: SpaceListCreateSpaceProps) => Promise; deleteSpace: (props: SpaceListDeleteSpaceProps) => Promise; } declare function useSpaceList({ listId }: UseSpaceListProps): UseSpaceListValues; export default useSpaceList;