@php use App\Extensions\SocialMedia\System\Models\SocialMediaPost; @endphp

{{ __('Scheduled Posts') }}

@foreach (SocialMediaPost::query()->where('user_id', auth()->id())->whereIn('status', ['pending', 'scheduled'])->take(4)->get() as $post)
@php $bg_color = ''; switch ($post?->social_media_platform?->value) { case 'instagram': $bg_color = 'linear-gradient(90deg, #EB6434 0%, #BB2D9F 54.5%, #BB802D 98%)'; break; case 'tiktok': case 'x': $bg_color = '#343434'; break; case 'linkedin': $bg_color = '#0077B5'; break; case 'facebook': $bg_color = '#1877F2'; break; } @endphp
{!! getSocialMediaIcon($post?->social_media_platform?->value) !!}
@if (!$loop->last) @endif

{{ str()->words($post['content'], 15) }}

{{ str()->title($post['status']->value) }}

{{ $post['created_at']->format('M d, Y') }}

@endforeach