import React from 'react';
import { MenubarItem, MenubarSeparator } from '@/components/ui/menubar';

const MenuItem = ({ item, onMenuClick }) => {
  if (item.type === 'separator') {
    return <MenubarSeparator />;
  }

  return (
      <MenubarItem onClick={() => onMenuClick(item.action, item.screen)}>
        {item.label}
      </MenubarItem>
  );
};

export default MenuItem;
