import { Icon } from '../../Atoms/Icon/Icon';
import { Button } from '../../Atoms/Button/Button';

export const EmptyState = ({
  icon = 'DocumentIcon',
  title = 'No hay datos',
  description = 'No se encontraron elementos para mostrar.',
  actionLabel,
  onAction,
  className = '',
  ...props
}) => {
  return (
    <div className={`flex flex-col items-center justify-center py-12 px-4 ${className}`} {...props}>
      <div className="mb-4">
        <Icon name={icon} className="h-16 w-16 text-gray-400" />
      </div>
      <h3 className="text-lg font-semibold text-gray-900 mb-2">{title}</h3>
      <p className="text-sm text-gray-500 text-center max-w-sm mb-4">{description}</p>
      {actionLabel && onAction && (
        <Button variant="primary" onClick={onAction}>
          {actionLabel}
        </Button>
      )}
    </div>
  );
};

export default EmptyState;

