'use client' import { ChevronLeft, RotateCcw, X } from 'lucide-react' import Image from 'next/image' import { useIsMobile } from '../../../hooks/use-mobile' import { cn } from '../../../lib/utils' interface PanelWrapperProps { title: string icon?: string onClose?: () => void onReset?: () => void onBack?: () => void children: React.ReactNode className?: string width?: number | string } export function PanelWrapper({ title, icon, onClose, onReset, onBack, children, className, width = 320, // default width }: PanelWrapperProps) { const isMobile = useIsMobile() return (
{/* Header — desktop only; mobile sheet provides its own header */} {!isMobile && (
{onBack && ( )} {icon && ( )}

{title}

{onReset && ( )} {onClose && ( )}
)} {/* Content */}
{children}
) }