import type { Metadata } from 'next' import { basicMetadata } from '@/lib/seo' import { getTranslations, setRequestLocale } from 'next-intl/server' import { mockDb } from '@/lib/mockDb' import BusinessForm from './BusinessForm' interface AddBusinessPageProps { params: Promise<{ locale: string }> } export async function generateMetadata({ params }: AddBusinessPageProps): Promise { const { locale } = await params const title = locale === 'en' ? 'Add Your Business — Marmaris Local' : locale === 'ru' ? 'Добавить заведение — Marmaris Local' : 'İşletme Ekle — Marmaris Local' const description = locale === 'en' ? 'Apply to get your Marmaris business curated and featured with the Yerel Onaylı seal.' : locale === 'ru' ? 'Подайте заявку на включение вашего заведения в гид Marmaris Local.' : 'İşletmenizi Marmaris Local rehberine ekleyin ve Yerel Onaylı mührünü alın.' return basicMetadata(title, description, locale, '/add-business') } export default async function AddBusinessPage({ params }: AddBusinessPageProps) { const { locale } = await params setRequestLocale(locale) const t = await getTranslations('forms') const navT = await getTranslations('nav') // Fetch categories and neighborhoods to populate form select options const categories = await mockDb.getCategories() const neighborhoods = await mockDb.getNeighborhoods() const getLocalizedName = (obj: any) => { if (!obj) return '' return locale === 'ru' ? obj.nameRu : locale === 'en' ? obj.nameEn : obj.nameTr } const categoryOptions = categories.map(c => ({ value: c.id, label: getLocalizedName(c) })) const neighborhoodOptions = neighborhoods.map(n => ({ value: n.id, label: getLocalizedName(n) })) return (

{navT('addBusiness')}

marmaris local • yeni başvuru

) }