import { getIconByIconName } from "@/components/Icons/get-icon-by-icon-name" import Image from "@/components/Image" import LanguageSwitcher from "@/components/LanguageSwitcher" import Link from "@/components/TempDesignSystem/Link" import Footnote from "@/components/TempDesignSystem/Text/Footnote" import { getIntl } from "@/i18n" import { getLang } from "@/i18n/serverContext" import styles from "./details.module.css" import type { FooterDetailsProps } from "@/types/components/footer/navigation" import type { SocialIconsProps } from "@/types/components/footer/socialIcons" import { IconName } from "@/types/components/icon" function SocialIcon({ iconName }: SocialIconsProps) { const SocialIcon = getIconByIconName(iconName as IconName) return SocialIcon ? : {iconName} } export default async function FooterDetails({ socialMedia, tertiaryLinks, languageUrls, }: FooterDetailsProps) { const lang = getLang() const { formatMessage } = await getIntl() const currentYear = new Date().getFullYear() return ( {socialMedia?.links.map( (link) => link.href && ( ) )} © {currentYear}{" "} {formatMessage({ id: "Copyright all rights reserved" })} {tertiaryLinks?.map( (link) => link.url && ( {link.title} ) )} {languageUrls && ( )} ) }