@if($timeline->type == "user" && $timeline_post == true)
@include('socialite::partials/create-post',compact('timeline','user_post'))
@elseif($timeline->type == "page")
@if(($page->timeline_post_privacy == "only_admins" && $page->is_admin(Auth::user()->id)) || ($page->timeline_post_privacy == "everyone"))
@include('socialite::partials/create-post',compact('timeline','user_post'))
@elseif($page->timeline_post_privacy == "everyone")
@include('socialite::partials/create-post',compact('timeline','user_post'))
@endif
@elseif($timeline->type == "group")
@if(Auth::check() && (($group->post_privacy == "only_admins" && $group->is_admin(Auth::user()->id))|| ($group->post_privacy == "members" && Auth::user()->get_group($group->id) == 'approved') || $group->post_privacy == "everyone"))
@include('socialite::partials/create-post',compact('timeline','user_post','username'))
@endif
@elseif($timeline->type == "event")
@if(($event->timeline_post_privacy == 'only_admins' && $event->is_eventadmin(Auth::user()->id, $event->id)) || ($event->timeline_post_privacy == 'only_guests' && Auth::user()->get_eventuser($event->id)))
@include('socialite::partials/create-post',compact('timeline','user_post'))
@endif
@endif
@if($user_post == "user" || $user_post == "page" || $user_post == "group")
@if(count($posts) > 0)
@foreach($posts as $post)
@include('socialite::partials/post',compact('post','timeline','next_page_url','user'))
@endforeach
@else
{{ trans('socialite::messages.no_posts') }}
@endif
@endif
@if($user_post == "event")
@if($event->type == 'private' && Auth::user()->get_eventuser($event->id) || $event->type == 'public')
@if(count($posts) > 0)
@foreach($posts as $post)
@include('socialite::partials/post',compact('post','timeline','next_page_url','user'))
@endforeach
@else
{{ trans('socialite::messages.no_posts') }}
@endif
@else
{{ trans('socialite::messages.private_posts') }}
@endif
@endif