'use client'

import { GHLRenderer } from '@/lib/GHLRenderer'
import campaignTree from '@/examples/campaign-stats.json'
import type { UITree } from '@json-render/core'
import Link from 'next/link'

export default function CampaignPage() {
  return (
    <div className="min-h-screen bg-gradient-to-br from-indigo-500 to-purple-600 p-5">
      <nav className="bg-white/90 rounded-lg px-4 py-2 flex items-center gap-3 mb-4 max-w-3xl mx-auto">
        <Link href="/" className="text-indigo-600 hover:text-indigo-800 text-sm font-medium">← Back</Link>
        <span className="text-gray-400">|</span>
        <span className="text-sm text-gray-600">Campaign Stats Demo</span>
        <span className="ml-auto text-xs text-gray-400 font-mono">JSON: campaign-stats.json</span>
      </nav>
      <div className="max-w-3xl mx-auto">
        <GHLRenderer tree={campaignTree as unknown as UITree} />
      </div>
    </div>
  )
}
