import { Layout } from '@arco-design/web-react' import { WorkspacePage } from './workspace-body' import { WorkspaceInboxPage } from './workspace-inbox' import { ProjectChannelPage } from './projects/project-channel-page' import { ProjectRail } from './projects/project-rail' import { ProjectSidebar } from './projects/project-sidebar' import { ProjectStatusbar } from './projects/project-statusbar' import { ProjectTopbar } from './projects/project-topbar' import type { ChannelKey, Project, ProjectWorkspace, Theme, WorkbenchView } from './projects/project-types' const { Content } = Layout export function ProjectPage({ activeView, activeWorkspace, workspaces, activeChannel, activeTaskID, theme, onSelectProject, onSelectWorkspace, onSelectWorkspaceInbox, onSelectChannel, onSelectItem, onOpenTask, onCloseTask, onToggleTheme, }: { activeView: WorkbenchView activeWorkspace: ProjectWorkspace workspaces: ProjectWorkspace[] activeChannel: ChannelKey activeTaskID: string | null theme: Theme onSelectProject: (project: Project) => void onSelectWorkspace: () => void onSelectWorkspaceInbox: () => void onSelectChannel: (key: ChannelKey) => void onSelectItem: (title: string) => void onOpenTask: (project: Project, taskID: string) => void onCloseTask: () => void onToggleTheme: () => void }) { const isProject = activeView === 'project' const projects = workspaces.map((workspace) => workspace.project) return ( {isProject && ( )} {activeView === 'workspace' ? ( ) : activeView === 'workspace-inbox' ? ( ) : ( onOpenTask(activeWorkspace.project, taskID)} onCloseTask={onCloseTask} /> )} ) }