@php $categoriesOptions ??= []; $catDisplayType = data_get($categoriesOptions, 'cat_display_type'); $maxSubCats = (int)data_get($categoriesOptions, 'max_sub_cats'); $apiResult ??= []; $totalCategories = (int)data_get($apiResult, 'meta.total', 0); $areCategoriesPagingable = (!empty(data_get($apiResult, 'links.prev')) || !empty(data_get($apiResult, 'links.next'))); $categories ??= []; $subCategories ??= []; $category ??= null; $hasChildren ??= false; $catId ??= 0; /* The selected category ID */ @endphp @if (!$hasChildren) {{-- To append in the form (will replace the category field) --}} @if (!empty($category)) @if (!empty(data_get($category, 'children'))) {{ data_get($category, 'name') }} @else {{ data_get($category, 'name') }}  [ {{ t('Edit') }} ] @endif @else {{ t('select_a_category') }} @endif @else {{-- To append in the modal (will replace the modal content) --}} @if (!empty($category))

{{ t('go_to_parent_categories') }}   {{ data_get($category, 'name') }}

@endif @if (!empty($categories))
@if ($totalCategories > 0 && $areCategoriesPagingable)
@include('vendor.pagination.api.bootstrap-4') @endif @else {{ $apiMessage ?? t('no_categories_found') }} @endif @endif @section('before_scripts') @parent @if ($maxSubCats >= 0) @endif @endsection