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 ( $error, @found, @not_found, $file, $filetype );
{
    my %pos;
    for ( my $x = 0; $x < @_; $x += 2 )
    {
        $pos{ $_[$x] } = $x + 1;
    }
#line 4 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
     $error = exists $pos{'error'} ? $_[ $pos{'error'} ] :  undef;
#line 5 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
     @found = exists $pos{'found'} ? HTML::Mason::Tools::coerce_to_array( $_[ $pos{'found'} ], '@found') :  ();
#line 6 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
     @not_found = exists $pos{'not_found'} ? HTML::Mason::Tools::coerce_to_array( $_[ $pos{'not_found'} ], '@not_found') :  ();
#line 7 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
     $file = exists $pos{'file'} ? $_[ $pos{'file'} ] :  '';
#line 8 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
     $filetype = exists $pos{'filetype'} ? $_[ $pos{'filetype'} ] :  '';
}
$m->debug_hook( $m->current_comp->path ) if ( HTML::Mason::Compiler::IN_PERL_DB() );

#line 1 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
$m->print( '

' );
#line 10 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
$m->print( '
' );
#line 11 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
$m->comp(   '/page/page_title.mas', title=>'Download Barcodes'   
); #line 11 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
$m->print( '

' );
#line 13 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
 if (!@not_found && !$error) {
$m->print( '  All stocks in the list have been found in the database. Please click the link below to download the barcode label file.<br />
' );
#line 15 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
 }
 elsif ($error){
$m->print( '    <b>Download Plot Phenotyping Barcode </b>is ' );
#line 17 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
$m->print( $error );
#line 17 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
$m->print( ' For general barcode printing use <b>Download Stock Barcodes section.</b>
' );
#line 18 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
 }
 else {
$m->print( '  The following ' );
#line 20 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
$m->print(  scalar(@not_found)  );
#line 20 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
$m->print( ' stocks were not found in the database:<br />
' );
#line 21 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
   foreach my $nf (@not_found) {
$m->print( '      <b>' );
#line 22 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
$m->print(  $nf  );
#line 22 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
$m->print( '</b>
' );
#line 23 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
   }
$m->print( '    <br /><br />
' );
#line 25 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
   if (@found > 0) {
$m->print( '
    The other ' );
#line 27 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
$m->print(  scalar(@found)  );
#line 27 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
$m->print( ' barcodes can be downloaded from the link below.



' );
#line 31 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
   }
   else {
$m->print( '    No stocks were found. Please verify your input and try again.
' );
#line 34 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
   }
$m->print( '

' );
#line 37 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
 }
$m->print( '
' );
#line 39 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
 if (@found > 0) {
$m->print( '<br /><br />
<a target="_blank" href="' );
#line 41 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
$m->print(  $file  );
#line 41 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
$m->print( '" >Download ' );
#line 41 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
$m->print(  $filetype  );
#line 41 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
$m->print( ' file</a>
' );
#line 42 "/home/production/cxgn/sgn/mason/barcode/stock_download_result.mas"
}
;return;
},
'declared_args' => {
  '$error' => { default => ' undef' },
  '$file' => { default => ' \'\'' },
  '$filetype' => { default => ' \'\'' },
  '@found' => { default => ' ()' },
  '@not_found' => { default => ' ()' }
},
'load_time' => 1763315808,

)
;