import React from 'react'
import { renderMarkdown } from '@/lib/markdownRenderer'

interface DocsContentProps {
  content: string
  loading: boolean
}

export function DocsContent({ content, loading }: DocsContentProps) {
  if (loading) {
    return (
      <div className="text-center py-12">
        <p className="text-cyber-accent">Chargement de la documentation...</p>
      </div>
    )
  }

  return (
    <div className="bg-cyber-dark border border-neon-cyan/20 rounded-lg p-8 backdrop-blur-sm">
      <div className="prose prose-invert max-w-none prose-headings:text-neon-cyan prose-headings:font-mono prose-p:text-cyber-accent prose-a:text-neon-green prose-a:hover:text-neon-cyan prose-strong:text-neon-green prose-code:text-neon-cyan prose-code:bg-cyber-darker prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-pre:bg-cyber-darker prose-pre:border prose-pre:border-neon-cyan/20 prose-blockquote:border-neon-cyan/50 prose-blockquote:text-cyber-accent/70 prose-ul:text-cyber-accent prose-ol:text-cyber-accent prose-li:marker:text-neon-cyan">
        {renderMarkdown(content)}
      </div>
    </div>
  )
}

