@props([ 'id' => null, 'title' => 'Filters', 'icon' => 'sliders', 'action' => null, 'method' => 'GET', 'columns' => 4, 'formAttributes' => [], ]) @php $titleId = $id ? $id.'_title' : 'ui_filter_panel_'.uniqid(); $resolvedMethod = strtoupper((string) $method); $htmlMethod = in_array($resolvedMethod, ['GET', 'POST'], true) ? $resolvedMethod : 'POST'; $resolvedColumns = max(1, min(4, (int) $columns)); $formAttributeBag = new \Illuminate\View\ComponentAttributeBag($formAttributes); @endphp
class([ 'ui-filter-panel', 'ui-filter-panel--has-icon' => (bool) $icon, ])->merge([ 'id' => $id, 'aria-labelledby' => $titleId, ]) }} >
@if ($icon) @endif

{{ $title }}

@isset($context)
{{ $context }}
@endisset
class('ui-filter-panel__form')->merge([ 'method' => $htmlMethod, 'action' => $action, ]) }} > @if (! in_array($resolvedMethod, ['GET', 'POST'], true)) @method($resolvedMethod) @endif @isset($hidden) {{ $hidden }} @endisset
{{ $slot }}
@if (isset($footer) || isset($actions)) @endif