<?php $__env->startSection('content'); ?>
    <!--begin::Content container-->
    <div id="kt_app_content_container" class="app-container container-xxl">
    <?php echo $__env->make('components.success-msg', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php echo $__env->make('components.error-msg', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <!--begin::Card-->
        <div class="card">
            <!--begin::Card body-->
            <div class="card-body">
                <form class="form" name="create_task" id="create_task_form" method="POST" enctype="multipart/form-data" action="<?php if($user->id > 0): ?><?php echo e(route('users.update', ['user' => $user->id])); ?><?php else: ?><?php echo e(route('users.create')); ?><?php endif; ?>">
                <?php echo csrf_field(); ?>
                <!--begin::Card-->
                    <div class="card">
                        <!--begin::Card header-->
                        <div class="card-header">
                            <!--begin::Card header-->
                            <?php if($user->id > 0): ?>
                                <div class="card-title fs-3 fw-bold">Update User <?php echo e($user->username); ?></div>
                            <?php else: ?>
                                <div class="card-title fs-3 fw-bold">Create New User</div>
                            <?php endif; ?>
                            <!--end::Card header-->
                        </div>
                        <!--end::Card header-->
                        <!--begin::Card body-->
                        <div class="card-body">
                            <!--begin::Row-->
                            <div class="row mb-8">
                                <!--begin::Col-->
                                <div class="col-xl-2">
                                    <div class="fs-6 fw-semibold mt-2 mb-3"><?php echo app('translator')->get("Full Name"); ?>*</div>
                                </div>
                                <!--end::Col-->
                                <!--begin::Col-->
                                
                                <div class="col-xl-4">
                                    <input name="full_name" class="form-control form-control-solid" type="text" id="full_name" value="<?php echo e($user->full_name); ?>" required>
                                </div>
                                <!--end::Col-->
                                <!--begin::Col-->
                                <div class="col-xl-2">
                                    <div class="fs-6 fw-semibold mt-2 mb-3"><?php echo app('translator')->get("Email"); ?></div>
                                </div>
                                <!--end::Col-->
                                <!--begin::Col-->
                                
                                <div class="col-xl-4">
                                    <input name="email" class="form-control form-control-solid" type="text" id="email"  value="<?php echo e($user->email); ?>">
                                </div>
                                <!--end::Col-->
                            </div>
                            <!--end::Row-->
                            <!--begin::Row-->
                            <div class="row mb-8">
                                <!--begin::Col-->
                                <div class="col-xl-2">
                                    <div class="fs-6 fw-semibold mt-2 mb-3"><?php echo app('translator')->get("Username"); ?>*</div>
                                </div>
                                <!--end::Col-->
                                <!--begin::Col-->
                                
                                <div class="col-xl-4">
                                    <input name="username" class="form-control form-control-solid" type="text" id="username" autocomplete="off"  value="<?php echo e($user->username); ?>" <?php if($user->id > 0): ?> disabled <?php else: ?> required <?php endif; ?>>
                                </div>
                                <!--end::Col-->
                                <!--begin::Col-->
                                <div class="col-xl-2">
                                    <div class="fs-6 fw-semibold mt-2 mb-3"><?php echo app('translator')->get("Password"); ?>*</div>
                                </div>
                                <!--end::Col-->
                                <!--begin::Col-->
                                
                                <div class="col-xl-4">
                                    <input name="password" class="form-control form-control-solid" type="password" id="password" autocomplete="off" value="<?php echo e($user->password); ?>" required>
                                </div>
                                <!--end::Col-->
                            </div>
                            <!--end::Row-->
                            <!--begin::Row-->



























                            <!--end::Row-->
                            <!--begin::Row-->
                            <div class="row mb-8">
                                <!--begin::Col-->
                                <div class="col-xl-2">
                                    <div class="fs-6 fw-semibold mt-2 mb-3"><?php echo app('translator')->get("Role"); ?>*</div>
                                </div>
                                <!--end::Col-->
                                <!--begin::Col-->
                                
                                <div class="col-xl-4">
                                    <select name="role_id" class="form-select form-control-solid" id="role_id" required>
                                        <?php $__currentLoopData = $roles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $role): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <option value="<?php echo e($role->id); ?>" <?php if($role->id == $user->role_id): ?> selected <?php endif; ?>><?php echo e($role->defaultLang->role_name); ?></option>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </select>
                                </div>
                                <!--end::Col-->
                                <!--begin::Col-->
                                <div class="col-xl-2">
                                    <div class="fs-6 fw-semibold mt-2 mb-3"><?php echo app('translator')->get("Governorate"); ?>*</div>
                                </div>
                                <!--end::Col-->
                                <!--begin::Col-->
                                
                                <div class="col-xl-4">
                                    <select name="gov_id" class="form-select form-control-solid" id="gov_id" required>
                                        <?php $__currentLoopData = $governorates; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $gov): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <option value="<?php echo e($gov->id); ?>" <?php if($gov->id == $user->gov_id): ?> selected <?php endif; ?>><?php echo e($gov->defaultLang->name); ?></option>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </select>
                                </div>
                                <!--end::Col-->
                            </div>
                        <!--end::Row-->
                            <!--begin::Row-->
                            <div class="row mb-8">
                                <!--begin::Col-->
                                <div class="col-xl-2">
                                    <div class="fs-6 fw-semibold mt-2 mb-3"><?php echo app('translator')->get("Status"); ?></div>
                                </div>
                                <!--end::Col-->
                                <!--begin::Col-->
                                <div class="col-xl-4">
                                    <!--begin::Switch-->
                                    <div class="form-check form-switch form-check-custom form-check-solid">
                                        <input class="form-check-input" type="checkbox" name="is_active" value="1" id="is_active" <?php if($user->is_active == 1): ?>  checked="checked" <?php endif; ?> >
                                        <label class="form-check-label fw-semibold text-gray-400 ms-3" for="is_active"><?php echo app('translator')->get("Active"); ?></label>
                                    </div>
                                    <!--end::Switch-->
                                </div>
                                <!--end::Col-->
                            </div>
                            <!--end::Row-->
                        </div>
                        <!--end::Card body-->
                        <!--begin::Card footer-->
                        <div class="card-footer d-flex justify-content-end py-6">
                            <button type="reset" class="btn btn-light btn-active-light-primary me-2">Discard</button>
                            <button type="submit" class="btn btn-primary">Save</button>
                        </div>
                        <!--end::Card footer-->
                    </div>
                    <!--end::Card-->
                </form>
            </div>
            <!--end::Card body-->
        </div>
        <!--end::Card-->
    </div>
    <!--end::Content container-->
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.vertical.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\work\techbithub\AAH\aah-hr-site\resources\views/users/add.blade.php ENDPATH**/ ?>