@props([
    'title',
    'total' => null,
    'createRoute' => null,
    'createLabel' => 'Add New',
    'breadcrumb' => null,
])

<div class="px-5 pt-4 pb-0 border-b border-gray-100">
    @if ($breadcrumb)
        <div class="text-xs text-gray-400 mb-3">{!! $breadcrumb !!}</div>
    @endif

    <div class="flex items-center gap-3 pb-3 flex-wrap">
        <span class="text-brass font-semibold text-base">{{ $title }}</span>

        @if (! is_null($total))
            <span class="text-sm text-gray-500">Total <strong class="text-gray-800 font-bold">{{ $total }}</strong></span>
        @endif

        @if ($createRoute)
            <div class="ml-auto flex items-center gap-2">
                <a href="{{ $createRoute }}" class="admin-btn-primary">
                    <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z"/>
                    </svg>
                    {{ $createLabel }}
                </a>
            </div>
        @endif
    </div>
</div>
