import Link from "next/link"; import { ArrowRight, Sparkles } from "lucide-react"; import type { SiteSettingsRow, StatItem } from "@/lib/types"; const DEFAULT_STATS: StatItem[] = [ { value: "150+", label: "Tamamlanan proje" }, { value: "50+", label: "Aktif müşteri" }, { value: "100%", label: "Memnuniyet" }, { value: "24/7", label: "Teknik destek" }, ]; function parseStats(items?: string[] | null): StatItem[] { if (!items || items.length === 0) return DEFAULT_STATS; const out: StatItem[] = []; for (const raw of items) { try { const obj = JSON.parse(raw) as Partial; if (obj.value && obj.label) out.push({ value: obj.value, label: obj.label }); } catch { /* ignore */ } } return out.length > 0 ? out : DEFAULT_STATS; } export function Hero({ settings }: { settings?: SiteSettingsRow | null }) { const badge = settings?.hero_badge ?? "Kocaeli Web Tasarım & Yazılım Ajansı"; const title = settings?.hero_title ?? "Kocaeli Web Tasarım ve Yazılım Ajansı"; const subtitle = settings?.hero_subtitle ?? "Kocaeli ve İzmit'te profesyonel web tasarım, SEO optimizasyonu ve özel yazılım çözümleri. 2015'ten bu yana işletmelere dijital dönüşümde rehberlik ediyoruz."; const primaryLabel = settings?.hero_cta_primary_label ?? "Ücretsiz Teklif Al"; const primaryHref = settings?.hero_cta_primary_href ?? "/iletisim"; const secondaryLabel = settings?.hero_cta_secondary_label ?? "Hizmetlerimizi İnceleyin"; const secondaryHref = settings?.hero_cta_secondary_href ?? "/hizmetler"; const stats = parseStats(settings?.hero_stats); return (
{/* Grid pattern overlay */}
{badge}

{title.split(" ").map((word, i, arr) => { // Highlight key words in blue (Web Tasarım, Yazılım) const highlight = word.toLowerCase().includes("web") || word.toLowerCase().includes("tasarım") || word.toLowerCase().includes("yazılım") || word.toLowerCase().includes("ajansı"); return ( {word} {i < arr.length - 1 && " "} ); })}

{subtitle}

{primaryLabel} {secondaryLabel}
{/* Stats strip — pinned bottom of hero */} {stats.length > 0 && (
{stats.map((stat) => (

{stat.value}

{stat.label}

))}
)}
); }