@props([
    'submitText' => null,
    'submitIcon' => 'fas fa-save',
    'cancelUrl' => null,
    'cancelText' => null,
    // PRC-497: when this component sits in an x-admin.modal/card footer slot,
    // the rendered button is OUTSIDE the <form> (footer is a sibling of the
    // body). Passing formId binds the submit button to its form via the
    // HTML5 `form` attribute. Optional + backward-compatible: omitted ⇒ no
    // `form` attribute, identical to previous behaviour.
    'formId' => null,
])

<div class="d-flex justify-content-between align-items-center">
    @if($cancelUrl)
        <a href="{{ $cancelUrl }}" class="btn btn-outline-secondary btn-sm">
            <i class="fas fa-times me-1"></i>{{ $cancelText ?? __('admin/common.cancel') }}
        </a>
    @else
        <div></div>
    @endif
    <button type="submit" class="btn btn-primary btn-sm" @if($formId) form="{{ $formId }}" @endif>
        <i class="{{ $submitIcon }} me-1"></i>{{ $submitText ?? __('admin/common.save') }}
    </button>
</div>
