% if(@sorted){
% $m->out($table);
% }

<%INIT>
require CIF::Utils;
require HTML::Table;
my $table = HTML::Table->new(
    -head           => ['Group Name','Default','GUID'],
    -class          => 'collection',
    -evenrowclass   => 'evenline',
    -oddrowclass    => 'oddline',
);
my @sorted = sort { $groups{$a} <=> $groups{$b} } keys(%groups);
my @guid = map { CIF::Utils::genSourceUUID($_) } @sorted;
foreach (0 ... $#sorted){
    my $isDefault = ($_ == 0) ? 'true' : '';
    $table->addRow($sorted[$_],$isDefault,$guid[$_]);
}

</%INIT>

<%ARGS>
%groups => undef
</%ARGS>
