Hide panel sidebar menu items depending on user role

Hi,

I am using this method: panel.menu | Kirby CMS to add some custom items to the panel sidebar. I would like to have some of these hidden if the logged in user role is not “admin”. Is this possible? Below is an example of one of the custom items I would like to hide based on user role:

'primary' => [
  'icon' => 'primary',
  'label' => 'Primary schools',
  'link' => 'pages/primary',
    'current' => function () {
      $path = App::instance()->request()->path()->toString();
      return Str::contains($path, 'pages/primary');
    }
  ],

You could create two separate menu.php files (menu-a, menu-b), and require them conditionally for the panel.menu option inside the ready prop.

Just the job, thank you