import { SectionTitle } from "@/components/section-title"; import type { ProcessStep, SiteSettingsRow } from "@/lib/types"; const DEFAULT: ProcessStep[] = [ { title: "Ücretsiz keşif görüşmesi", description: "İhtiyacınızı dinliyoruz, hedeflerinizi anlıyoruz. 30 dakika.", }, { title: "Teklif ve plan", description: "Kapsam, takvim ve bütçeyi netleştirip yazılı teklif sunuyoruz.", }, { title: "Tasarım + geliştirme", description: "Sprint bazlı çalışıyoruz, her hafta demo. Geri bildirim alıp ilerliyoruz.", }, { title: "Yayın + destek", description: "Lansman + 1 yıl ücretsiz bakım. Performans takibi ve büyütme önerileri.", }, ]; function parse(items?: string[] | null): ProcessStep[] { if (!items || items.length === 0) return DEFAULT; const out: ProcessStep[] = []; for (const raw of items) { try { const obj = JSON.parse(raw) as Partial; if (obj.title && obj.description) out.push({ title: obj.title, description: obj.description }); } catch { /* ignore */ } } return out.length > 0 ? out : DEFAULT; } export function ProcessSteps({ settings, }: { settings?: SiteSettingsRow | null; }) { const steps = parse(settings?.process_steps); return (
{steps.map((s, i) => (
{i + 1}

{s.title}

{s.description}

))}
); }