import type { SidebarProjectEntry } from "@/hooks/use-sidebar-workspaces-list"; export interface SidebarProjectSectionRowModel { kind: "project_section"; chevron: "expand" | "collapse"; trailingAction: "new_worktree" | "none"; } export type SidebarProjectRowModel = SidebarProjectSectionRowModel; export function buildSidebarProjectRowModel(input: { project: SidebarProjectEntry; collapsed: boolean; }): SidebarProjectRowModel { return { kind: "project_section", chevron: input.collapsed ? "expand" : "collapse", trailingAction: input.project.canCreateWorktree ? "new_worktree" : "none", }; }