@php $sections = [ 'category' => __('Category'), 'general' => __('General Info'), 'location' => __('Location'), 'attributes' => __('Details'), 'settings' => __('Settings'), 'media' => __('Media'), ]; $acceptable_files = [ 'images' => ['png', 'gif', 'bmp', 'svg', 'jpg', 'jpeg', 'webp'], 'videos' => ['mp4', 'mov', 'avi', 'wmv', 'mkv', 'webm'], 'audio' => ['wav', 'mp3', 'm4a', 'mpga', 'wma'], ]; @endphp
{{-- Header --}}

{{ __('Create listing') }}

{{ __('New advertisement') }}

{{ __('Choose any section below. There is no required order, and you can save the advertisement from any section when it is ready.') }}

@foreach ($sections as $key => $label) @endforeach
{{-- Error summary --}} @if ($errors->any())
{{ __('Please fix these fields') }}
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
{{-- Category --}}

{{ __('Choose a category') }}

{{ __('Pick the closest category so buyers can discover your post faster.') }}

{{-- General --}}

{{ __('Post basics') }}

{{ __('Use a clear title, honest price, and a short description.') }}

{{-- Location --}}

{{ __('Location details') }}

{{ __('Add a city and map point. You can decide later whether exact location is visible.') }}

{{-- Attributes --}}

{{ __('Extra details') }}

{{ __('Small details help people trust the post and filter search results.') }}

@if ($advertiseAttributes->isNotEmpty())
@forelse ($advertiseAttributes as $attribute) @if ($attribute->type == 'number') @endif @if ($attribute->type == 'text') @endif @if ($attribute->type == 'select') @endif @empty @endforelse
@else

{{ __('No extra attributes for this category') }}

{{ __('You can leave this section empty or choose another section above.') }}

@endif
{{-- Settings --}}

{{ __('Advertise settings') }}

{{ __('Control privacy and contact options before publishing.') }}

@php $settingOptions = [ [ 'model' => 'advertise.is_new', 'title' => __('Condition'), 'description' => __('Choose whether the advertised item is new or second hand.'), 'options' => [ ['value' => '1', 'label' => __('New')], ['value' => '0', 'label' => __('Second hand')], ], ], [ 'model' => 'advertise.show_exact_location', 'title' => __('Show exact location?'), 'description' => __('Use this only when you are comfortable sharing the precise point.'), 'options' => [ ['value' => '1', 'label' => __('Yes')], ['value' => '0', 'label' => __('No')], ], ], [ 'model' => 'advertise.call_is_active', 'title' => __('Share phone number?'), 'description' => __('Let interested buyers call you directly.'), 'options' => [ ['value' => '1', 'label' => __('Yes')], ['value' => '0', 'label' => __('No')], ], ], [ 'model' => 'advertise.chat_is_active', 'title' => __('Enable chat?'), 'description' => __('Allow buyers to message you inside the app.'), 'options' => [ ['value' => '1', 'label' => __('Yes')], ['value' => '0', 'label' => __('No')], ], ], [ 'model' => 'advertise.comment_is_active', 'title' => __('Enable comments?'), 'description' => __('Allow public questions under the advertisement.'), 'options' => [ ['value' => '1', 'label' => __('Yes')], ['value' => '0', 'label' => __('No')], ], ], ]; @endphp
@foreach ($settingOptions as $setting)

{{ $setting['title'] }}

{{ $setting['description'] }}

@foreach ($setting['options'] as $choice) @endforeach
@endforeach
{{-- Media --}}

{{ __('Advertise files') }}

{{ __('Upload clear media. The first uploaded item becomes the cover.') }}

@error('files') {{ $message }} @enderror @error('files.*') {{ $message }} @enderror

{{ __('Selected files') }}

{{ __('Preview appears immediately. Upload progress appears while Livewire sends the files.') }}

@if (count($files))

{{ __('Uploaded files') }}

{{ __('These files are ready to save. Remove any file before publishing.') }}

@foreach ($files as $index => $file) @php $extension = method_exists($file, 'getClientOriginalExtension') ? strtolower($file->getClientOriginalExtension()) : strtolower($file->extension()); $name = method_exists($file, 'getClientOriginalName') ? $file->getClientOriginalName() : __('Uploaded file'); $size = method_exists($file, 'getSize') && $file->getSize() ? round($file->getSize() / 1024) : null; @endphp
@if (in_array($extension, $acceptable_files['images'], true)) {{ __('Uploaded preview') }} @elseif (in_array($extension, $acceptable_files['videos'], true))
@elseif (in_array($extension, $acceptable_files['audio'], true))
@else
@endif

{{ $name }}

@if ($loop->first) {{ __('Cover') }} @endif

{{ $extension ?: __('file') }} @if($size) · {{ $size }} KB @endif

@endforeach
@endif
{{-- Footer controls --}}

{{ __('Move between sections freely. Save whenever the advertisement is ready.') }}