<div class="modal modal-blur fade" id="modal--write--story" tabindex="-1" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title"><?php echo e(__('main.write_a_story')); ?></h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <!-- if you are not logged in -->
            <?php if(!Auth::check()): ?>
            <div class="modal-body">
                <div class="empty">
                    <div class="empty-icon">
                        <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><circle cx="12" cy="12" r="9"></circle><line x1="9" y1="10" x2="9.01" y2="10"></line><line x1="15" y1="10" x2="15.01" y2="10"></line><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0"></path></svg>
                    </div>
                    <p class="empty-title">
                        <?php echo e(__('main.notices_03')); ?>

                    </p>
                    <div class="empty-action">
                        <a href="<?php echo e(route('login')); ?>" class="btn">
                            <?php echo e(__('Login')); ?>

                        </a>
                        <a href="<?php echo e(__('register')); ?>" class="btn btn-primary">
                            <?php echo e(__('Signup')); ?>

                        </a>
                    </div>
                </div>
            </div>
            <!-- if you have not set gender and birth -->
            <?php elseif(empty(Auth::user()->genders_id) | empty(Auth::user()->birth)): ?>
            <div class="empty">
                <div class="empty-img">
                    <img src="<?php echo e(asset('resources/views/assets/img/warning.svg')); ?>" alt="">
                </div>
                <p class="empty-title"><?php echo e(__('main.notices_01')); ?></p>
                <p class="empty-subtitle text-muted">
                    <?php echo e(__('main.notices_02')); ?>

                </p>
                <div class="empty-action">
                    <a href="<?php echo e(url('settings/edit')); ?>" class="btn btn-red">
                        <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z" /><circle cx="12" cy="12" r="3" /></svg> <?php echo e(__('main.notices_account')); ?>

                    </a>
                </div>
            </div>
            <?php else: ?>
            <!-- write story -->
            <?php if($status_write == 1): ?>
                <form action="<?php echo e(url('write')); ?>" method="post">
                    <?php echo csrf_field(); ?>
                    <div class="modal-body">
                        <div class="mb-3">
                            <input type="text" class="form-control form-control-lg <?php $__errorArgs = ['title', 'write'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="title" value="<?php echo e(old('title')); ?>" placeholder="<?php echo e(__('main.title')); ?>">

                            <?php $__errorArgs = ['title', 'write'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                <span class="invalid-feedback" role="alert">
                                    <strong><?php echo e($message); ?></strong>
                                </span>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>

                        </div>

                        <div class="mb-3">
                            <textarea class="form-control form-control-lg <?php $__errorArgs = ['story', 'write'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="story" rows="6" placeholder="<?php echo e(__('main.story')); ?>"><?php echo e(old('story')); ?></textarea>

                            <?php $__errorArgs = ['story', 'write'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                <span class="invalid-feedback" role="alert">
                                    <strong><?php echo e($message); ?></strong>
                                </span>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>

                        </div>

                        <div class="mb-3">
                            <div class="col">
                                <div class="form-selectgroup form-selectgroup-pills">
                                    <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <label class="form-selectgroup-item">
                                        <input type="radio" id="category_id" name="category_id" value="<?php echo e($category->id); ?>" class="form-selectgroup-input <?php $__errorArgs = ['category_id', 'write'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" <?php echo e(old('category_id') == $category->id ? 'checked' : ''); ?> <?php if(Auth::user()->total_point_count()<$category->score): ?> disabled <?php endif; ?>>
                                        <span class="form-selectgroup-label" <?php if(Auth::user()->total_point_count()<$category->score): ?> data-bs-toggle="tooltip" data-bs-html="true" title="<?php echo e(__('points.form_notice1')); ?>" <?php endif; ?>>
                                            <?php echo e($category->name); ?>

                                        </span>
                                    </label>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    
                                    <?php $__errorArgs = ['category_id', 'write'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                        <span class="invalid-feedback" role="alert">
                                            <strong><?php echo e($message); ?></strong>
                                        </span>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                    
                                </div>
                            </div>
                        </div>

                        <div class="mb-3">
                            <label class="form-label"><?php echo e(__('main.tags')); ?></label>
                            <input type="text" class="form-control <?php $__errorArgs = ['tags'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="tags" placeholder="<?php echo e(__('main.separate_tag')); ?>" value="<?php echo e(old('tags')); ?>">
                        </div>

                    </div>
                    
                    <input type="hidden" name="genders_id" value="<?php echo e(Auth::user()->genders_id); ?>">
                    <input type="hidden" name="age" value="<?php echo e(Carbon::now()->diffInYears(Auth::user()->birth)); ?>">
                    
                    <div class="modal-footer">
                        <button type="submit" class="btn btn-primary">
                            <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><circle cx="12" cy="12" r="9"></circle><line x1="9" y1="12" x2="15" y2="12"></line><line x1="12" y1="9" x2="12" y2="15"></line></svg> <?php echo e(__('main.btn_send')); ?>

                        </button>
                    </div>
                            
            </form>
            <?php else: ?>
            <!-- if new stories are paused -->
            <div class="modal-body">
                <div class="text-center">
                    <img src="<?php echo e(asset('resources/views/assets/img/warning.svg')); ?>" alt="">
                </div>
                <div class="text-center">
                    <div class="empty-header">
                        <?php echo e(__('main.new_entries_paused')); ?>

                    </div>
                </div>
            </div>
            <?php endif; ?>
            <!-- end write story -->          
            <?php endif; ?>
        </div>
    </div>
</div><?php /**PATH C:\Users\Marco\Desktop\xampp\htdocs\anonymous\resources\views/layouts/modal/form_write_story.blade.php ENDPATH**/ ?>