package SGN::View::Mason::Commands;
use strict;
use vars qw($m $c);
my %_method =
(
'logged_in' => HTML::Mason::Component::Subcomponent->new(
'code' => sub {
use utf8; local $SGN::View::Mason::Commands::m = $HTML::Mason::Commands::m;
$m->debug_hook( $m->current_comp->path ) if ( HTML::Mason::Compiler::IN_PERL_DB() );

#line 2 "/home/production/cxgn/sgn/mason/util/user.mas"
$m->print( '
' );
#line 3 "/home/production/cxgn/sgn/mason/util/user.mas"
 if(!!$c->user()){
$m->print( '  ' );
#line 4 "/home/production/cxgn/sgn/mason/util/user.mas"
$m->print(  $m->content  );
#line 4 "/home/production/cxgn/sgn/mason/util/user.mas"
$m->print( '
' );
#line 5 "/home/production/cxgn/sgn/mason/util/user.mas"
 }
;return;
},

)
,
'logged_out' => HTML::Mason::Component::Subcomponent->new(
'code' => sub {
use utf8; local $SGN::View::Mason::Commands::m = $HTML::Mason::Commands::m;
$m->debug_hook( $m->current_comp->path ) if ( HTML::Mason::Compiler::IN_PERL_DB() );

#line 9 "/home/production/cxgn/sgn/mason/util/user.mas"
$m->print( '
' );
#line 10 "/home/production/cxgn/sgn/mason/util/user.mas"
 if(!$c->user()){
$m->print( '  ' );
#line 11 "/home/production/cxgn/sgn/mason/util/user.mas"
$m->print(  $m->content  );
#line 11 "/home/production/cxgn/sgn/mason/util/user.mas"
$m->print( '
' );
#line 12 "/home/production/cxgn/sgn/mason/util/user.mas"
 }
;return;
},

)
,
'role' => HTML::Mason::Component::Subcomponent->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 ( $roles );
{
    my %pos;
    for ( my $x = 0; $x < @_; $x += 2 )
    {
        $pos{ $_[$x] } = $x + 1;
    }
#line 21 "/home/production/cxgn/sgn/mason/util/user.mas"
     $roles = exists $pos{'roles'} ? $_[ $pos{'roles'} ] :  [];
}
$m->debug_hook( $m->current_comp->path ) if ( HTML::Mason::Compiler::IN_PERL_DB() );

#line 23 "/home/production/cxgn/sgn/mason/util/user.mas"

    my $role_match = 0;
    if(!!$c->user()){
      foreach my $role (@{$roles}) {
        if (grep(/^$role$/, $c->user()->get_object->get_roles())){
          $role_match = 1;
        }
      }
    }
  #line 19 "/home/production/cxgn/sgn/mason/util/user.mas"
$m->print( '
  ' );
#line 23 "/home/production/cxgn/sgn/mason/util/user.mas"
$m->print( '  ' );
#line 33 "/home/production/cxgn/sgn/mason/util/user.mas"
 if($role_match) {
$m->print( '  ' );
#line 34 "/home/production/cxgn/sgn/mason/util/user.mas"
$m->print(  $m->content  );
#line 34 "/home/production/cxgn/sgn/mason/util/user.mas"
$m->print( '
' );
#line 35 "/home/production/cxgn/sgn/mason/util/user.mas"
 }
;return;
},
'declared_args' => {
  '$roles' => { default => ' []' }
},

)
,

);
HTML::Mason::Component::FileBased->new(
'code' => sub {
use utf8; local $SGN::View::Mason::Commands::m = $HTML::Mason::Commands::m;
$m->debug_hook( $m->current_comp->path ) if ( HTML::Mason::Compiler::IN_PERL_DB() );

#line 1 "/home/production/cxgn/sgn/mason/util/user.mas"
# Logged-in content
$m->print( '
' );
#line 8 "/home/production/cxgn/sgn/mason/util/user.mas"
# Logged-out content
$m->print( '
' );
#line 15 "/home/production/cxgn/sgn/mason/util/user.mas"
# Role-based content
# <&| /util/user.mas:role, roles=>["curator"] &>
#   <span>You're a curator Harry.</span>
# </&>
;return;
},
'load_time' => 1763106177,
'methods' => \%_method,

)
;