import {
  GlobalScrollbar as GScrollbar,
  type GlobalScrollbarProps,
  MacScrollbar,
  type MacScrollbarProps,
} from 'mac-scrollbar';

export const GlobalScrollbar: React.FC<GlobalScrollbarProps> = (props) => {
  return (
    <GScrollbar
      trackStyle={(horizontal) => (horizontal ? { height: 0 } : { width: 0 })}
      {...props}
    />
  );
};

export const Scrollbar: React.FC<MacScrollbarProps> = (props) => {
  const { className = '', ...rest } = props;

  return (
    <MacScrollbar
      trackStyle={(horizontal) => (horizontal ? { height: 0 } : { width: 0 })}
      {...rest}
      className={`text-theme ${className}`}
    />
  );
};
