import * as React from 'react';
import { cn } from '@/lib/utils';

// Minimal scroll-area wrapper — Radix has a fancier version, but native
// overflow with our styled scrollbar is good enough for the logbook table.
export interface ScrollAreaProps extends React.HTMLAttributes<HTMLDivElement> {}

export const ScrollArea = React.forwardRef<HTMLDivElement, ScrollAreaProps>(
  ({ className, children, ...props }, ref) => (
    <div ref={ref} className={cn('relative overflow-auto', className)} {...props}>
      {children}
    </div>
  ),
);
ScrollArea.displayName = 'ScrollArea';
