export const feedRoutes = {
  feed: () => '/feed',
  liveStream: () => `${feedRoutes.feed()}/live-stream`,
  post: {
    detail: (id: number | string) => `${feedRoutes.feed()}/${id}`,
    edit: (id: number | string) => `${feedRoutes.post.detail(id)}/edit`,
    share: (id: number | string) => `${feedRoutes.post.detail(id)}/share`,
    comment: (postId: number | string, commentId: number | string) =>
      `${feedRoutes.post.detail(postId)}/comments/${commentId}`,
    insights: (id: number | string) => `${feedRoutes.post.detail(id)}/insights`,
  },
  pendingPosts: () => `${feedRoutes.feed()}/pending-posts`,
  pinnedPosts: () => `${feedRoutes.feed()}/pinned-posts`,
  keyUpdates: (sourceId?: number | null) => {
    const base = `/key-updates`;
    return sourceId ? `${base}?sourceId=${sourceId}` : base;
  },
};

export const feedSkeletonRoutes = {
  feed: () => '/feed',
  post: {
    detail: () => `${feedSkeletonRoutes.feed()}/:id`,
    edit: () => `${feedSkeletonRoutes.post.detail()}/edit`,
    comment: () => `${feedSkeletonRoutes.post.detail()}/comments/:commentId`,
    insights: () => `${feedSkeletonRoutes.post.detail()}/insights`,
  },
};
