@php
    $category->loadMissing('children');
    $children = $category->children;
@endphp

<div @class(['nested-sortable pl-2', 'pt-2 border border-top-0 border-right-0 bg-lighter rounded-bottom' => $first && $children->isNotEmpty(), 'mb-2' => !$first, 'mb-3' => $first])>
    @if ($children->isNotEmpty())
        @foreach ($children as $category)
            @include('category::admin.components.row', ['category' => $category, 'first' => false])
        @endforeach
    @endif
</div>
