<option
    value="{{ $parent->id }}"
    @if(isset($category) && $parent->id == $category->id) disabled @endif
    @if($parent->id == old('parent_id', (isset($category) ? $category->parent_id : null))) selected @endif>
    {{ $level ? str_repeat('—', $level) . ' ' : '' }}
    {{ $parent->translations->first()->name ?? __('daylight::general.not_translated') . ' (' . $parent->id . ')' }}
</option>

@if($parent->children->isNotEmpty())
    @foreach($parent->children as $child)
        @include('daylight::store.categories.partials.parent', ['parent' => $child, 'level' => $level + 1])
    @endforeach
@endif
