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 ( $feature, $src_feature );
{
    my %pos;
    for ( my $x = 0; $x < @_; $x += 2 )
    {
        $pos{ $_[$x] } = $x + 1;
    }

    foreach my $arg ( qw( feature src_feature ) )
    {
        HTML::Mason::Exception::Params->throw
            ( error => "no value sent for required parameter '$arg'" )
                unless exists $pos{$arg};
    }
#line 2 "/home/production/cxgn/sgn/mason/feature/jbrowse_exact_match.mas"
    $feature = $_[ $pos{'feature'} ];
#line 3 "/home/production/cxgn/sgn/mason/feature/jbrowse_exact_match.mas"
    $src_feature = $_[ $pos{'src_feature'} ];
}
$m->debug_hook( $m->current_comp->path ) if ( HTML::Mason::Compiler::IN_PERL_DB() );

#line 5 "/home/production/cxgn/sgn/mason/feature/jbrowse_exact_match.mas"
$m->print( '

' );
#line 7 "/home/production/cxgn/sgn/mason/feature/jbrowse_exact_match.mas"

my $jbrowse_url ;
my $iframe_url ;
if ( $feature && $src_feature ) {

   # check if $feature and $src_feature are an object (as used in the locus and feature pages)
   # or a scalar (as used in the marker pages)
    my $feature_name= ref($feature) ? $feature->name : $feature;
    my $data_source = ref($src_feature)  ? $src_feature->name : $src_feature;

    $data_source =~ s/(.*\d)(\.?chr?\d\d)/$1/;
    $jbrowse_url = $c->config->{jbrowse_path} . "/$data_source&loc=$feature_name&tracks=DNA,gene_models" ;
    $iframe_url = $jbrowse_url . "&tracklist=0&nav=1&overview=0" ;
    print STDERR "JB.MAS\njbrowse_url = $jbrowse_url\niframe_url = $iframe_url \n\n";
 }

#line 24 "/home/production/cxgn/sgn/mason/feature/jbrowse_exact_match.mas"
$m->print( '
' );
#line 25 "/home/production/cxgn/sgn/mason/feature/jbrowse_exact_match.mas"
 if ( $jbrowse_url ) {
$m->print( '
  <iframe style="border: 1px solid rgb(80, 80, 80);" src="' );
#line 27 "/home/production/cxgn/sgn/mason/feature/jbrowse_exact_match.mas"
$m->print(  $iframe_url  );
#line 27 "/home/production/cxgn/sgn/mason/feature/jbrowse_exact_match.mas"
$m->print( '" height="250" width="700"  name="jbrowse_iframe">
  <p>Your browser does not support iframes.</p> </iframe>

' );
#line 30 "/home/production/cxgn/sgn/mason/feature/jbrowse_exact_match.mas"
 }
$m->print( '
<script language="javascript" type="text/javascript">
  jQuery.noConflict();
</script>
' );
;return;
},
'declared_args' => {
  '$feature' => { default => undef },
  '$src_feature' => { default => undef }
},
'load_time' => 1763079528,

)
;