import { createFileRoute } from '@tanstack/react-router'
import PrivacyPage from '@/views/[lang]/legal/privacy/page'
import { DEFAULT_LOCALE } from '@/config'
import { createPageMetadata } from '@/lib/seo'
import { metadataToHead } from '@/framework/head'

export const Route = createFileRoute('/$lang/legal/privacy')({
  head: ({ params }) =>
    metadataToHead(
      createPageMetadata({
        locale: params.lang,
        canonicalLocale: DEFAULT_LOCALE,
        availableLocales: [DEFAULT_LOCALE],
        pathname: '/legal/privacy',
        title: 'Privacy Policy',
        description: 'How HeyGermany collects, uses, and protects personal data.',
        index: params.lang === DEFAULT_LOCALE,
      })
    ),
  component: PrivacyPage,
})
