export const groupsRoutes = {
  groups: () => '/groups',
  groupsPinned: () => '/groups?tab=pinned',
  detail: (id: number | string) => `${groupsRoutes.groups()}/${id}`,
  configuration: (id: number | string) =>
    `${groupsRoutes.groups()}/${id}/configuration`,
  liveStream: (id: number | string) => `${groupsRoutes.detail(id)}/live-stream`,
  pinnedPosts: (id: number | string) =>
    `${groupsRoutes.detail(id)}/pinned-posts`,
  post: {
    detail: (groupId: number | string, id: number | string) =>
      `${groupsRoutes.detail(groupId)}/post/${id}`,
    edit: (groupId: number | string, id: number | string) =>
      `${groupsRoutes.detail(groupId)}/post/${id}/edit`,
    share: (groupId: number | string, id: number | string) =>
      `${groupsRoutes.post.detail(groupId, id)}/share`,
    insights: (groupId: number | string, id: number | string) =>
      `${groupsRoutes.post.detail(groupId, id)}/insights`,
  },
  create: () => `${groupsRoutes.groups()}/create`,
};

export const groupsSkeletonRoutes = {
  groups: () => '/groups',
  post: {
    detail: () => `${groupsSkeletonRoutes.groups()}/:id/post/:postId`,
    insights: () => `${groupsSkeletonRoutes.post.detail()}/insights`,
  },
};
