@php $postInput ??= []; $post ??= []; $admin ??= []; $isMultiStepsForm = (config('settings.listing_form.publication_form_type') == '1'); $isSingleStepForm = (config('settings.listing_form.publication_form_type') == '2'); $isSingleStepCreateForm = ($isSingleStepForm && request()->segment(1) == 'create'); $isSingleStepEditForm = ($isSingleStepForm && request()->segment(1) == 'edit'); $picturesLimit ??= 0; $picturesLimit = is_numeric($picturesLimit) ? $picturesLimit : 0; $picturesLimit = ($picturesLimit > 0) ? $picturesLimit : 1; $pictures = []; if ($isSingleStepEditForm) { $pictures = data_get($post, 'pictures', []); $pictures = collect($pictures)->slice(0, (int)$picturesLimit)->all(); } $postId = data_get($post, 'id') ?? ''; $postTypeId = data_get($post, 'post_type_id') ?? data_get($postInput, 'post_type_id', 0); $countryCode = data_get($post, 'country_code') ?? data_get($postInput, 'country_code', config('country.code', 0)); $adminType = config('country.admin_type', 0); $selectedAdminCode = data_get($admin, 'code') ?? data_get($postInput, 'admin_code', 0); $cityId = (int)(data_get($post, 'city_id') ?? data_get($postInput, 'city_id', 0)); $fiTheme = config('larapen.core.fileinput.theme', 'bs5'); $serverAllowedImageFormatsJson = collect(getServerAllowedImageFormats())->toJson(); $errors ??= getEmptyViewErrors(); $errors = ($errors instanceof \Illuminate\Support\Collection) ? $errors : collect($errors->toArray()); $errorsJson = addslashes($errors->toJson()); $cfOldInput = data_get($postInput, 'cf'); $cfOldInput = session()->getOldInput('cf', $cfOldInput); $cfOldInputJson = addslashes(collect($cfOldInput)->toJson()); @endphp @section('modal_location') @includeFirst([config('larapen.core.customizedViewPath') . 'layouts.inc.modal.location', 'layouts.inc.modal.location']) @endsection @push('after_styles_stack') @include('layouts.inc.tools.wysiwyg.css') {{-- Single Step Form --}} @if ($isSingleStepForm) @if (config('lang.direction') == 'rtl') @endif @if (str_starts_with($fiTheme, 'explorer')) @endif @endif @endpush @push('after_scripts_stack') @include('layouts.inc.tools.wysiwyg.js') @include('common.js.payment-scripts') {{-- Single Step Form --}} @if ($isSingleStepForm) @endif @if (config('settings.listing_form.city_selection') == 'select') @else @endif @endpush