import { apiClient, API_ENDPOINTS } from '@/services/api'
import type { PaginatedActivityResponse } from '@/types/activity'

async function getGroupActivity(
    groupId: number,
    limit: number,
    cursor?: number | null
): Promise<PaginatedActivityResponse> {
    const endpoint = API_ENDPOINTS.ACTIVITY.GET_BY_GROUP(groupId);
    const params: Record<string, any> = { limit };
    if (cursor) {
        params.cursor = cursor;
    }
    const response = await apiClient.get(endpoint, { params });
    return response.data as PaginatedActivityResponse;
}

export const activityService = {
    getGroupActivity,
}; 