@props([
    'backUrl' => null,
    'backText' => 'Back to List',
    'submitText' => 'Save',
    'submitIcon' => 'save',
    'submitId' => 'submitBtn',
    'showClear' => true,
    'clearText' => 'Clear Form',
    'clearId' => 'clearBtn'
])

<div class="footer-actions">
    <div>
        @if($backUrl)
            <a href="{{ $backUrl }}" class="btn btn-secondary">
                <i class="fas fa-arrow-left"></i> {{ $backText }}
            </a>
        @endif

        {{ $left ?? '' }}
    </div>

    <div>
        @if($showClear)
            <button class="btn btn-danger" type="reset" id="{{ $clearId }}">
                <i class="fas fa-undo"></i> {{ $clearText }}
            </button>
        @endif

        {{ $slot }}

        <button class="btn btn-success" type="submit" id="{{ $submitId }}">
            <span class="spinner-border spinner-border-sm d-none" role="status" id="submitSpinner"></span>
            <i class="fas fa-{{ $submitIcon }}" id="submitIcon"></i>
            <span id="submitText">{{ $submitText }}</span>
        </button>
    </div>
</div>
