<div>
    <form>

       


        <div class="row mb-3">
            <label class="col-sm-2 col-form-label" for="email">E-Posta *</label>
            <div class="col-sm-10">
                <input class="form-control" id="email" type="email" wire:model="email" required autocomplete="off">
                <div>
                    @error('email') <span class="error">{{ $message }}</span> @enderror
                </div>
            </div>
        </div>

        <div class="row mb-3">
            <label class="col-sm-2 col-form-label" for="name">Ad Soyad *</label>
            <div class="col-sm-10">
                <input class="form-control" id="name" type="text" wire:model="name" required autocomplete="off">
                <div>
                    @error('name') <span class="error">{{ $message }}</span> @enderror
                </div>
            </div>
        </div>



        <div class="row mb-3">
            <label class="col-sm-2 col-form-label" for="password">Şifre *</label>
            <div class="col-sm-9">
                <input class="form-control" id="password" type="text" wire:model="password" required autocomplete="off">
                <div>
                    @error('password') <span class="error">{{ $message }}</span> @enderror
                </div>
            </div>
            <div class="col-sm-1" style="display: flex; justify-content: start; align-items: center;">
                <button class="btn btn-sm btn-outline-primary" wire:click.prevent="randomPassword" wire:loading.attr="disabled">
                    <svg class="icon"><use xlink:href="{{ URL::to('admin/vendors/@coreui/icons/svg/free.svg#cil-reload') }}"></use></svg>
                </button>
            </div>
        </div>

        <div class="row mb-3">
            <label class="col-sm-2 col-form-label" for="role">Rol *</label>
            <div class="col-sm-10">
                <select class="form-select" id="role" wire:model="role" required>
                    <option value="">Seçiniz</option>
                    @foreach($this->roles as $role)
                        <option value="{{ $role->name }}">{{ ucwords(str_replace("-", " ", $role->name)) }}</option>
                    @endforeach
                </select>
                <div>
                    @error('role') <span class="error">{{ $message }}</span> @enderror
                </div>
            </div>
        </div>

        <button class="btn btn-primary" type="submit" wire:click.prevent="saveAndRedirect" wire:loading.attr="disabled" wire:target="save, saveAndRedirect">Kaydet</button>
        <button class="btn btn-primary" type="submit" wire:click.prevent="save" wire:loading.attr="disabled" wire:target="save, saveAndRedirect">Kaydet ve Eklemeye Devam Et</button>

    </form>
</div>
