<x-modal-layout class="modal-dialog-centered modal-xl">
    @livewire('role::role-action', [
        'table' => $table, 
        'targetModal' => $targetModal ?? 'app-modal', 
        'data' => $data ?? null,
        'updateMode' => $updateMode,
    ])
    <x-slot name="footer">
        <button 
            class="btn btn-primary" 
            x-data="loading('{!! __('lang.save') !!}', '{!! __('messages.saving_state') !!}')"
            x-on:click="startLoading; window.livewire.emitTo('role::role-action', '{{ $method }}')"
            x-html="text" 
            x-bind:disabled="loading"
            >{{ __('lang.save') }}</button>
    </x-slot>
</x-modal-layout>