@props([
    'wrap' => true,
])

@php
    $pad = config('theme.ui.spacing.card_pad', '1rem');
@endphp

<div {{ $attributes->class('erp-action-bar d-flex flex-wrap align-items-end justify-content-between gap-3') }}
    @if ($wrap) style="margin-bottom: {{ $pad }};" @endif>
    <div class="erp-action-bar-start flex-grow-1 min-w-0">
        @isset($filters)
            {{ $filters }}
        @endisset
    </div>
    <div class="erp-action-bar-end d-flex flex-wrap align-items-center gap-2 flex-shrink-0">
        @isset($secondary)
            {{ $secondary }}
        @endisset
        @isset($primary)
            {{ $primary }}
        @endisset
    </div>
</div>
