'use client' import { ReactNode } from 'react' import { Button } from '@/components/ui/button' import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip' import { ChevronLeft, LucideIcon } from 'lucide-react' import { cn } from '@/lib/utils' interface CollapsibleColumnProps { isCollapsed: boolean onToggle: () => void collapsedIcon: LucideIcon collapsedLabel: string children: ReactNode } export function CollapsibleColumn({ isCollapsed, onToggle, collapsedIcon: CollapsedIcon, collapsedLabel, children, }: CollapsibleColumnProps) { const isCJK = /[\u4e00-\u9fa5\u3040-\u30ff\uac00-\ud7af]/.test(collapsedLabel); if (isCollapsed) { return (

Expand {collapsedLabel}

) } return (
{children}
) } // Factory function to create a collapse button for card headers export function createCollapseButton(onToggle: () => void, label: string) { return (

Collapse {label}

) }