@if(count($post->attachments))
@if($post->isSubbed || (getSetting('profiles.allow_users_enabling_open_profiles') && $post->user->open_profile))
@if((Auth::check() && Auth::user()->id !== $post->user_id && $post->price > 0 && !PostsHelper::hasUserUnlockedPost($post->postPurchases)) || (!Auth::check() && $post->price > 0 ))
@include('elements.feed.post-locked',['type'=>'post','post'=>$post])
@else
@if(count($post->attachments) > 1)
@foreach($post->attachments as $attachment)
@include('elements.feed.post-box-media-wrapper',[
'attachment' => $attachment,
'isGallery' => true,
])
@endforeach
@include('elements.icon',['icon'=>'chevron-forward-outline'])
@include('elements.icon',['icon'=>'chevron-back-outline'])
@else
@include('elements.feed.post-box-media-wrapper',[
'attachment' => $post->attachments[0],
'isGallery' => false,
])
@endif
@endif
@else
@include('elements.feed.post-locked',['type'=>'subscription',])
@endif
@endif
@if($post->isSubbed || (Auth::check() && getSetting('profiles.allow_users_enabling_open_profiles') && $post->user->open_profile))
@endif
@include('elements.feed.post-new-comment') @endif