import type { Metadata } from 'next' import Link from 'next/link' import { notFound } from 'next/navigation' import { getDictionary, LOCALES, type Locale } from '@/lib/i18n' import { SERVICE_SLUGS } from '@/lib/services' import { breadcrumbSchema } from '@/lib/breadcrumbs' import { Server, Shield, Headphones, Camera, Network, HardDrive, Phone, Cloud, CheckCircle2, ChevronRight } from 'lucide-react' const ICONS = [Server, Shield, Headphones, Camera, Network, HardDrive, Phone, Cloud] export function generateStaticParams() { return LOCALES.flatMap(lang => SERVICE_SLUGS.map(slug => ({ lang, slug })) ) } export async function generateMetadata({ params }: { params: Promise<{ lang: string; slug: string }> }): Promise { const { lang, slug } = await params const d = getDictionary(lang) const svc = d.services.items.find(s => s.slug === slug) if (!svc) return {} const orgName = lang === 'ru' ? 'Сисадмингрупп' : 'SysadminGroup' return { title: svc.title, description: svc.description, alternates: { canonical: `https://sag24.ru/${lang}/uslugi/${slug}/`, languages: { 'ru': `https://sag24.ru/ru/uslugi/${slug}/`, 'en': `https://sag24.ru/en/uslugi/${slug}/`, 'x-default': `https://sag24.ru/ru/uslugi/${slug}/`, }, }, openGraph: { title: `${svc.title} | ${orgName}`, description: svc.description, url: `https://sag24.ru/${lang}/uslugi/${slug}/`, siteName: orgName, locale: lang === 'ru' ? 'ru_RU' : 'en_US', images: [{ url: '/og-image.png' }], }, } } export default async function ServicePage({ params }: { params: Promise<{ lang: string; slug: string }> }) { const { lang: langStr, slug } = await params const lang = langStr as Locale const d = getDictionary(lang) const idx = d.services.items.findIndex(s => s.slug === slug) if (idx === -1) notFound() const svc = d.services.items[idx] const Icon = ICONS[idx] return (

{svc.title}

{svc.description}

{lang === 'ru' ? 'Обсудить проект' : 'Discuss project'}

{lang === 'ru' ? 'Что включено' : 'What is included'}

    {svc.points.map((point, i) => (
  • {point}
  • ))}

{lang === 'ru' ? 'Нужна консультация?' : 'Need a consultation?'}

{lang === 'ru' ? 'Свяжитесь с нами — обсудим детали и рассчитаем стоимость.' : 'Contact us — we will discuss details and calculate the cost.'}

+7 495 363-74-76 {lang === 'ru' ? 'Написать нам' : 'Write to us'}
← {lang === 'ru' ? 'Все услуги' : 'All services'}