import { Metadata } from 'next'; import { notFound } from 'next/navigation'; import Link from 'next/link'; import { MapPin, Clock, Phone, ArrowRight } from 'lucide-react'; import { getDistrictBySlug, getAllDistrictSlugs, wroclawDistricts } from '@/content/wroclaw-districts'; import { HeroSection } from '@/components/sections/HeroSection'; import { ProcessSteps } from '@/components/sections/ProcessSteps'; import { PricingTable } from '@/components/sections/PricingTable'; import { WhyUs } from '@/components/sections/WhyUs'; import { FaqAccordion } from '@/components/sections/FaqAccordion'; import { CtaBanner } from '@/components/sections/CtaBanner'; import { Testimonials } from '@/components/sections/Testimonials'; import { acProcessSteps } from '@/content/process'; import { companyDetails } from '@/content/company'; interface Props { params: Promise<{ dzielnica: string }>; } export async function generateStaticParams() { return getAllDistrictSlugs().map((d) => ({ dzielnica: d.slug })); } export async function generateMetadata({ params }: Props): Promise { const { dzielnica } = await params; const district = getDistrictBySlug(dzielnica); if (!district) return { title: 'Nie znaleziono' }; return { title: district.seoTitle, description: district.seoDescription, alternates: { canonical: `/klimatyzacja/wroclaw/${district.slug}` }, openGraph: { title: district.seoTitle, description: district.seoDescription, }, }; } export default async function DzielnicaPage({ params }: Props) { const { dzielnica } = await params; const district = getDistrictBySlug(dzielnica); if (!district) notFound(); const otherDistricts = wroclawDistricts.filter((d) => d.slug !== district.slug); const jsonLd = { "@context": "https://schema.org", "@type": "HVACBusiness", "name": companyDetails.name, "telephone": companyDetails.phone, "email": companyDetails.email, "url": `${process.env.NEXT_PUBLIC_BASE_URL || 'https://thermcool.pl'}/klimatyzacja/wroclaw/${district.slug}`, "address": { "@type": "PostalAddress", "streetAddress": companyDetails.address.street, "addressLocality": "Wrocław", "postalCode": companyDetails.address.zipCode, "addressCountry": "PL", }, "areaServed": { "@type": "Place", "name": district.name }, "priceRange": "$$", }; return (