package SGN::View::Mason::Commands;
use strict;
use vars qw($m $c);
HTML::Mason::Component::FileBased->new(
'code' => sub {
use utf8; local $SGN::View::Mason::Commands::m = $HTML::Mason::Commands::m;
HTML::Mason::Exception::Params->throw
    ( error =>
      "Odd number of parameters passed to component expecting name/value pairs"
    ) if @_ % 2;
my ( $map_by_species, $map_url, $chr_url, $comp_maps_url, $default_map_id );
{
    my %pos;
    for ( my $x = 0; $x < @_; $x += 2 )
    {
        $pos{ $_[$x] } = $x + 1;
    }

    foreach my $arg ( qw( map_by_species map_url chr_url comp_maps_url ) )
    {
        HTML::Mason::Exception::Params->throw
            ( error => "no value sent for required parameter '$arg'" )
                unless exists $pos{$arg};
    }
#line 36 "/home/production/cxgn/sgn/mason/cview/index.mas"
    $map_by_species = $_[ $pos{'map_by_species'} ];
#line 37 "/home/production/cxgn/sgn/mason/cview/index.mas"
    $map_url = $_[ $pos{'map_url'} ];
#line 38 "/home/production/cxgn/sgn/mason/cview/index.mas"
    $chr_url = $_[ $pos{'chr_url'} ];
#line 39 "/home/production/cxgn/sgn/mason/cview/index.mas"
    $comp_maps_url = $_[ $pos{'comp_maps_url'} ];
#line 40 "/home/production/cxgn/sgn/mason/cview/index.mas"
     $default_map_id = exists $pos{'default_map_id'} ? $_[ $pos{'default_map_id'} ] :  9;
}
$m->debug_hook( $m->current_comp->path ) if ( HTML::Mason::Compiler::IN_PERL_DB() );

#line 34 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->print( '
' );
#line 43 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->print( '
' );
#line 44 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->comp(   '/page/page_title.mas', title=>"Available Maps"   
); #line 44 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->print( '
<div class="container-fluid">

' );
#line 47 "/home/production/cxgn/sgn/mason/cview/index.mas"

# Show a blue section html with the system maps
# organized by species.
#
my $d ='';
foreach my $s (sort { @{$map_by_species->{$a}} <=> @{$map_by_species->{$b}} } keys %$map_by_species) {
  $d .= "<b>$s</b><br />\n";
  $d .= join('<br />' ,  sort @{ $map_by_species->{$s} } );
  $d .= "<br /><br />";
}

my $submit = qq | <b>[<a href="/cview/help/map_submission">Submit New Map</a>]</b> |;

#line 61 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->print( '
' );
#line 62 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->comp( { content => sub {
#line 62 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->print( '
<br/>
' );
#line 64 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->print(  $d  );
#line 64 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->print( '
' );
#line 65 "/home/production/cxgn/sgn/mason/cview/index.mas"
} }, '/page/info_section.mas', collapsible=>1, collapsed=>0, title=>"Interactive Maps", subtitle=>$submit
 );
#line 65 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->print( '

<!-- Comparative maps -->

' );
#line 69 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->comp( { content => sub {
#line 69 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->print( '

<br />
<a href="' );
#line 72 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->print(  $chr_url  );
#line 72 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->print( '"><b>Interactive comparative map viewer</b></a>:
View two chromosomes from two different maps at the same time; it displays the relationships between the chromosomes and additional information such as associated physical map, inbred lines, and rulers.<br /><br />
<b>Examples</b>:
<ul>
<li><a href="' );
#line 76 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->print(  $chr_url  );
#line 76 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->print( '?show_IL=1&amp;map_id=5&amp;chr_nr=1&amp;comp_map_id=3&amp;comp_chr=1">Tomato EXPEN 1992 vs Potato TXB 1992</a><br /></li>
  <li><a href="' );
#line 77 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->print(  $chr_url  );
#line 77 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->print( '?map_id=' );
#line 77 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->print(  $default_map_id  );
#line 77 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->print( '&amp;chr_nr=1&amp;comp_map_id=6&amp;comp_chr=1&amp;show_ruler=1&amp;show_physical=1">Tomato EXPEN 2000 vs Eggplant-LXM 2002</a></li>
<li><a href="' );
#line 78 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->print(  $chr_url  );
#line 78 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->print( '?map_id=3&amp;chr_nr=1&amp;comp_map_id=6&amp;comp_chr=1&amp;show_ruler=1">Potato TXB 1992 vs Eggplant-LXM 2002</a></li>
</ul>

<a href="' );
#line 81 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->print(  $comp_maps_url  );
#line 81 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->print( '?center_map=' );
#line 81 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->print(  $default_map_id  );
#line 81 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->print( '&amp;right_map=3"><b>Compare entire maps</b></a>:
To get a better view how two (or three) maps relate to each other, take a zoomed out view of the entire map. A maximum of 3 maps can be shown together at one time. The maps to be displayed can be selected on the top of the display.  <br /><br />
<b>Examples</b>:
<ul>
<li><a href="/cview/view_maps.pl?center_map=5&amp;right_map=3">Tomato EXPEN 1992 vs Potato TXB 1992</a></li>
<li><a href="/cview/view_maps.pl?left_map=5&amp;center_map=3&amp;right_map=6">Eggplant LXM 2002 vs Tomato EXPEN 1992 vs Potato TXB 1992 (three-way comparison)</a></li>
</ul>
<br />
For more on the comparative map viewer, read the <a href="/help/cview">help page</a>.

' );
#line 91 "/home/production/cxgn/sgn/mason/cview/index.mas"
} }, '/page/info_section.mas', collapsible=>1, collapsed=>0, title=>"Comparative Maps"
 );
#line 91 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->print( '

<!--  Static maps -->

' );
#line 95 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->comp( { content => sub {
#line 95 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->print( '
<br/>
<p>
<b>Tomato maps</b><br />
<i>L. esculentum x L. pennellii</i> maps:<br />
<a href=\'/maps/tomato_arabidopsis/index.pl\'>Tomato - Arabidopsis synteny map</a><br />
<a href=\'/maps/pepper_korea/index.pl\'>Pepper SNU2 map</a><br />
<a href=\'/maps/pennellii_il/index.pl\'>Isogenic Line (IL) map</a><br />
<a href="/maps/lpimp_ibl/index.pl">Lycopersicon pimpinellifolium Inbred Backcross Lines (IBLs)</a>
</p>
' );
#line 105 "/home/production/cxgn/sgn/mason/cview/index.mas"
} }, '/page/info_section.mas', collapsible=>1, collapsed=>0, title=>'Static Maps'
 );
#line 105 "/home/production/cxgn/sgn/mason/cview/index.mas"
$m->print( '

<!-- JavaScript function for help files. -->
<script language=\'javascript\' type=\\"text/javascript\\">
<!--\\n
function commercial(Page)\\n{
   var new_win = open(Page, \'EXTRA\', \\"scrollbars=yes,resizable=yes,height=500,width=720\\")
}\\n// -->
</script>

</div>
' );
;return;
},
'declared_args' => {
  '$chr_url' => { default => undef },
  '$comp_maps_url' => { default => undef },
  '$default_map_id' => { default => ' 9' },
  '$map_by_species' => { default => undef },
  '$map_url' => { default => undef }
},
'load_time' => 1763231511,

)
;