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_version_id, $map_items, $size, $hilite, $can_overlay, $map_url );
{
    my %pos;
    for ( my $x = 0; $x < @_; $x += 2 )
    {
        $pos{ $_[$x] } = $x + 1;
    }

    foreach my $arg ( qw( map_version_id size hilite map_url ) )
    {
        HTML::Mason::Exception::Params->throw
            ( error => "no value sent for required parameter '$arg'" )
                unless exists $pos{$arg};
    }
#line 28 "/home/production/cxgn/sgn/mason/cview/map/overlay_form.mas"
    $map_version_id = $_[ $pos{'map_version_id'} ];
#line 29 "/home/production/cxgn/sgn/mason/cview/map/overlay_form.mas"
     $map_items = exists $pos{'map_items'} ? $_[ $pos{'map_items'} ] :  undef;
#line 30 "/home/production/cxgn/sgn/mason/cview/map/overlay_form.mas"
    $size = $_[ $pos{'size'} ];
#line 31 "/home/production/cxgn/sgn/mason/cview/map/overlay_form.mas"
    $hilite = $_[ $pos{'hilite'} ];
#line 32 "/home/production/cxgn/sgn/mason/cview/map/overlay_form.mas"
     $can_overlay = exists $pos{'can_overlay'} ? $_[ $pos{'can_overlay'} ] :  0;
#line 33 "/home/production/cxgn/sgn/mason/cview/map/overlay_form.mas"
    $map_url = $_[ $pos{'map_url'} ];
}
$m->debug_hook( $m->current_comp->path ) if ( HTML::Mason::Compiler::IN_PERL_DB() );

#line 1 "/home/production/cxgn/sgn/mason/cview/map/overlay_form.mas"
$m->print( '
' );
#line 26 "/home/production/cxgn/sgn/mason/cview/map/overlay_form.mas"
$m->print( '
' );
#line 35 "/home/production/cxgn/sgn/mason/cview/map/overlay_form.mas"
$m->print( '
' );
#line 36 "/home/production/cxgn/sgn/mason/cview/map/overlay_form.mas"


if (!$can_overlay) { return; }

my $collapsed = !!defined $map_items;

#line 43 "/home/production/cxgn/sgn/mason/cview/map/overlay_form.mas"
$m->print( '
' );
#line 44 "/home/production/cxgn/sgn/mason/cview/map/overlay_form.mas"
$m->comp( { content => sub {
#line 44 "/home/production/cxgn/sgn/mason/cview/map/overlay_form.mas"
$m->print( '
      <table><tr><td width="50">&nbsp;</td><td>
      <form style="width: 60%" action="' );
#line 46 "/home/production/cxgn/sgn/mason/cview/map/overlay_form.mas"
$m->print(  $map_url  );
#line 46 "/home/production/cxgn/sgn/mason/cview/map/overlay_form.mas"
$m->print( '" name="overlay_form" >
        <p>To add labels to the diagram above, enter chromosome numbers, offsets (in the map\'s units), and names in the box below (<a href="javascript:overlay_show_example()">example</a>):</p>
	<textarea class="form-control" id="map_items" name="map_items" cols="50" rows="5">' );
#line 48 "/home/production/cxgn/sgn/mason/cview/map/overlay_form.mas"
$m->print(  $map_items  );
#line 48 "/home/production/cxgn/sgn/mason/cview/map/overlay_form.mas"
$m->print( '</textarea>
	<input type="hidden" name="map_version_id" value="' );
#line 49 "/home/production/cxgn/sgn/mason/cview/map/overlay_form.mas"
$m->print(  $map_version_id );
#line 49 "/home/production/cxgn/sgn/mason/cview/map/overlay_form.mas"
$m->print( '" />
	<input type="hidden" name="size" value="' );
#line 50 "/home/production/cxgn/sgn/mason/cview/map/overlay_form.mas"
$m->print(  $size  );
#line 50 "/home/production/cxgn/sgn/mason/cview/map/overlay_form.mas"
$m->print( '" />
	<input type="hidden" name="hilite" value="' );
#line 51 "/home/production/cxgn/sgn/mason/cview/map/overlay_form.mas"
$m->print(  $hilite  );
#line 51 "/home/production/cxgn/sgn/mason/cview/map/overlay_form.mas"
$m->print( '" />
	<input type="hidden" name="force" value="1" /><br />
	<button class="btn btn-primary" type="submit" value="overlay information" >Overlay Information</button>
	<button class="btn btn-default" type="button" value="clear" onclick="overlay_clear_map_items(); return false" >Clear</button>
      </form>
      </td></tr></table>

      <script language="javascript">
	function overlay_show_example() {
	  var textarea = document.getElementById("map_items");
	  textarea.value = "1  50 foo\\n2  80  bar";
	}

	function overlay_clear_map_items() {
	   var textarea = document.getElementById("map_items");
	   textarea.value = "";
        }
	</script>
' );
#line 69 "/home/production/cxgn/sgn/mason/cview/map/overlay_form.mas"
} }, '/page/info_section.mas', title=>'Overlay Custom Data', collapsible=>1, collapsed=>$collapsed
 );
#line 69 "/home/production/cxgn/sgn/mason/cview/map/overlay_form.mas"
$m->print( '

' );
;return;
},
'declared_args' => {
  '$can_overlay' => { default => ' 0' },
  '$hilite' => { default => undef },
  '$map_items' => { default => ' undef' },
  '$map_url' => { default => undef },
  '$map_version_id' => { default => undef },
  '$size' => { default => undef }
},
'load_time' => 1763166043,

)
;