<?php $__env->startSection('title', __('trans.setting.title')); ?>

<?php $__env->startSection('content'); ?>
    <div class="card mb-4">
        
        <div class="card-body">
            <form action="<?php echo e(url()->current()); ?>" method="post"><?php echo csrf_field(); ?>

                <div class="row">

                    <div class="col-12">
                        <div class="divider divider-primary">
                            <div class="divider-text text-primary"><?php echo e(__('trans.setting.general')); ?></div>
                        </div>
                    </div>

                    <div class="col-md-4 mb-3">
                        <label class="form-label"><?php echo e(__('trans.setting.name')); ?> <b class="text-danger">*</b></label>
                        <input type="text" class="form-control" required name="name"
                            value="<?php echo e(old('name', setting()->name)); ?>" />
                    </div>

                    <div class="col-md-4 mb-3">
                        <label class="form-label"><?php echo e(__('trans.setting.description')); ?> <b class="text-danger">*</b></label>
                        <textarea name="description" class="form-control" required rows="5"><?php echo e(old('description', setting()->description)); ?></textarea>
                    </div>

                    <div class="col-md-4 mb-3">
                        <label class="form-label"><?php echo e(__('trans.setting.app_repair')); ?> <strong
                                class="text-danger">*</strong></label>
                        <select name="app_repair" class="form-select" required>
                            <option <?php if(setting()->app_repair == '0'): ?> selected <?php endif; ?> value="0">
                                <?php echo e(__('trans.no')); ?></option>
                            <option <?php if(setting()->app_repair == '1'): ?> selected <?php endif; ?> value="1">
                                <?php echo e(__('trans.yes')); ?></option>
                        </select>
                    </div>

                    <div class="col-12">
                        <div class="divider divider-danger">
                            <div class="divider-text text-danger"><?php echo e(__('trans.setting.important')); ?></div>
                        </div>
                    </div>

                    <div class="col-md-3 mb-3">
                        <label class="form-label"><?php echo e(__('trans.setting.timezone')); ?> <strong
                                class="text-danger">*</strong></label>
                        <select name="timezone" class="select2 form-select" required>
                            <?php $__currentLoopData = $timezone_identifiers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option <?php if(date_default_timezone_get() == $item): ?> selected <?php endif; ?> value="<?php echo e($item); ?>">
                                    <?php echo e($item); ?></option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                    </div>

                    <div class="col-md-3 mb-3">
                        <label class="form-label"><?php echo e(__('trans.setting.app_env')); ?> <strong
                                class="text-danger">*</strong></label>
                        <select name="app_env" class="form-select" required>
                            <option <?php if(env('APP_ENV') == 'local'): ?> selected <?php endif; ?> value="local">
                                <?php echo e(__('trans.setting.local')); ?></option>
                            <option <?php if(env('APP_ENV') == 'production'): ?> selected <?php endif; ?> value="production">
                                <?php echo e(__('trans.setting.production')); ?></option>
                        </select>
                    </div>

                    <div class="col-md-3 mb-3">
                        <label class="form-label"><?php echo e(__('trans.setting.locale')); ?> <strong
                                class="text-danger">*</strong></label>
                        <select name="locale" class="form-select" required>
                            <option <?php if(env('APP_LOCALE') == 'en'): ?> selected <?php endif; ?> value="en">
                                <?php echo e(__('trans.setting.english')); ?></option>
                            <option <?php if(env('APP_LOCALE') == 'ar'): ?> selected <?php endif; ?> value="ar">
                                <?php echo e(__('trans.setting.arabic')); ?></option>
                        </select>
                    </div>

                    <div class="col-12">
                        <div class="divider divider-info">
                            <div class="divider-text text-info"><?php echo e(__('trans.setting.mobile_app')); ?></div>
                        </div>
                    </div>

                    <div class="col-md-3 mb-3">
                        <label class="form-label"><?php echo e(__('trans.setting.ios_version')); ?> <b
                                class="text-danger">*</b></label>
                        <input type="text" class="form-control" required name="ios_version"
                            value="<?php echo e(old('ios_version', setting()->ios_version)); ?>" />
                    </div>

                    <div class="col-md-3 mb-3">
                        <label class="form-label"><?php echo e(__('trans.setting.android_version')); ?> <b
                                class="text-danger">*</b></label>
                        <input type="text" class="form-control" required name="android_version"
                            value="<?php echo e(old('android_version', setting()->android_version)); ?>" />
                    </div>

                    <div class="col-md-3 mb-3">
                        <label class="form-label"><?php echo e(__('trans.setting.in_review')); ?> <strong
                                class="text-danger">*</strong></label>
                        <select name="in_review" class="form-select" required>
                            <option <?php if(setting()->in_review == '0'): ?> selected <?php endif; ?> value="0">
                                <?php echo e(__('trans.no')); ?></option>
                            <option <?php if(setting()->in_review == '1'): ?> selected <?php endif; ?> value="1">
                                <?php echo e(__('trans.yes')); ?></option>
                        </select>
                    </div>

                    <div class="col-md-3 mb-3">
                        <label class="form-label"><?php echo e(__('trans.setting.value')); ?> <b class="text-danger">*</b></label>
                        <input type="text" class="form-control" required name="value"
                            value="<?php echo e(old('value', setting()->value)); ?>"
                            oninput="this.value = this.value.replace(/[^0-9]/g, '')" />
                    </div>

                    <div class="col-12">
                        <div class="divider divider-success">
                            <div class="divider-text text-success"><?php echo e(__('trans.setting.logo')); ?> &
                                <?php echo e(__('trans.setting.icon')); ?></div>
                        </div>
                    </div>

                    <div class="col-md-6 mb-3">
                        <label class="form-label"><?php echo e(__('trans.setting.logo')); ?> <b class="text-danger">*</b></label>
                        <div class="input-group">
                            <span class="input-group-btn">
                                <a data-input="thumbnail" data-preview="holder"
                                    class="UploadFile btn btn-primary text-white">
                                    <?php echo e(__('trans.choose')); ?>

                                </a>
                            </span>
                            <input id="thumbnail" dir="ltr" required class="form-control" type="text" name="logo"
                                value="<?php echo e(old('logo', setting()->logo)); ?>" readonly />
                        </div>
                        <div id="holder" style="margin-top:15px;max-height:100px;">
                            <?php if(!empty(old('logo', setting()->logo))): ?>
                                <img src="<?php echo e(old('logo', setting()->logo)); ?>" style="height: 5rem;">
                            <?php endif; ?>
                        </div>
                    </div>

                    <div class="col-md-6 mb-3">
                        <label class="form-label"><?php echo e(__('trans.setting.icon')); ?> <b class="text-danger">*</b></label>
                        <div class="input-group">
                            <span class="input-group-btn">
                                <a data-input="thumbnail2" data-preview="holder2"
                                    class="UploadFile btn btn-primary text-white">
                                    <?php echo e(__('trans.choose')); ?>

                                </a>
                            </span>
                            <input id="thumbnail2" dir="ltr" required class="form-control" type="text"
                                name="icon" value="<?php echo e(old('icon', setting()->icon)); ?>" readonly />
                        </div>
                        <div id="holder2" style="margin-top:15px;max-height:100px;">
                            <?php if(!empty(old('icon', setting()->icon))): ?>
                                <img src="<?php echo e(old('icon', setting()->icon)); ?>" style="height: 5rem;">
                            <?php endif; ?>
                        </div>
                    </div>

                    


                    <div class="col-12">
                        <div class="divider divider-warning">
                            <div class="divider-text text-warning"><?php echo e(__('trans.setting.social_media')); ?></div>
                        </div>
                    </div>

                    <div class="col-md-4 mb-3">
                        <label class="form-label"><i class="fa-regular fa-address-book fa-fw"></i>
                            <?php echo e(__('trans.setting.address')); ?></label>
                        <input type="text" class="form-control" name="address"
                            value="<?php echo e(old('address', setting()->address)); ?>" />
                    </div>

                    <div class="col-md-4 mb-3">
                        <label class="form-label"><i class="fa-regular fa-envelope fa-fw"></i>
                            <?php echo e(__('trans.setting.email')); ?></label>
                        <input type="email" class="form-control" name="email"
                            value="<?php echo e(old('email', setting()->email)); ?>" />
                    </div>

                    <div class="col-md-4 mb-3">
                        <label class="form-label"><i class="fa-solid fa-mobile fa-fw"></i>
                            <?php echo e(__('trans.setting.phone')); ?></label>
                        <input type="tel" dir="ltr" class="form-control" name="phone"
                            value="<?php echo e(old('phone', setting()->phone)); ?>" />
                    </div>

                    <div class="col-md-4 mb-3">
                        <label><i class="fa-brands fa-fw fa-facebook"></i> Facebook</label>
                        <input type="url" class="form-control" name="facebook"
                            value="<?php echo e(old('facebook', setting()->facebook)); ?>" />
                    </div>

                    <div class="col-md-4 mb-3">
                        <label><i class="fa-brands fa-fw fa-instagram"></i> instagram</label>
                        <input type="url" class="form-control" name="instagram"
                            value="<?php echo e(old('instagram', setting()->instagram)); ?>" />
                    </div>

                    <div class="col-md-4 mb-3">
                        <label><i class="fa-brands fa-fw fa-x-twitter"></i> twitter</label>
                        <input type="url" class="form-control" name="twitter"
                            value="<?php echo e(old('twitter', setting()->twitter)); ?>" />
                    </div>

                    <div class="col-md-4 mb-3">
                        <label><i class="fa-brands fa-fw fa-linkedin"></i> linkedIn</label>
                        <input type="url" class="form-control" name="linkedIn"
                            value="<?php echo e(old('linkedIn', setting()->linkedIn)); ?>" />
                    </div>

                    <div class="col-md-4 mb-3">
                        <label><i class="fa-brands fa-fw fa-snapchat"></i> snapchat</label>
                        <input type="url" class="form-control" name="snapchat"
                            value="<?php echo e(old('snapchat', setting()->snapchat)); ?>" />
                    </div>

                    <div class="col-md-4 mb-3">
                        <label><i class="fa-brands fa-fw fa-pinterest"></i> pinterest</label>
                        <input type="url" class="form-control" name="pinterest"
                            value="<?php echo e(old('pinterest', setting()->pinterest)); ?>" />
                    </div>

                    <div class="col-md-4 mb-3">
                        <label><i class="fa-brands fa-fw fa-tiktok"></i> tiktok</label>
                        <input type="url" class="form-control" name="tiktok"
                            value="<?php echo e(old('tiktok', setting()->tiktok)); ?>" />
                    </div>

                    <div class="col-md-4 mb-3">
                        <label><i class="fa-brands fa-fw fa-youtube"></i> youtube</label>
                        <input type="url" class="form-control" name="youtube"
                            value="<?php echo e(old('youtube', setting()->youtube)); ?>" />
                    </div>

                    <div class="col-md-4 mb-3">
                        <label><i class="fa-brands fa-fw fa-telegram"></i> telegram</label>
                        <input type="url" class="form-control" name="telegram"
                            value="<?php echo e(old('telegram', setting()->telegram)); ?>" />
                    </div>

                    <div class="col-md-4 mb-3">
                        <label><i class="fa-brands fa-fw fa-whatsapp"></i> whatsapp</label>
                        <input type="url" class="form-control" name="whatsapp"
                            value="<?php echo e(old('whatsapp', setting()->whatsapp)); ?>" />
                    </div>

                    

                    <div class="col-md-12 mt-4">
                        <button class="btn btn-primary btn-update"><?php echo e(__('trans.save')); ?></button>
                    </div>

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


<?php $__env->startSection('css'); ?>
    
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/codemirror.min.css">

    <!-- تضمين بعض الثيمات الخاصة بـ CodeMirror -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/theme/dracula.min.css">
    <style>
        .cm-s-dracula .CodeMirror-gutters,
        .cm-s-dracula.CodeMirror {
            text-align: left !important;
            direction: ltr !important;
        }
    </style>
<?php $__env->stopSection(); ?>



<?php $__env->startSection('js'); ?>
    
    <script>
        $('.select2').select2();
    </script>

    <!-- تضمين ملفات JavaScript الخاصة بـ CodeMirror -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/codemirror.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/mode/xml/xml.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/mode/javascript/javascript.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/mode/css/css.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/mode/htmlmixed/htmlmixed.min.js"></script>

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

<?php echo $__env->make('layouts.admin.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH E:\projects\doctorito\resources\views/admin/settings/index.blade.php ENDPATH**/ ?>