func Pages.Plugins(tytd,ctx)
{
  const userFlags = tytd.IsLoggedIn(ctx);
    
    var html= <null><if(UserFlags.CanManagePlugins(userFlags))><true><nav class="tabbed">
    <a class="active" hx-get="./plugins" hx-target="body" hx-push-url="true">
      <i>download_done</i>
      <span>Installed</span>
    </a>
    <a hx-get="./plugins-download" hx-target="body" hx-push-url="true">
      <i>download</i>
      <span>Download</span>
    </a>
  </nav>
    </true>
  </if>
    <each(var item : tytd.Plugins)>
        <raw(Components.InstalledPlugin(item))>

    </each>
  </null>;

  return Components.Shell("Installed plugins", UserFlags.CanUsePlugins(userFlags) ? html : <h1>You can{"'"}t use plugins</h1> ,2);
}