import type { ReactNode } from 'react' import Link from 'next/link' import VersionTag from '@components/version/version' export type Lang = 'no' | 'en' export type BilingualString = string | { no: string; en: string } export type FooterColumn = { heading: BilingualString items: { label: BilingualString; href?: string }[] } export type FooterSocialLink = { title: string href: string icon: ReactNode hoverClass?: string } export type FooterProps = { logo: ReactNode sponsor?: { node: ReactNode; label?: BilingualString } columns?: FooterColumn[] socialLinks?: FooterSocialLink[] copyright: BilingualString version?: { tag: string; href: string } lang?: Lang className?: string } function t(s: BilingualString, lang: Lang): string { return typeof s === 'string' ? s : s[lang] } function Column({ col, lang }: { col: FooterColumn; lang: Lang }) { return (
{t(item.label, lang)}
) )}{t(sponsor.label, lang)}
)}{lang === 'no' ? 'Opphavsrett' : 'Copyright'} © {year} {t(copyright, lang)}
{version && (