import { ImageResponse } from 'next/og';

export const runtime = 'edge';

export async function GET(_: Request, { params }: { params: Promise<{ shareKey: string }> }) {
  const { shareKey } = await params;
  return new ImageResponse(
    (
      <div
        style={{
          width: '1200px',
          height: '630px',
          background: 'linear-gradient(135deg, #070a10, #111c2d)',
          color: '#edf4ff',
          display: 'flex',
          flexDirection: 'column',
          justifyContent: 'center',
          padding: '72px',
          fontFamily: 'sans-serif',
        }}
      >
        <div style={{ color: '#d8ad53', fontSize: 34, fontWeight: 900, letterSpacing: 8 }}>GGTI</div>
        <div style={{ marginTop: 40, fontSize: 78, fontWeight: 900 }}>롤 플레이 성향 분석</div>
        <div style={{ marginTop: 24, fontSize: 34, color: '#93a4bb' }}>공유 코드 {shareKey}</div>
      </div>
    ),
    { width: 1200, height: 630 },
  );
}
