<?php $__env->startSection('header'); ?>
    <?php echo e(trans('admin.head.users')); ?> / <?php echo e(trans('admin.head_section.edit')); ?>

    &nbsp;&nbsp;&nbsp;&nbsp;
    <a href="<?php echo e(route('admin.user.list')); ?>" class="btn btn-info">
        <?php echo e(trans('admin.user.list')); ?>

    </a>

    <a href="<?php echo e(route('admin.user.show', ['id' => $user->id])); ?>" class="btn btn-primary">
        <?php echo e(trans('admin.buttons.show')); ?>

    </a>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('main'); ?>
    <div class="px-content">

        <?php if(session('status')): ?>
            <div class="row">
                <div class="col-md-6">
                    <div class="alert alert-success">
                        <button type="button" class="close" data-dismiss="alert">×</button>
                        <strong><?php echo e(session('status')); ?></strong>
                    </div>
                </div>
            </div>
        <?php endif; ?>

        <div class="row m-t-1">

            <ul class="nav nav-tabs" id="user-tabs">
                <li class="active">
                    <a href="#content" data-toggle="tab">
                        <?php echo e(trans('admin.user.content')); ?>

                    </a>
                </li>

                <li>
                    <a href="#friends" data-toggle="tab">
                        <?php echo e(trans('admin.user.friends')); ?>

                    </a>
                </li>

                <li>
                    <a href="#capsules" data-toggle="tab">
                        <?php echo e(trans('admin.user.capsules')); ?>

                    </a>
                </li>

                <li>
                    <a href="#comments" data-toggle="tab">
                        <?php echo e(trans('admin.user.comments')); ?>

                    </a>
                </li>
            </ul>

            <div class="tab-content tab-content-bordered p-a-0 bg-white">

                <div class="tab-pane p-a-3 fade in active" id="content">
                    <form action="<?php echo e(route('admin.user.update', ['id' => $user->id])); ?>" method="POST">
                        <?php echo e(csrf_field()); ?>

                        <?php echo e(method_field('PUT')); ?>


                        <div class="col-md-4">
                            <div class="form-group <?php echo e($errors->has('first_name') ? 'has-error' : ''); ?>">
                                <label for="user-first-name"><?php echo e(trans('admin.user.first_name')); ?></label>
                                <input type="text" class="form-control"
                                       id="user-first-name"
                                       name="first_name"
                                       value="<?php echo e($user->first_name); ?>" />
                                <?php if($errors->has('first_name')): ?>
                                    <span>
                                        <strong><?php echo e($errors->first('first_name')); ?></strong>
                                    </span>
                                <?php endif; ?>
                            </div>
                            <div class="form-group <?php echo e($errors->has('last_name') ? 'has-error' : ''); ?>">
                                <label for="user-last-name"><?php echo e(trans('admin.user.last_name')); ?></label>
                                <input type="text" class="form-control"
                                       id="user-last-name"
                                       name="last_name"
                                       value="<?php echo e($user->last_name); ?>" />
                                <?php if($errors->has('last_name')): ?>
                                    <span>
                                        <strong><?php echo e($errors->first('last_name')); ?></strong>
                                    </span>
                                <?php endif; ?>
                            </div>

                            <div class="form-group <?php echo e($errors->has('nickname') ? 'has-error' : ''); ?>">
                                <label for="user-nickname"><?php echo e(trans('admin.user.nickname')); ?></label>
                                <input type="text" class="form-control"
                                       id="user-nickname"
                                       name="nickname"
                                       value="<?php echo e($user->nickname); ?>" />
                                <?php if($errors->has('nickname')): ?>
                                    <span>
                                        <strong><?php echo e($errors->first('nickname')); ?></strong>
                                    </span>
                                <?php endif; ?>
                            </div>

                            <div class="form-group <?php echo e($errors->has('email') ? 'has-error' : ''); ?>">
                                <label for="user-email"><?php echo e(trans('admin.user.email')); ?></label>
                                <input type="text" class="form-control"
                                       id="user-email"
                                       name="email"
                                       value="<?php echo e($user->email); ?>" />
                                <?php if($errors->has('email')): ?>
                                    <span>
                                        <strong><?php echo e($errors->first('email')); ?></strong>
                                    </span>
                                <?php endif; ?>
                            </div>
                            <div class="form-group" <?php echo e($errors->has('phone_number') ? 'has-error' : ''); ?>>
                                <label for="user-phone-number"><?php echo e(trans('admin.user.phone_number')); ?></label>
                                <input type="text" class="form-control"
                                       id="user-phone-number"
                                       name="phone_number"
                                       value="<?php echo e($user->phone_number); ?>" />
                                <?php if($errors->has('phone_number')): ?>
                                    <span>
                                        <strong><?php echo e($errors->first('phone_number')); ?></strong>
                                    </span>
                                <?php endif; ?>
                            </div>
                            <div class="form-group" <?php echo e($errors->has('push_notification') ? 'has-error' : ''); ?>>
                                <label>
                                    <input type="checkbox" name="push_notification"
                                           value="1"
                                           <?php echo $user->is_notification_push ? 'checked="checked"' : ''; ?> />
                                    <?php echo e(trans('admin.user.push_notification')); ?>

                                </label>
                                <?php if($errors->has('push_notification')): ?>
                                    <span>
                                        <strong><?php echo e($errors->first('push_notification')); ?></strong>
                                    </span>
                                <?php endif; ?>
                            </div>
                        </div>

                        <div class="col-md-4">

                            <div class="form-group">
                                <label><b><?php echo e(trans('admin.user.search_settings')); ?></b></label>
                            </div>

                            <div class="form-group <?php echo e($errors->has('is_suggested') ? 'has-error' : ''); ?>">
                                <label>
                                    <input type="checkbox" name="is_suggested"
                                           value="1" <?php echo $user->is_suggested ? 'checked="checked"' : ''; ?> />
                                    <?php echo e(trans('admin.user.is_suggested')); ?>

                                </label>
                                <?php if($errors->has('is_suggested')): ?>
                                    <span>
                                        <strong><?php echo e($errors->first('is_suggested')); ?></strong>
                                    </span>
                                <?php endif; ?>
                            </div>

                            <div class="form-group <?php echo e($errors->has('suggested_position') ? 'has-error' : ''); ?>">
                                <label for="user-suggested-position"><?php echo e(trans('admin.user.suggested_position')); ?></label>
                                <input type="number" class="form-control" id="user-suggested-position"
                                       name="suggested_position"
                                       value="<?php echo e($user->suggested_position); ?>" />

                                <?php if($errors->has('suggested_position')): ?>
                                    <span>
                                        <strong><?php echo e($errors->has('suggested_position')); ?></strong>
                                    </span>
                                <?php endif; ?>
                            </div>

                            <div class="form-group <?php echo e($errors->has('search_position') ? 'has-error' : ''); ?>">
                                <label for="user-search-position"><?php echo e(trans('admin.user.search_position')); ?></label>
                                <input type="number" class="form-control" id="user-search-position"
                                       name="search_position"
                                       value="<?php echo e($user->search_position); ?>" />

                                <?php if($errors->has('search_position')): ?>
                                    <span>
                                        <strong><?php echo e($errors->has('search_position')); ?></strong>
                                    </span>
                                <?php endif; ?>
                            </div>
                        </div>

                        <div class="col-md-4">

                        </div>

                        <div class="col-md-12">
                            <input type="submit" class="btn btn-primary" value="<?php echo e(trans('admin.buttons.change')); ?>" />
                        </div>

                    </form>
                </div>

                <div class="tab-pane p-a-3 fade" id="friends">
                    <?php echo $__env->make('admin.user.lists.friends', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                </div>

                <div class="tab-pane p-a-3 fade" id="capsules">
                    <?php echo $__env->make('admin.user.lists.capsules', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                </div>

                <div class="tab-pane p-a-3 fade" id="comments">
                    <?php echo $__env->make('admin.user.lists.comments', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                </div>

            </div>

        </div>

    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
    <style>
        th{
            vertical-align: center;
        }
        td{
            vertical-align: center;
        }
    </style>
    <script>
        $('a[data-toggle="tab"]').on( 'shown.bs.tab', function (e) {
            $.fn.dataTable.tables( {visible: true, api: true} ).columns.adjust();
        } );
    </script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin._layout.layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/html/resources/views.admin/admin/user/form.blade.php ENDPATH**/ ?>