import { createFileRoute } from '@tanstack/react-router'
import ImprintPage from '@/views/localized/legal/imprint/page'
import { DEFAULT_LOCALE } from '@/config'
import { createPageMetadata } from '@/lib/seo'
import { metadataToHead } from '@/lib/head'

export const Route = createFileRoute('/$lang/legal/imprint')({
  head: ({ params }) =>
    metadataToHead(
      createPageMetadata({
        locale: params.lang,
        canonicalLocale: DEFAULT_LOCALE,
        availableLocales: [DEFAULT_LOCALE],
        pathname: '/legal/imprint',
        title: 'Imprint',
        description: 'Legal notice and company information for HeyGermany.',
        index: params.lang === DEFAULT_LOCALE,
      })
    ),
  component: ImprintPage,
})
