export const eventsRoutes = {
  events: (source?: string | null) => {
    if (!source) return '/events';

    const params = new URLSearchParams();
    params.append('source', source);
    return `/events?${params.toString()}`;
  },
  event: (id: number, source?: string) => {
    if (!source) return `/events/${id}`;

    const params = new URLSearchParams();
    params.append('source', source);
    return `/events/${id}?${params.toString()}`;
  },
  eventEdit: (id: number) => `${eventsRoutes.event(id)}/edit`,
  new: () => `${eventsRoutes.events()}/new`,
  liveStream: (id: number) => `${eventsRoutes.event(id)}/live-stream`,
};

export const eventsSkeletonRoutes = {
  new: () => '/events/new',
  edit: () => `${eventsRoutes.events()}/:id/edit`,
};
