import { ImageResponse } from "next/og";
import { EVENT } from "@/lib/config";

export const alt = EVENT.title;
export const size = { width: 1200, height: 630 };
export const contentType = "image/png";

export default function OpengraphImage() {
  return new ImageResponse(
    (
      <div
        style={{
          width: "100%",
          height: "100%",
          display: "flex",
          flexDirection: "column",
          justifyContent: "space-between",
          padding: 72,
          color: "white",
          background:
            "radial-gradient(circle at 15% 20%, rgba(36,91,219,0.75), transparent 55%), radial-gradient(circle at 85% 30%, rgba(117,69,200,0.7), transparent 55%), linear-gradient(135deg, #0b1328, #101A36)",
        }}
      >
        <div style={{ display: "flex", fontSize: 28, letterSpacing: 4, color: "#9fe8f0" }}>
          {EVENT.organizer.toUpperCase()} · {EVENT.year}
        </div>
        <div style={{ display: "flex", flexDirection: "column", gap: 24 }}>
          <div style={{ fontSize: 64, fontWeight: 800, lineHeight: 1.1 }}>
            Seminar Nasional dan Apresiasi GTK
          </div>
          <div style={{ fontSize: 34, color: "#c9d6ff" }}>Tingkat Provinsi NTB Tahun 2026</div>
        </div>
        <div
          style={{
            display: "flex",
            fontSize: 28,
            padding: "16px 28px",
            borderRadius: 999,
            border: "1px solid rgba(255,255,255,0.25)",
            background: "rgba(255,255,255,0.08)",
            alignSelf: "flex-start",
          }}
        >
          Tema: {EVENT.theme}
        </div>
      </div>
    ),
    size,
  );
}
