@props([ 'id', 'title', 'description' => null, 'icon' => 'info', 'count' => null, 'editable' => false, 'open' => true, 'globalEditMode' => false, ])
class(['ap-section', 'ap-section--editable' => $editable]) }} id="{{ $id }}" x-data="{ open: {{ $open ? 'true' : 'false' }}, editing: false }" x-on:application-edit.window="if ($event.detail === @js($id)) { open = true; editing = true; $nextTick(() => $el.scrollIntoView({ behavior: 'smooth', block: 'start' })) }" x-on:edit-mode:disabled.window="editing = false" data-icon="{{ $icon }}" :data-open="open ? 'true' : 'false'" :data-editing="editing ? 'true' : 'false'">

{{ $title }}

@if($description)

{{ $description }}

@endif
@if($count !== null){{ $count }}@endif {{ $tools ?? '' }} @if($editable) @endif
@if($editable)
{{ $slot }}
{{ $edit ?? '' }}
@else {{ $slot }} @endif