"use client"; import type { ComponentProps, RefObject } from "react"; import type { ApiDocument } from "@/lib/api/types"; import type { StudyIntent } from "@/lib/study-intents"; import { ConversationWorkspace } from "./ConversationWorkspace"; import { EmptyStudyWorkspace } from "./EmptyStudyWorkspace"; import { StudyComposer } from "./StudyComposer"; import { MobileTopBar } from "./WorkspacePanels"; import type { ChatMessage, StudyActionHandler } from "./types"; type MainWorkspaceProps = { activeIntent: StudyIntent; composerProps: ComponentProps; documents: ApiDocument[]; heroSubtitle: string; heroTitle: string; isLoading: boolean; messages: ChatMessage[]; onAction: StudyActionHandler; onClearSources: () => void; onNewChat: () => void; onOpenProfile: () => void; onOpenSources: () => void; onStartRender?: (topic: string, sourceId: string | null, minutes: number) => void; onToggleSource: (sourceId: string) => void; onUpload?: () => void; selectedDocuments: ApiDocument[]; studentName: string; threadEndRef: RefObject; }; export function MainWorkspace({ activeIntent, composerProps, documents, heroSubtitle, heroTitle, isLoading, messages, onAction, onClearSources, onNewChat, onOpenProfile, onOpenSources, onStartRender, onToggleSource, onUpload, selectedDocuments, studentName, threadEndRef, }: MainWorkspaceProps) { return (
{messages.length === 0 ? ( ) : ( )}
); }