<?php if(request()->is('admin/*')): ?>
    <?php $__env->startSection('site_title', formatTitle([__('Edit'), __('User'), config('settings.title')])); ?>
<?php else: ?>
    <?php $__env->startSection('site_title', formatTitle([__('Profile'), config('settings.title')])); ?>
<?php endif; ?>

<?php echo $__env->make('shared.breadcrumbs', ['breadcrumbs' => [
    ['url' => request()->is('admin/*') ? route('admin.dashboard') : route('dashboard'), 'title' => request()->is('admin/*') ? __('Admin') : __('Home')],
    ['url' => request()->is('admin/*') ? route('admin.users') : route('account'), 'title' => request()->is('admin/*') ? __('Users') : __('Account')],
    ['title' => request()->is('admin/*') ? __('Edit') : __('Profile')]
]], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

<div class="d-flex">
    <h1 class="h2 mb-3 text-break"><?php echo e((request()->is('admin/*') ? __('Edit') : __('Profile'))); ?></h1>
</div>

<div class="card border-0 shadow-sm <?php if(request()->is('admin/*')): ?> mb-3 <?php endif; ?>">
    <div class="card-header align-items-center">
        <div class="row">
            <div class="col">
                <div class="font-weight-medium py-1">
                    <?php if(request()->is('admin/*')): ?>
                        <?php echo e(__('User')); ?>

                        <?php if($user->trashed()): ?>
                            <span class="badge badge-danger"><?php echo e(__('Disabled')); ?></span>
                        <?php elseif(!$user->email_verified_at): ?>
                            <span class="badge badge-secondary"><?php echo e(__('Pending')); ?></span>
                        <?php endif; ?>
                    <?php else: ?>
                        <?php echo e(__('Profile')); ?>

                    <?php endif; ?>
                </div>
            </div>
            <?php if(request()->is('admin/*')): ?>
                <div class="col-auto">
                    <div class="form-row">
                        <div class="col">
                            <?php echo $__env->make('admin.users.partials.menu', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                        </div>
                    </div>
                </div>
            <?php endif; ?>
        </div>
    </div>

    <div class="card-body">
        <?php echo $__env->make('shared.message', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

        <?php if($user->getPendingEmail() && request()->is('admin/*') == false): ?>
            <div class="alert alert-info d-flex" role="alert">
                <div>
                    <form class="d-inline" method="POST" action="<?php echo e(route('account.profile.resend')); ?>" id="resend-form">
                        <?php echo csrf_field(); ?>
                        <?php echo e(__(':address email address is pending confirmation', ['address' => $user->getPendingEmail()])); ?>. <?php echo e(__('Didn\'t receive the email?')); ?> <a href="#" class="alert-link font-weight-medium" onclick="event.preventDefault(); document.getElementById('resend-form').submit();"><?php echo e(__('Resend')); ?></a>
                    </form>
                </div>
                <div class="<?php echo e((__('lang_dir') == 'rtl' ? 'mr-auto' : 'ml-auto')); ?>">
                    <form class="d-inline" method="POST" action="<?php echo e(route('account.profile.cancel')); ?>" id="cancel-form">
                        <?php echo csrf_field(); ?>
                        <a href="#" class="alert-link font-weight-medium" onclick="event.preventDefault(); document.getElementById('cancel-form').submit();"><?php echo e(__('Cancel')); ?></a>
                    </form>
                </div>
            </div>
        <?php endif; ?>

        <form action="<?php echo e((request()->is('admin/*') ? route('admin.users.edit', $user->id) : route('account.profile.update'))); ?>" method="post" enctype="multipart/form-data">
            <?php echo csrf_field(); ?>

            <div class="form-group">
                <label for="i-name"><?php echo e(__('Name')); ?></label>
                <input type="text" name="name" id="i-name" class="form-control<?php echo e($errors->has('name') ? ' is-invalid' : ''); ?>" value="<?php echo e(old('name') ?? $user->name); ?>">
                <?php if($errors->has('name')): ?>
                    <span class="invalid-feedback" role="alert">
                        <strong><?php echo e($errors->first('name')); ?></strong>
                    </span>
                <?php endif; ?>
            </div>

            <div class="form-group">
                <label for="i-email"><?php echo e(__('Email')); ?></label>
                <input type="text" name="email" id="i-email" class="form-control<?php echo e($errors->has('email') ? ' is-invalid' : ''); ?>" value="<?php echo e(old('email') ?? $user->email); ?>">
                <?php if($errors->has('email')): ?>
                    <span class="invalid-feedback" role="alert">
                        <strong><?php echo e($errors->first('email')); ?></strong>
                    </span>
                <?php endif; ?>
            </div>

            <div class="form-group">
                <label for="i-timezone"><?php echo e(__('Timezone')); ?></label>
                <select name="timezone" id="i-timezone" class="custom-select<?php echo e($errors->has('timezone') ? ' is-invalid' : ''); ?>">
                    <?php $__currentLoopData = timezone_identifiers_list(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($value); ?>" <?php if($value == $user->timezone): ?> selected <?php endif; ?>><?php echo e($value); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
                <?php if($errors->has('timezone')): ?>
                    <span class="invalid-feedback" role="alert">
                        <strong><?php echo e($errors->first('timezone')); ?></strong>
                    </span>
                <?php endif; ?>
            </div>

            <?php if(request()->is('admin/*')): ?>
                <div class="hr-text"><span class="font-weight-medium text-body"><?php echo e(__('Status')); ?></span></div>

                <div class="form-group">
                    <label for="i-email-verified-at"><?php echo e(__('Verified')); ?></label>
                    <select name="email_verified_at" id="i-email-verified-at" class="custom-select<?php echo e($errors->has('email_verified_at') ? ' is-invalid' : ''); ?>">
                        <option value="0" <?php if(empty($user->email_verified_at)): ?> selected <?php endif; ?>><?php echo e(__('No')); ?></option>
                        <option value="1" <?php if($user->email_verified_at): ?> selected <?php endif; ?>><?php echo e(__('Yes')); ?></option>
                    </select>
                    <?php if($errors->has('email_verified_at')): ?>
                        <span class="invalid-feedback" role="alert">
                            <strong><?php echo e($errors->first('email_verified_at')); ?></strong>
                        </span>
                    <?php endif; ?>
                </div>

                <div class="form-group">
                    <label for="i-role"><?php echo e(__('Role')); ?></label>
                    <select name="role" id="i-role" class="custom-select<?php echo e($errors->has('role') ? ' is-invalid' : ''); ?>">
                        <?php $__currentLoopData = [0 => __('User'), 1 => __('Admin')]; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($key); ?>" <?php if($key == $user->role): ?> selected <?php endif; ?>><?php echo e($value); ?></option>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
                    <?php if($errors->has('role')): ?>
                        <span class="invalid-feedback" role="alert">
                            <strong><?php echo e($errors->first('role')); ?></strong>
                        </span>
                    <?php endif; ?>
                </div>

                <div class="hr-text"><span class="font-weight-medium text-body"><?php echo e(__('Password')); ?></span></div>

                <div class="form-group">
                    <label for="i-password"><?php echo e(__('New password')); ?> <span class="text-muted">(<?php echo e(mb_strtolower(__('Leave empty if you don\'t want to change it'))); ?>)</span></label>
                    <input id="i-password" type="password" class="form-control<?php echo e($errors->has('password') ? ' is-invalid' : ''); ?>" name="password">
                    <?php if($errors->has('password')): ?>
                        <span class="invalid-feedback" role="alert">
                            <strong><?php echo e($errors->first('password')); ?></strong>
                        </span>
                    <?php endif; ?>
                </div>

                <div class="form-group">
                    <label for="i-password-confirmation"><?php echo e(__('Confirm new password')); ?></label>
                    <input type="password" name="password_confirmation" id="i-password-confirmation" class="form-control<?php echo e($errors->has('password_confirmation') ? ' is-invalid' : ''); ?>">
                    <?php if($errors->has('password_confirmation')): ?>
                        <span class="invalid-feedback" role="alert">
                            <strong><?php echo e($errors->first('password_confirmation')); ?></strong>
                        </span>
                    <?php endif; ?>
                </div>

                <div class="hr-text"><span class="font-weight-medium text-body"><?php echo e(__('Two-factor authentication')); ?></span></div>

                <div class="form-group">
                    <label for="i-tfa"><?php echo e(__('Email')); ?></label>
                    <select name="tfa" id="i-tfa" class="custom-select<?php echo e($errors->has('tfa') ? ' is-invalid' : ''); ?>">
                        <?php $__currentLoopData = [0 => __('Disabled'), 1 => __('Enabled')]; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($key); ?>" <?php if((old('tfa') !== null && old('tfa') == $key) || ($user->tfa == $key && old('tfa') == null)): ?> selected <?php endif; ?>><?php echo e($value); ?></option>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
                    <?php if($errors->has('tfa')): ?>
                        <span class="invalid-feedback" role="alert">
                            <strong><?php echo e($errors->first('tfa')); ?></strong>
                        </span>
                    <?php endif; ?>
                </div>

                <div class="hr-text"><span class="font-weight-medium text-body"><?php echo e(__('Plan')); ?></span></div>

                <div class="row mx-n2">
                    <div class="col-12 col-lg-4 px-2">
                        <div class="form-group">
                            <label for="i-plan-id"><?php echo e(__('Name')); ?></label>
                            <select id="i-plan-id" name="plan_id" class="custom-select<?php echo e($errors->has('plan_id') ? ' is-invalid' : ''); ?>">
                                <?php $__currentLoopData = $plans; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $plan): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($plan->id); ?>" <?php if($user->plan_id == $plan->id): ?> selected <?php endif; ?>><?php echo e($plan->name); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                            <?php if($errors->has('plan_id')): ?>
                                <span class="invalid-feedback" role="alert">
                                    <strong><?php echo e($errors->first('plan_id')); ?></strong>
                                </span>
                            <?php endif; ?>
                        </div>
                    </div>

                    <div class="col-12 col-lg-4 px-2">
                        <div class="form-group">
                            <label for="i-plan-ends-at"><?php echo e(__('Ends at')); ?></label>
                            <input type="date" name="plan_ends_at" class="form-control<?php echo e($errors->has('plan_ends_at') ? ' is-invalid' : ''); ?>" id="i-plan-ends-at" placeholder="YYYY-MM-DD" value="<?php echo e(old('plan_ends_at') ?? ($user->plan_ends_at ? $user->plan_ends_at->tz($user->timezone ?? config('app.timezone'))->format('Y-m-d') : '')); ?>">
                            <?php if($errors->has('plan_ends_at')): ?>
                                <span class="invalid-feedback" role="alert">
                                    <strong><?php echo e($errors->first('plan_ends_at')); ?></strong>
                                </span>
                            <?php endif; ?>
                        </div>
                    </div>

                    <div class="col-12 col-lg-4 px-2">
                        <div class="form-group">
                            <label for="i-plan-payment-processor"><?php echo e(__('Processor')); ?></label>
                            <input type="text" class="form-control" id="i-plan-payment-processor" value="<?php echo e(config('payment.processors.' . $user->plan_payment_processor)['name'] ?? __('None')); ?>" readonly>
                        </div>
                    </div>
                </div>
            <?php endif; ?>

            <button type="submit" name="submit" class="btn btn-primary"><?php echo e(__('Save')); ?></button>
        </form>
    </div>
</div>

<?php if(request()->is('admin/*')): ?>
    <div class="row m-n2">
        <?php
            $menu = [
                ['icon' => 'icons.credit-card', 'route' => 'admin.payments', 'title' => __('Payments'), 'stats' => 'payments'],
                ['icon' => 'icons.list-alt', 'route' => 'admin.reports', 'title' => __('Reports'), 'stats' => 'reports']
            ];
        ?>

        <?php $__currentLoopData = $menu; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $link): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <div class="col-12 col-md-6 col-lg-4 p-2">
                <a href="<?php echo e(route($link['route'], ['user_id' => $user->id])); ?>" class="text-decoration-none text-secondary">
                    <div class="card border-0 shadow-sm h-100">
                        <div class="card-body d-flex align-items-center">
                            <?php echo $__env->make($link['icon'], ['class' => 'fill-current width-4 height-4 ' . (__('lang_dir') == 'rtl' ? 'ml-3' : 'mr-3 ')], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                            <div class="text-truncate"><?php echo e($link['title']); ?></div>
                            <?php echo $__env->make((__('lang_dir') == 'rtl' ? 'icons.chevron-left' : 'icons.chevron-right'), ['class' => 'width-3 height-3 fill-current mx-2'], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                            <div class="<?php echo e((__('lang_dir') == 'rtl' ? 'mr-auto' : 'ml-auto')); ?> badge badge-primary"><?php echo e(number_format($stats[$link['stats']], 0, __('.'), __(','))); ?></div>
                        </div>
                    </div>
                </a>
            </div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </div>
<?php endif; ?>
<?php /**PATH /home/innovitt/domains/panel.rankrepo.com/public_html/resources/views/account/profile.blade.php ENDPATH**/ ?>