@extends('layouts.load')
@section('content')

<div class="card shadow-none border-0 mb-0">
    <div class="card-body p-3">
        @include('includes.admin.form-both')
        <div class="gocover" style="background: url({{asset('assets/images/'.$gs->admin_loader)}}) no-repeat scroll center center rgba(45, 45, 45, 0.5);"></div>
        <form id="geniusformdata" action="{{ route('admin.administator.update',$data->id) }}" method="POST" enctype="multipart/form-data">
            {{csrf_field()}}

            <div class="mb-3">
                <label class="form-label">{{ __('Name') }} <span class="text-danger">*</span></label>
                <input type="text" class="form-control" name="name" placeholder="{{ __("User Name") }}" required value="{{ $data->name }}">
            </div>

            <div class="mb-3">
                <label class="form-label">{{ __("Email") }} <span class="text-danger">*</span></label>
                <input type="email" class="form-control" name="email" placeholder="{{ __("Email Address") }}" required value="{{ $data->email }}">
            </div>

            <div class="mb-3">
                <label class="form-label">{{ __("Phone") }} <span class="text-danger">*</span></label>
                <input type="text" class="form-control" name="phone" placeholder="{{ __("Phone Number") }}" required value="{{ $data->phone }}">
            </div>

            <div class="mb-3">
                <label class="form-label">{{ __("Password") }} <span class="text-danger">*</span></label>
                <input type="password" class="form-control" name="password" placeholder="{{ __("Password") }}" required>
            </div>

            <div class="mb-3">
                <label class="form-label">{{ __("Role") }} <span class="text-danger">*</span></label>
                <select name="role_id" class="form-select" required>
                    @foreach ($roles as $item)
                        <option {{ $item->id == $data->role_id ? 'selected' : ''}} value="{{ $item->id }}">{{ $item->name }}</option>
                    @endforeach
                </select>
            </div>

            <button class="btn btn-primary w-100" type="submit">{{ __("Update Staff") }}</button>
        </form>
    </div>
</div>

@endsection
