? my $app = shift;

<ul id="tabset_menu">
  <li class="separate-bottom"><span>Edit Sets</span></li>
  <li><span>All tabs</span></li>
  <? for my $set ($app->tabsets) { ?>
    <li><span><?= $set->name ?></span></li>
  <? } ?>
  <script type="text/javascript">
    if (window.alice) {
      <? my $tabsets = {map {$_->name => $_->windows } $app->tabsets}; ?>
      alice.tabsets = <?= Text::MicroTemplate::encoded_string(JSON::encode_json $tabsets) ?>;
      alice.showSet(alice.selectedSet);
    }
  </script>
</ul>
