import type { Metadata } from 'next'
import { notFound } from 'next/navigation'
import SeoCategoryPage from '@/components/SeoCategoryPage'
import { getSpanishSeoPageBySlug } from '@/lib/spanishSeoPages'
import { siteConfig } from '@/lib/site'

const profile = getSpanishSeoPageBySlug('comparar-google-lens')

export const metadata: Metadata = !profile
  ? {}
  : {
      title: profile.metaTitle,
      description: profile.metaDescription,
      alternates: {
        canonical: profile.canonical,
        languages: {
          es: profile.canonical,
          'x-default': '/',
        },
      },
      openGraph: {
        title: profile.metaTitle,
        description: profile.metaDescription,
        url: `${siteConfig.domain}${profile.canonical}`,
        type: 'website',
        locale: 'es_ES',
        images: [{ url: '/og-image.png', width: 1200, height: 630, alt: profile.metaTitle }],
      },
      twitter: {
        card: 'summary_large_image',
        title: profile.metaTitle,
        description: profile.metaDescription,
        images: ['/og-image.png'],
      },
    }

export default function SpanishGoogleLensComparisonPage() {
  if (!profile) notFound()
  return <SeoCategoryPage profile={profile} />
}
