<div class="card-header bg-primary text-white d-flex flex-wrap justify-content-between align-items-center gap-2 py-2">
    <h3 class="my-1 ms-2 fw-bolder"><?php echo $headLine; ?></h3>
    <div class="d-flex flex-wrap gap-1">
        <?php if(isset($routeBack)): ?>
        <button class="btn btn-light btn-sm" type="button"
                onclick="window.location.href ='<?php echo e(route($routeBack, $routeBackParams ?? [])); ?>'">
            <?php if(isset($fontawesomeBack)): ?>  <?php echo $fontawesomeBack; ?> <?php else: ?>  <i class="fa-solid fa-arrow-left"></i> <?php endif; ?> <?php echo e($nameBack); ?>

        </button>
        <?php endif; ?>

        <?php if(Route::currentRouteName() == 'admin.saude.fibromialgia.index'): ?>
        <div class="dropdown">
            <button class="btn btn-light btn-sm dropdown-toggle me-2" type="button" data-bs-toggle="dropdown">
                <i class="fa-solid fa-file"></i> Relatório
            </button>
            <ul class="dropdown-menu">
                <?php $__env->startComponent('components.lists._liLinkDropdown', [
                'links' => [
                ['label' => 'Estado de Cadastro', 'model' => 'cadastro', 'toggle' => '', 'hashData' => ''],
                ['label' => 'Estado da Carteirinha', 'model' => 'carteirinha', 'toggle' => '', 'hashData' => ''],
                ['label' => 'Dados de Cadastrados', 'model' => 'dadosCadastrados', 'toggle' => '', 'hashData' => ''],
                ['label' => 'Gerar todas as carteirinhas', 'model' => '', 'toggle' => 'modal', 'hashData' => 'modalGerarCarteirinha'],
                ]
                ]); ?>
                <?php echo $__env->renderComponent(); ?>
            </ul>
        </div>
        <?php endif; ?>

        <?php if(isset($routeAdd) && isset($permission) && auth()->user()->getPermissaoDetalhes($permission)['adicionar']): ?>
        <button class="btn btn-light btn-sm"
                onclick="window.location.href ='<?php echo e(route($routeAdd, $routeAddParams ?? [])); ?>'">
            <?php if(isset($fontawesomeAdd)): ?>  <?php echo $fontawesomeAdd; ?> <?php else: ?>  <i class="fa-solid fa-plus"></i> <?php endif; ?> <?php echo e($nameAdd); ?>

        </button>
        <?php endif; ?>
        <?php if(isset($routeOther) && isset($permission) && auth()->user()->getPermissaoDetalhes($permission)['adicionar']): ?>
        <button class="btn btn-light btn-sm"
                onclick="window.location.href ='<?php echo e(route($routeOther, $routeOtherParams ?? [])); ?>'">
            <?php if(isset($fontawesomeOther)): ?>  <?php echo $fontawesomeOther; ?> <?php else: ?>  <i class="fa-solid fa-plus"></i> <?php endif; ?> <?php echo e($nameOther); ?>

        </button>
        <?php endif; ?>
        <?php if(isset($routeCSV)): ?>
        <button class="btn btn-light btn-sm"
                onclick="window.location.href ='<?php echo e(route($routeCSV, $routeCSVParams ?? [])); ?>'">
            <?php if(isset($fontawesomeCSV)): ?>  <?php echo $fontawesomeCSV; ?> <?php else: ?>  <i class="fa-solid fa-file-csv"></i> <?php endif; ?> <?php echo e($nameCSV); ?>

        </button>
        <?php endif; ?>
        <?php if(isset($routeDeleteAll) && isset($permission) && auth()->user()->getPermissaoDetalhes($permission)['excluir']): ?>
        <form class="d-inline" action="<?php echo e(route($routeDeleteAll, $routeDeleteAllParameters ?? [])); ?>" method="post" onsubmit="return confirmDelete(this)">
            <?php echo csrf_field(); ?>
            <?php echo method_field('delete'); ?>
            <input type="hidden" name="page" value="<?php echo e(request()->input('page', 1)); ?>">
            <input type="hidden" name="confirm" value="<?php echo e(__($messageDeleteAll)); ?>">
            <button class="btn btn-light btn-sm" title="<?php echo e($nameDeleteAll); ?>">
                <?php if(isset($fontawesomeDeleteAll)): ?>  <?php echo $fontawesomeDeleteAll; ?> <?php else: ?>  <i class="fa-solid fa-file-csv"></i> <?php endif; ?> <?php echo e($nameDeleteAll); ?>

            </button>
        </form>
        <?php endif; ?>

        
        <?php if(isset($tabs)): ?>
            <?php $__currentLoopData = $tabs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tab): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <?php
                    $tabPermCheck = $tab['permission_check'] ?? 'visualizar';
                    $tabVisivel   = !isset($tab['permission'])
                        || auth()->user()->getPermissaoDetalhes($tab['permission'])[$tabPermCheck];
                ?>
                <?php if($tabVisivel): ?>
                    <button class="btn btn-light btn-sm"
                            onclick="window.location.href ='<?php echo e(route($tab['route'])); ?>'">
                        <i class="fa-solid <?php echo e($tab['class']); ?>"></i> <?php echo e(__($tab['label'])); ?>

                    </button>
                <?php endif; ?>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        <?php endif; ?>

    </div>
</div>
<?php /**PATH /var/www/html/portal/resources/views/components/buttons/_headLineButtonsBackAdd.blade.php ENDPATH**/ ?>