@props(['optionValue', 'item', 'parent' => null]) @php $optionLabel = $item['label'] ?? null; $children = $item['children'] ?? []; $key = "{$this->id}." . $getStatePath() . '.' . $field::class . '.options.' . $optionValue; @endphp
@if (count($children)) @foreach ($children as $childValue => $childItem)
@include('filament-tree::forms.tree.option-item', ['optionValue' => $childValue, 'item' => $childItem, 'parent' => $optionValue])
@endforeach @endif