'use client'

import { GHLRenderer } from '@/lib/GHLRenderer'
import invoiceTree from '@/examples/invoice-preview.json'
import type { UITree } from '@json-render/core'
import Link from 'next/link'

export default function InvoicePage() {
  return (
    <div className="min-h-screen bg-gray-50">
      <nav className="bg-white border-b border-gray-200 px-4 py-2 flex items-center gap-3">
        <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">Invoice Preview Demo</span>
        <span className="ml-auto text-xs text-gray-400 font-mono">JSON: invoice-preview.json</span>
      </nav>
      <div className="max-w-3xl mx-auto p-6">
        <GHLRenderer tree={invoiceTree as unknown as UITree} />
      </div>
    </div>
  )
}
