import { MetadataRoute } from 'next' import { germanSeoPageSlugs, getGermanSeoPageBySlug } from '@/lib/seoPages' import { spanishSeoPageProfiles, spanishSeoPageSlugs } from '@/lib/spanishSeoPages' export default function sitemap(): MetadataRoute.Sitemap { const baseUrl = (process.env.NEXT_PUBLIC_SITE_URL || 'https://greenlenspro.com').trim() return [ { url: baseUrl, lastModified: new Date('2026-04-27'), changeFrequency: 'weekly', priority: 1, }, { url: `${baseUrl}/support`, lastModified: new Date('2026-04-08'), changeFrequency: 'monthly', priority: 0.5, }, { url: `${baseUrl}/plant-identifier-app`, lastModified: new Date('2026-04-27'), changeFrequency: 'monthly', priority: 0.8, }, { url: `${baseUrl}/plant-disease-identifier`, lastModified: new Date('2026-04-27'), changeFrequency: 'monthly', priority: 0.75, }, { url: `${baseUrl}/plant-care-app`, lastModified: new Date('2026-04-27'), changeFrequency: 'monthly', priority: 0.75, }, { url: `${baseUrl}/vs/picturethis`, lastModified: new Date('2026-04-27'), changeFrequency: 'monthly', priority: 0.65, }, { url: `${baseUrl}/vs/plantum`, lastModified: new Date('2026-04-27'), changeFrequency: 'monthly', priority: 0.65, }, { url: `${baseUrl}/vs/inaturalist`, lastModified: new Date('2026-04-27'), changeFrequency: 'monthly', priority: 0.65, }, { url: `${baseUrl}/vs/google-lens`, lastModified: new Date('2026-05-10'), changeFrequency: 'monthly', priority: 0.75, }, { url: `${baseUrl}/flower-scanner`, lastModified: new Date('2026-04-27'), changeFrequency: 'monthly', priority: 0.8, }, { url: `${baseUrl}/identify-plant-photo`, lastModified: new Date('2026-04-27'), changeFrequency: 'monthly', priority: 0.8, }, { url: `${baseUrl}/plant-scanner`, lastModified: new Date('2026-04-27'), changeFrequency: 'monthly', priority: 0.8, }, { url: `${baseUrl}/houseplant-identifier`, lastModified: new Date('2026-04-27'), changeFrequency: 'monthly', priority: 0.75, }, { url: `${baseUrl}/succulent-identifier`, lastModified: new Date('2026-04-27'), changeFrequency: 'monthly', priority: 0.75, }, { url: `${baseUrl}/best-plant-identification-app`, lastModified: new Date('2026-04-27'), changeFrequency: 'monthly', priority: 0.85, }, { url: `${baseUrl}/plant-health-app`, lastModified: new Date('2026-04-27'), changeFrequency: 'monthly', priority: 0.8, }, { url: `${baseUrl}/imprint`, lastModified: new Date('2026-04-08'), changeFrequency: 'monthly', priority: 0.3, }, { url: `${baseUrl}/privacy`, lastModified: new Date('2026-04-08'), changeFrequency: 'monthly', priority: 0.3, }, { url: `${baseUrl}/terms`, lastModified: new Date('2026-04-08'), changeFrequency: 'monthly', priority: 0.3, }, ...germanSeoPageSlugs.map((slug) => { const profile = getGermanSeoPageBySlug(slug) return { url: `${baseUrl}${profile?.canonical ?? `/${slug}`}`, lastModified: new Date('2026-05-20'), changeFrequency: 'monthly' as const, priority: slug === 'pflanzen-erkennen-kostenlos' || slug === 'pflanzen-erkennen-app' ? 0.85 : 0.75, } }), { url: `${baseUrl}/es`, lastModified: new Date('2026-05-20'), changeFrequency: 'monthly', priority: 0.85, }, ...spanishSeoPageSlugs.map((slug) => ({ url: `${baseUrl}${spanishSeoPageProfiles[slug].canonical}`, lastModified: new Date('2026-05-20'), changeFrequency: 'monthly' as const, priority: slug === 'identificador-de-plantas' ? 0.85 : 0.75, })), ] }