import { apiRequest } from './client';

export interface Activity {
  id: string;
  title: string;
  titleEn: string;
  desc: string;
  descEn: string;
  coverUrl: string;
  videoUrl: string;
  link: string;
  isActive: boolean;
  sortOrder: number;
  createdAt: string;
  updatedAt: string;
}

export interface GetActivitiesParams {
  isActive?: boolean;
}

export async function getActivities(params: GetActivitiesParams = {}): Promise<Activity[]> {
  return apiRequest<{ data: Activity[] }>(`/api/activities`, {
    params
  }).then(res => res.data);
}
