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

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

#line 7 "/home/production/cxgn/sgn/mason/site/error/exception.mas"
$m->print( '
' );
#line 8 "/home/production/cxgn/sgn/mason/site/error/exception.mas"
 $exception = [ $exception ] unless ref $exception eq 'ARRAY';
 for my $e (@$exception) {
$m->print( '
<h1 style="text-align: center">
   ' );
#line 12 "/home/production/cxgn/sgn/mason/site/error/exception.mas"
$m->print(  $e->title || ( $e->is_server_error ? 'Server Error' : $e->is_client_error ? 'Error' : 'Message' )  );
#line 12 "/home/production/cxgn/sgn/mason/site/error/exception.mas"
$m->print( '
</h1>

<div style="margin: auto; width: 60%">
    <p>
' );
#line 17 "/home/production/cxgn/sgn/mason/site/error/exception.mas"
 if( $e->public_message ) {
$m->print( '    ' );
#line 18 "/home/production/cxgn/sgn/mason/site/error/exception.mas"
$m->print(  $e->public_message . ( $e->public_message =~ /\.\s*$/ ? '' : '.' )  );
#line 18 "/home/production/cxgn/sgn/mason/site/error/exception.mas"
$m->print( '
' );
#line 19 "/home/production/cxgn/sgn/mason/site/error/exception.mas"
 } else {
$m->print( '    Our apologies, there was an error processing your request.  
' );
#line 21 "/home/production/cxgn/sgn/mason/site/error/exception.mas"
 }
$m->print( '    </p>

    <p>
' );
#line 25 "/home/production/cxgn/sgn/mason/site/error/exception.mas"
 if( $e->notify ) {
$m->print( '    An error report has been sent to the ' );
#line 26 "/home/production/cxgn/sgn/mason/site/error/exception.mas"
$m->print(  $project_name  );
#line 26 "/home/production/cxgn/sgn/mason/site/error/exception.mas"
$m->print( ' development team.
' );
#line 27 "/home/production/cxgn/sgn/mason/site/error/exception.mas"
 }
$m->print( '
' );
#line 29 "/home/production/cxgn/sgn/mason/site/error/exception.mas"
 if( $e->is_client_error || $e->is_server_error ) {
$m->print( '
    Feel free to contact the <a href="/contact/form">development team</a>,
        if the problem persists, and
' );
#line 33 "/home/production/cxgn/sgn/mason/site/error/exception.mas"
   if( $e->is_server_error ) {
$m->print( '      we will keep you informed of our progress in resolving it.
' );
#line 35 "/home/production/cxgn/sgn/mason/site/error/exception.mas"
   } else {
$m->print( '      we will work with you to resolve it.
' );
#line 37 "/home/production/cxgn/sgn/mason/site/error/exception.mas"
   }
$m->print( '   </p>

' );
#line 40 "/home/production/cxgn/sgn/mason/site/error/exception.mas"
 }
$m->print( '
</div>

' );
#line 44 "/home/production/cxgn/sgn/mason/site/error/exception.mas"
   if( $show_dev_message && $e->can('developer_message') && defined $e->developer_message ) {
$m->print( '    <style>
       pre {
            white-space: pre-wrap;       /* css-3 */
            white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
            white-space: -pre-wrap;      /* Opera 4-6 */
            white-space: -o-pre-wrap;    /* Opera 7 */
            word-wrap: break-word;       /* Internet Explorer 5.5+ */
        }
     </style>

    <div style="margin: 1em 0; border: 2px solid orange; padding: 0 1em 1em 1em">
      <h3>Developer message:</h3>
        <pre>' );
#line 57 "/home/production/cxgn/sgn/mason/site/error/exception.mas"
$m->print( (map {; $m->interp->apply_escapes($_, 'h') } ( defined $e->developer_message ? $e->developer_message : 'none provided')) );
#line 57 "/home/production/cxgn/sgn/mason/site/error/exception.mas"
$m->print( '</pre>
    </div>
' );
#line 59 "/home/production/cxgn/sgn/mason/site/error/exception.mas"
   }
 }
;return;
},
'declared_args' => {
  '$contact_email' => { default => ' \'\'' },
  '$exception' => { default => undef },
  '$project_name' => { default => ' \'\'' },
  '$show_dev_message' => { default => ' 0' }
},
'load_time' => 1763079527,

)
;