@props([
    'prev' => null,
    'next' => null,
    'prevDisabled' => false,
    'submit' => false,
    'showSubmit' => false,
    'showCancel' => false,
    'cancelRoute' => 'admin.empresasDeTurismo.index',
    'cancelRouteParams' => [],
    'submitLabel' => __('Cadastrar Empresa'),
    'submitIcon' => 'fa-user-plus',
])

@php
    $hasSubmitButton = $showSubmit || $submit;
    $hasCancelButton = $showCancel || $submit;
@endphp

<div class="d-flex justify-content-between align-items-center mt-4 gap-2">
    @if ($prevDisabled)
        <button class="btn btn-outline-secondary" type="button" disabled>
            <i class="fa-solid fa-arrow-left-long"></i> {{ __('Anterior') }}
        </button>
    @elseif ($prev)
        <button class="btn btn-outline-secondary" type="button" data-empresa-turismo-tab-prev="{{ $prev }}">
            <i class="fa-solid fa-arrow-left-long"></i> {{ __('Anterior') }}
        </button>
    @else
        <span></span>
    @endif

    <div class="d-flex flex-wrap gap-2 justify-content-end">
        @if ($hasCancelButton)
            <a class="btn btn-danger" href="{{ route($cancelRoute, $cancelRouteParams) }}">
                <i class="fa-solid fa-xmark"></i> {{ __('Cancelar') }}
            </a>
        @endif

        @if ($hasSubmitButton)
            <button class="btn btn-primary" type="submit">
                <i class="fa-solid {{ $submitIcon }}"></i> {{ $submitLabel }}
            </button>
        @endif

        @if ($next)
            <button class="btn btn-outline-primary" type="button" data-empresa-turismo-tab-next="{{ $next }}">
                {{ __('Próximo') }} <i class="fa-solid fa-arrow-right-long"></i>
            </button>
        @endif
    </div>
</div>
