import ReactMarkdown from 'react-markdown';

export default function DocViewer({ content }) {
  if (!content) {
    return (
      <div className="rounded-lg border border-white/10 bg-white/[0.03] p-8 text-center text-sm text-slate-500">
        Generated documentation will appear here.
      </div>
    );
  }

  return (
    <article className="markdown-body rounded-lg border border-white/10 bg-white/[0.04] p-6">
      <ReactMarkdown>{content}</ReactMarkdown>
    </article>
  );
}
