'use client'

import type { BrainfishRESTRequest } from '@/lib/api-docs/types'
import { RequestDetails } from './request-details'

interface ApiDocsContentProps {
  request: BrainfishRESTRequest | null
}

export function ApiDocsContent({ request }: ApiDocsContentProps) {
  if (!request) {
    return (
      <div className="flex-1 flex items-center justify-center bg-background">
        <div className="text-center">
          <p className="text-muted-foreground text-lg mb-2">Select an endpoint</p>
          <p className="text-sm text-muted-foreground">
            Choose an endpoint from the sidebar to view its documentation
          </p>
        </div>
      </div>
    )
  }

  return (
    <div className="flex-1 overflow-y-auto bg-background">
      <RequestDetails request={request} />
    </div>
  )
}
