import type { ReactNode, RefObject } from "react"

interface ChatWorkspaceProps {
  panelLead: ReactNode
  panelActions: ReactNode
  workspaceRef: RefObject<HTMLDivElement | null>
  statusNotice: ReactNode
  intentNotice: ReactNode
  bodyContent: ReactNode
  composerContent: ReactNode
}

export function ChatWorkspace({
  panelLead,
  panelActions,
  workspaceRef,
  statusNotice,
  intentNotice,
  bodyContent,
  composerContent
}: ChatWorkspaceProps) {
  return (
    <section className="chat-panel conversation-panel">
      <div className="conversation-panel-head conversation-panel-head-layout app-drag-region">
        <div className="conversation-panel-copy">
          {panelLead}
        </div>
        <div className="conversation-drag-strip" aria-hidden="true" />
        <div className="conversation-panel-actions app-no-drag">
          {panelActions}
        </div>
      </div>
      <div className="conversation-workspace" ref={workspaceRef}>
        {statusNotice}
        {intentNotice}
        <div className="conversation-panel-body">
          {bodyContent}
        </div>
        {composerContent}
      </div>
    </section>
  )
}
