import React from 'react';

type Props = {
  children: React.ReactNode;
} & React.HTMLAttributes<HTMLDivElement>;

function MenuItemRendererComponent({ children, ...rest }: Props) {
  return (
    <div
      {...rest}
      className={`${rest.className} transition-all duration-200 ease-out w-full min-h-36 bg-white rounded-3xl px-4 flex items-center justify-between gap-4`}
      style={{
        boxShadow: '0px 2px 16px 0px #00000014'
      }}>

      {children}
    </div>
  );
}

// Memoize with shallow comparison of props
const MenuItemRenderer = React.memo(MenuItemRendererComponent, (prevProps, nextProps) => {
  return prevProps.className === nextProps.className && prevProps.children === nextProps.children;
});

export default MenuItemRenderer;
