'use client'

import type { ComponentRenderProps } from '@json-render/react'

export function InfoBlock({ element }: ComponentRenderProps) {
  const { label, name, lines } = element.props as { label: string; name: string; lines: string[] }

  return (
    <div>
      <h3 className="text-xs uppercase text-gray-400 tracking-wider mb-2 font-medium">{label}</h3>
      <div className="text-base font-semibold text-gray-900">{name}</div>
      <div className="text-sm text-gray-500 leading-relaxed mt-1">
        {lines.map((line, i) => <div key={i}>{line}</div>)}
      </div>
    </div>
  )
}
