<div wire:ignore.self class="modal fade" tabindex="-1" role="dialog" id="theModal">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header bg-primary">
                <h5 class="modal-title">
                <b>{{ $componentName }}</b> | {{ $selected_id > 0 ? 'EDITAR' : 'CREAR' }}
                </h5>
                <h6 class="text-center text-warning" wire:loading>ESPERE UN MOMENTO POR FAVOR</h6>
            </div>
        <div class="modal-body">

            <div class="row">
                <div class="col-sm-12">
                    <div class="mb-3 m-form__group">
                        <div class="input-group">
                            <span class="input-group-text"><i class="fa fa-edit"></i></span>
                            <input class="form-control"
                            type="text"
                            wire:model.lazy="permissionName"
                            placeholder="ej: Module_index" maxlength="99"/>
                        </div>
                    </div>
                    @error('permissionName')
                    <span class="text-danger er">{{ $message }}</span>
                    @enderror
                </div>
            </div>

        </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-outline-primary" wire:click.prevent="resetUI()" data-bs-dismiss="modal">CERRAR</button>

                @if( $selected_id < 1 )
                <button type="button" class="btn btn-primary close-modal" wire:click.prevent="CreatePermission()">GUARDAR</button>
                @else
                <button type="button" class="btn btn-primary close-modal" wire:click.prevent="UpdatePermission()">ACTUALIZAR</button>
                @endif
            </div>
        </div>
    </div>
</div>

