@php $default_platform = $currentPlatform->value; $default_platform_id = 0; $current_platform = $default_platform; $tones = [ 'default' => 'Default', 'informative' => 'Informative', 'humorous' => 'Humorous', 'emphatic' => 'Emphatic', 'engaging' => 'Engaging', 'promotional' => 'Promotional', 'educational' => 'Educational', 'celebratory' => 'Celebratory', 'urgent' => 'Urgent/Time-Sensitive', 'professional' => 'Professional', 'excited' => 'Excited', ]; $company_id = ''; $product_id = ''; $campaign_id = ''; $is_personalized_content = ''; $tone = 'default'; $content = ''; $link = ''; $postImage = ''; $video = ''; $is_repeated = false; $repeat_period = ''; $repeat_start_date = ''; $repeat_time = ''; $status = ''; $scheduled_at = ''; $social_media_platform_id = $currentPlatform->platform()?->getKey(); $companies_list = $companies->pluck('name', 'id')->toArray(); $campaigns_list = $campaigns->pluck('name', 'id')->toArray(); $credentials = $currentPlatform->platform()?->credentials; $platformUsername = $credentials['name'] ?? ''; $platformPicture = $credentials['picture'] ?? ''; @endphp @extends('panel.layout.app', ['disable_tblr' => true, 'disable_titlebar' => true, 'layout_wide' => true]) @section('title', __('Create New Post')) @push('css') @endpush @section('content')
@php $grid_cols = count($platforms); $grid_cols_classname = 'lg:grid-cols-' . $grid_cols; @endphp
@foreach (\App\Extensions\SocialMedia\System\Enums\PlatformEnum::cases() as $platform) @php $is_connected = $platform->platform()?->isConnected(); $name = $platform->platform()?->credentials['name'] ?? 'Jhon Doe'; $profileImage = $platform->platform()?->credentials['picture'] ?? custom_theme_url('/assets/img/avatars/avatar-1.jpg'); @endphp $is_connected && $current_platform === $platform->name, ]) type="button" variant="outline" ::class="{ active: currentPlatform === '{{ $platform->name }}' && {{ $is_connected ? 1 : 0 }} }" @click.prevent="currentPlatform = '{{ $platform->name }}'; platformUsername = '{{ $name }}'; platformPicture = '{!! $profileImage !!}';socialMediaPlatformId = '{{ $platform->platform()?->id }}';" :disabled="!$is_connected" > @php $image = 'vendor/social-media/icons/' . $platform->value . '.svg'; $image_dark_version = 'vendor/social-media/icons/' . $platform->value . '-light.svg'; $darkImageExists = file_exists(public_path($image_dark_version)); @endphp $darkImageExists, ]) src="{{ asset($image) }}" alt="{{ $platform->name }}" /> @if ($darkImageExists) @endif {{ str($platform->name)->title() }} $current_platform !== $platform->name, ]) :class="{ hidden: currentPlatform !== '{{ $platform->name }}' }" > @endforeach

@lang('Create New Post')

@lang('Instantly create engaging, tailored posts to captivate your audience and save time.')

{{-- Personalized content checkbox and modals --}}
{{-- Company Modal --}} @lang('Company') @if (filled($company_id) && filled($product_id)) : {{ $companies_list[$company_id] }} @endif filled($company_id) && filled($product_id), ]) ::class="{ hidden: selectedCompany && selectedProduct }" /> !filled($company_id) || !filled($product_id), 'inline-grid' => filled($company_id) && filled($product_id), ]) :class="{ hidden: !selectedCompany || ! selectedProduct, 'inline-grid': selectedCompany && selectedProduct }" aria-hidden="true" >

@lang('Company Info')

@lang('Start by selecting a company or create a new one at BrandCenter in a few clicks.')

@foreach ($companies as $company) @endforeach
@foreach ($companies as $company)
@foreach ($company->products as $product) @endforeach
@endforeach
@lang('Next')
{{-- Campaign Modal --}} @lang('Campaign') @if (filled($campaign_id)) : {{ $campaigns_list[$campaign_id] }} @endif

@lang('Campaign Info')

@lang('Start by selecting a campaign or create a new one on the Campaigns page in a few clicks.')

@foreach ($campaigns as $campaign) @endforeach

@lang('Target Audience')

@foreach ($campaigns as $campaign)

{!! $campaign['target_audience'] !!}

@endforeach
@lang('Next')
{{-- Tone dropdown --}} @foreach ($tones as $value => $label) @endforeach {{-- Content textarea --}} {{-- blade-formatter-disable --}} {{-- blade-formatter-enable --}} @lang('Enhance with AI') {{-- Link input --}} {{-- --}} {{-- Image input --}} {{-- blade-formatter-disable --}} {{-- blade-formatter-enable --}} @lang('Generate with AI') @lang('Generate with AI VIDEO') {{-- Submit & Schedule modal --}}
@lang('Post Now') {{-- Schedule Modal --}} @lang('Schedule')

@lang('Selected Date'): @lang('None')

@lang('Schedule Post')
@endsection @push('script') @endpush