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

export const Route = createFileRoute('/$lang/legal/terms-and-conditions')({
  head: ({ params }) =>
    metadataToHead(
      createPageMetadata({
        locale: params.lang,
        canonicalLocale: DEFAULT_LOCALE,
        availableLocales: [DEFAULT_LOCALE],
        pathname: '/legal/terms-and-conditions',
        title: 'Terms and Conditions',
        description: 'Terms and conditions for using the HeyGermany platform and services.',
        index: params.lang === DEFAULT_LOCALE,
      })
    ),
  component: TermsPage,
})
