/**
* TabItem — local shell shows zsh/bash badge like professional terminal UIs
*/
import { X, Terminal, FolderSync, Cable, Crown, TerminalSquare } from 'lucide-react'
import type { Tab } from '../../../stores/tabStore'
interface TabItemProps {
tab: Tab
index: number
isActive: boolean
isDragging: boolean
dragOverIndex: number | null
onActivate: () => void
onClose: (e: React.MouseEvent) => void
onContextMenu: (e: React.MouseEvent) => void
onDragStart: (e: React.DragEvent, index: number) => void
onDragOver: (e: React.DragEvent, index: number) => void
onDrop: (e: React.DragEvent, index: number) => void
onDragEnd: () => void
}
function LocalShellBadge({ kind }: { kind?: string }) {
const k = (kind || 'unknown').toLowerCase()
if (k === 'zsh') {
return (
zsh
)
}
if (k === 'bash') {
return (
$_
)
}
if (k === 'fish') {
return (
fi
)
}
return (
sh
)
}
export function TabItem({
tab,
index,
isActive,
isDragging,
dragOverIndex,
onActivate,
onClose,
onContextMenu,
onDragStart,
onDragOver,
onDrop,
onDragEnd,
}: TabItemProps) {
const isLocalTerm = tab.type === 'terminal' && tab.isLocal
const getIcon = () => {
if (isLocalTerm) {
return