"use client"; import { IconCloudDownload, IconEye, IconChevronDown, IconGitBranch, IconGitCherryPick, IconGitMerge, IconArrowRight, IconLoader2, } from "@tabler/icons-react"; import { Button } from "@kandev/ui/button"; import { HoverCard, HoverCardContent, HoverCardTrigger } from "@kandev/ui/hover-card"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from "@kandev/ui/dropdown-menu"; import { PanelHeaderBarSplit } from "./panel-primitives"; function BranchHoverCard({ displayBranch, baseBranchDisplay, }: { displayBranch: string; baseBranchDisplay: string; }) { return ( Your code lives in: and will be merged into: {displayBranch} {baseBranchDisplay} ); } function PullDropdown({ behindCount, isLoading, loadingOperation, onPull, onRebase, }: { behindCount: number; isLoading: boolean; loadingOperation: string | null; onPull: () => void; onRebase: () => void; }) { const isPulling = loadingOperation === "pull"; const isRebasing = loadingOperation === "rebase"; const isPullRelated = isPulling || isRebasing; return ( {isPullRelated ? ( ) : ( )} {isPulling && "Pulling…"} {!isPulling && isRebasing && "Rebasing…"} {!isPulling && !isRebasing && "Pull"} {behindCount > 0 && !isPullRelated && ( {behindCount} )} {!isPullRelated && } Pull {behindCount > 0 && ( {behindCount} behind )} Rebase {behindCount > 0 && ( {behindCount} behind )} ); } export function ChangesPanelHeader({ hasChanges, hasCommits, hasPRFiles, displayBranch, baseBranchDisplay, behindCount, isLoading, loadingOperation, onOpenDiffAll, onOpenReview, onPull, onRebase, }: { hasChanges: boolean; hasCommits: boolean; hasPRFiles?: boolean; displayBranch: string | null; baseBranchDisplay: string; behindCount: number; isLoading: boolean; loadingOperation: string | null; onOpenDiffAll?: () => void; onOpenReview?: () => void; onPull: () => void; onRebase: () => void; }) { const showDiffReview = hasChanges || hasCommits || !!hasPRFiles; return ( Diff Review > ) : undefined } right={ <> {displayBranch && ( )} > } /> ); }