import { memo } from 'react';

export const Skeleton = memo(function Skeleton({
  className,
  rounded,
}: {
  className?: string;
  rounded?: boolean;
}): JSX.Element {
  return (
    <div
      data-testid="skeleton"
      className={[
        'animate-pulse bg-bg-hover',
        rounded ? 'rounded-full' : 'rounded',
        className,
      ]
        .filter(Boolean)
        .join(' ')}
    />
  );
});
