@props([ 'box_style' => 'default', 'header' => false, 'top_submit' => false, 'sr_only_title' => false, ]) @aware(['name', 'route'])
merge(['class' => 'box box-'.$box_style]) }}> @if ($header || $top_submit)
@if ($top_submit) {{-- Long-form pattern: title on the left, save button pulled right. Title truncates with an ellipsis so a long display_name can't push the save button off the row. --}}
@if ($header)

{{ $header }}

@endif
@else

{{ $header }}

@endif
@endif
@if (isset($table_header))

{{ $table_header }}

@endif @if (isset($bulkactions))
{{ $bulkactions }}
@endif {{-- Render slot unconditionally — ComponentSlot::isEmpty() materializes the slot to inspect it, doubling every DB call inside. An empty slot renders nothing visible. --}} {{ $slot }}
@if (isset($customfooter)) {{ $customfooter }} @elseif ($route) @endif