<x-app-layout :assets="$assets ?? []">
    <div>
        <div class="row">
            <div class="col-xl-12 col-lg-12">
                <div class="card">
                    <div class="card-header d-flex justify-content-between">
                        <div class="header-title">
                            <h4 class="card-title">Create Subadmin</h4>
                        </div>
                    </div>
                    <div class="card-body">
                        <form action="{{ route("admin.users.storesubadmin") }}" method="POST" role="form text-left" class="needs-validation" enctype="multipart/form-data">
                            @csrf
                            <div class="new-user-info">
                                <div class="row">
                                    <div class="form-group col-md-6">
                                        <label class="form-label" for="name">Name: <span class="text-danger">*</span></label>
                                        <input class="form-control" value="{{ old('name', isset($user) ? $user->name : '') }}" type="text" placeholder="Name" id="name" name="name" required>
                                    </div>
                                    <div class="form-group col-md-6">
                                        <label class="form-label" for="email">E-Mail: <span class="text-danger">*</span></label>
                                        <input class="form-control" value="{{ old('email', isset($user) ? $user->email : '') }}" type="email" placeholder="Email" id="email" name="email" required>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="form-group col-md-6">
                                        <label class="form-label" for="mobile">Mobile: <span class="text-danger">*</span></label>
                                        <input class="form-control" value="{{ old('mobile', isset($user) ? $user->mobile : '') }}" type="text" placeholder="Mobile" id="mobile" name="mobile" required>
                                    </div>
                                    <div class="form-group col-md-6">
                                        <label class="form-label" for="password">Password:</label>
                                        <input class="form-control" value="" type="password" placeholder="Password" id="password" name="password">
                                    </div>
                                </div>
                                <button type="submit" class="btn btn-sm btn-primary">Save</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</x-app-layout>
