@if(Auth::check() && ($group->is_admin(Auth::user()->id) && $group->type == "open"))
@if(!$group->users->contains(Auth::user()->id))
@else
@endif
@else
@if(Auth::check() && !$group->is_admin(Auth::user()->id) && $group->type == "open")
@if(!$group->users->contains(Auth::user()->id))
@else
@endif
@endif
@endif
@if(Auth::check() && $group->is_admin(Auth::user()->id) && $group->type == "closed")
@if(!$group->users->contains(Auth::user()->id))
@else
@if(Auth::user()->get_group($group->id) == "pending")
@endif
@if(Auth::user()->get_group($group->id) == "approved")
@endif
@endif
@else
@if(Auth::check() && !$group->is_admin(Auth::user()->id) && $group->type == "closed")
@if(!$group->users->contains(Auth::user()->id))
@else
@if(Auth::user()->get_group($group->id) == "pending")
@endif
@if(Auth::user()->get_group($group->id) == "approved")
@endif
@endif
@endif
@endif
@if(Auth::check() && $group->is_admin(Auth::user()->id) && $group->type == "secret")
@endif