import { ScrollArea } from "@/components/ui/scroll-area"; import { Separator } from "@/components/ui/separator"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { cn } from "@/utils/ui"; interface PanelBaseViewProps { children?: React.ReactNode; defaultTab?: string; value?: string; onValueChange?: (value: string) => void; tabs?: { value: string; label: string; icon?: React.ReactNode; content: React.ReactNode; }[]; className?: string; ref?: React.RefObject; } function ViewContent({ children, className, }: { children: React.ReactNode; className?: string; }) { return (
{children}
); } export function PanelBaseView({ children, defaultTab, value, onValueChange, tabs, className = "", ref, }: PanelBaseViewProps) { return (
{!tabs || tabs.length === 0 ? ( {children} ) : (
{tabs.map((tab) => ( {tab.icon ? ( {tab.icon} ) : null} {tab.label} ))}
{tabs.map((tab) => ( {tab.content} ))}
)}
); }