@extends('layouts.main') @section('title') {{ __('Create Listing') }} @endsection @section('page-title')

@yield('title')

@endsection @php // Shown for modules / categories without an image, or whose image fails to load. $placeholderImage = \App\Services\CachingService::getSystemSettings('placeholder_image') ?: asset('assets/images/logo/placeholder.png'); $slugHost = parse_url(\App\Services\CachingService::getSystemSettings('web_url') ?: config('app.url'), PHP_URL_HOST) ?: ''; $wizardSteps = [ ['target' => 'wizard-module', 'label' => __('Module')], ['target' => 'format', 'label' => __('Format')], ['target' => 'categories', 'label' => __('Category')], ['target' => 'listing', 'label' => __('Basic Info')], ['target' => 'custom', 'label' => __('Listing Details'), 'id' => 'custom-tab-item', 'hidden' => true], ['target' => 'seo', 'label' => __('SEO Details')], ['target' => 'images', 'label' => __('Media')], ['target' => 'address', 'label' => __('Location')], ['target' => 'review', 'label' => __('Review')], ]; @endphp @section('content')
@csrf {{-- Only scopes the category list; an item's module comes from its category. --}} {{-- Selected category path, read by the AI description generator. --}}
{{-- 1. Module: parent of the ads type and category steps --}} {{-- Not id="module": an element id becomes a global, and select2 / jstree then take window.module for a code module. --}}

{{ __('What are you listing?') }}

{{ __('Choose the appropriate module for your advertisement.') }}

{{ __('Current Modules') }}
@forelse ($modules as $module) @empty

{{ __('No active modules found.') }}

@endforelse
{{-- 2. Format: regular or video (reel) ad --}}

{{ __('Advertisement Format') }}

{{ __('Choose how your listing will be displayed to buyers.') }}

{{-- 3. Category: drill down to a leaf category of the module --}}

{{ __('Select Category') }}

{{ __('Where does this belong in') }} ?

{{ __('Selected') }}:
{{-- 4. Basic Info: title / description (per language), contact, pricing --}}

{{ __('Basic Details') }}

{{ __('The essential information required for every listing.') }}

@if(($geminiAutoTranslateEnabled ?? false) && $languages->count() > 1) @endif {{-- Default language: always required --}}
@if($geminiEnabled ?? false) @endif
{{-- Other languages: title and description only, optional --}} @foreach ($languages as $lang) @if ($lang->id != $defaultLanguage->id) @endif @endforeach
{{-- Options come from the category's module (pricing_modes) — see items/partials/module-rules. --}}
{{-- 5. Listing Details: the category's custom fields (rendered by loadCustomFields) --}}
{{ __('Select a category to load custom fields.') }}
{{-- 6. SEO Details --}}

{{ __('SEO Details') }}

{{ __('Optimize how your listing appears in search engines.') }}

@if($geminiEnabled ?? false) @endif @foreach ($languages->sortByDesc(fn ($lang) => $lang->id == $defaultLanguage->id) as $lang) @php $isDefaultSeo = $lang->id == $defaultLanguage->id; @endphp @endforeach
{{-- URLs always read LTR, also in RTL layouts (corners fixed in custom.css). --}}
@if ($slugHost) {{ $slugHost }}/ @endif
{{ __('Optional. Lowercase letters, numbers and hyphens; generated when left empty.') }}
{{-- 7. Media --}}

{{ __('Media Upload') }}

{{ __('High-quality images and video increase engagement.') }}

{{-- VIDEO ADS (reel only) --}} {{-- AD IMAGES (first image is the cover) --}} {{-- PRODUCT VIDEO --}}

{{ __('Choose a video type to add a product video.') }}

@include('items.partials.reel-edit-modal')
{{-- 8. Location --}}

{{ __('Select your location') }}

{{ __('Choose where this listing is located.') }}

@if(($mapProvider ?? 'free_api') === 'free_api')
{{ __('Or') }}
@endif {{-- Submitted values --}}
{{-- 9. Review & Publish (read-only summary, filled by renderListingReview) --}}

{{ __('Review & Publish') }}

{{ __('Please verify all your details carefully before making the listing live.') }}

{{ __('Listing Ready') }}

{{ __('Module') }}
{{ __('Ad Format') }}
{{ __('Category') }}
{{ __('Title') }}
{{ __('Description') }}
{{ __('Contact Phone') }}
{{ __('Pricing Model') }}
{{ __('Amount') }}
{{ __('Core Information') }}
{{ __('Additional Details') }}
{{ __('Ad Images') }}
{{ __('Video Ad') }}
{{ __('Product Video') }}
{{ __('Location') }}
{{ __('SEO Status') }}
@if(($geminiEnabled ?? false) && $languages->count() > 1) {{-- Auto Translate Language Picker Modal --}} @endif @if(($mapProvider ?? 'free_api') === 'free_api') @endif {{-- Trim blocking overlay — covers entire page while MediaRecorder is processing --}} {{-- ALL IMAGES MODAL --}} @endsection @section('script') @include('items.partials.module-rules') @endsection