import Link from "next/link";
import { notFound } from "next/navigation";
const logs: Record<string, any> = {
  "freedash-showcase": { title:"Added FreeDash showcase", date:"Aug 2026", desc:"Full case study + live preview fallback for X-Frame DENY." },
  "uses-page": { title:"Added Uses page", date:"Aug 2026", desc:"Toolkit, workstation, zyphron stack, live preview." },
  "portfolio-animations": { title:"Improved portfolio animations", date:"Aug 2026", desc:"Parallax, grain, orbit, stagger, reduced-motion." },
};
export function generateStaticParams(){ return Object.keys(logs).map(slug=>({ slug })); }
export default async function ChangelogDetail({ params }: { params: Promise<{ slug:string }> }) {
  const { slug } = await params; const l = logs[slug]; if (!l) notFound();
  return (
    <div className="pt-24 bg-[#07080c] min-h-[60vh]">
      <div className="max-w-[700px] mx-auto px-6 sm:px-8 py-12">
        <Link href="/changelog" className="text-xs tracking-widest text-white/30 hover:text-white uppercase">← Changelog</Link>
        <p className="text-xs tracking-widest text-blue-300 mt-6">{l.date}</p>
        <h1 className="text-2xl font-bold text-white mt-1">{l.title}</h1>
        <p className="text-sm text-white/60 mt-2 leading-relaxed">{l.desc}</p>
        <div className="mt-6 rounded-xl border border-white/10 bg-white/[0.04] h-40 grid place-items-center text-white/20 text-xs">Images • Related projects • Blog posts</div>
      </div>
    </div>
  );
}
