import * as routes from "@/constants/routes/myPages"

import { getIntl } from "@/i18n"

import type { Lang } from "@/constants/languages"
import type { MyPagesLink } from "./MyPagesLink"

export async function getSecondaryLinks({
  lang,
}: {
  lang: Lang
}): Promise<MyPagesLink[]> {
  const intl = await getIntl({ lang })
  const menuItems: MyPagesLink[] = [
    {
      type: "link",
      text: intl.formatMessage({
        defaultMessage: "About Scandic Friends",
      }),
      href: routes.scandicFriends[lang],
    },
    {
      type: "link",
      text: intl.formatMessage({
        defaultMessage: "My profile",
      }),
      href: routes.profile[lang],
    },
  ]

  return menuItems
}
