


<?php $__env->startSection('content'); ?>

<?php if(session('notification_create_msg')): ?>
<div class="alert alert-success">
    <?php echo e(session('notification_create_msg')); ?>

</div>
<?php endif; ?>


<?php if(session('notification_delete_msg')): ?>
<div class="alert alert-danger">
    <?php echo e(session('notification_delete_msg')); ?>

</div>
<?php endif; ?>

<h2 class="mb-3"><?php echo e(awtTrans('New Notification')); ?></h2>

<?php echo Form::open(['method' => 'POST', 'route' => 'admin.notifications.store', 'files' => true , 'id' => 'form-notification']); ?>

<div class="row">
    <div class="col-md-12">

        <div class="row">
            <div class="form-group  col-md-12">
                <label for="user_ids">اختر المستخدمين</label>
                <div class="form-group">
                    <select name="type" id="type" class="form-control select2" required>
                        <option value="">اختر المستخدمين</option>
                        <option value="all_users">كل المستخدمين</option>
                        <option value="users" data-content='
                <div class=" col-md-12">
                    <div class="form-group">
                        <select name="user_ids[]" id="user_ids" class="form-control select2" required multiple>
                            <?php $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($user->id); ?>"><?php echo e($user->name); ?></option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                    </div>
                </div>'>المستخدمين
                        </option>
                    </select>
                </div>
            </div>
        </div>

        <div class="col-lg-12 row" id="append-content"></div>


        <div class="row">
            <div class="form-group col-md-6">
                <?php echo Form::label('title_ar', awtTrans('Title Arabic')); ?>

                <?php echo Form::text('title_ar', null, ['class' => $errors->has('title_ar') ? 'form-control is-invalid' : 'form-control' , 'required' => 'required']); ?>

                <small class="text-danger"><?php echo e($errors->first('title_ar')); ?></small>
            </div>

            <div class="form-group col-md-6">
                <?php echo Form::label('title_en', awtTrans('Title Arabic')); ?>

                <?php echo Form::text('title_en', null, ['class' => $errors->has('title_en') ? 'form-control is-invalid' : 'form-control' , 'required' => 'required']); ?>

                <small class="text-danger"><?php echo e($errors->first('title_en')); ?></small>
            </div>
        </div>


        <div class="row">

            <div class="form-group col-lg-6">
                <?php echo Form::label('message_ar', awtTrans('Description Arabic')); ?>

                <?php echo Form::textarea('message_ar', null, [ 'class' => 'form-control tinyEditor' , 'required' => 'required']); ?>

                <small class="text-danger"><?php echo e($errors->first('message_ar')); ?></small>
            </div>

            <div class="form-group col-lg-6">
                <?php echo Form::label('message_en', awtTrans('Description English')); ?>

                <?php echo Form::textarea('message_en', null, [ 'class' => 'form-control tinyEditor' , 'required' => 'required']); ?>

                <small class="text-danger"><?php echo e($errors->first('message_en')); ?></small>
            </div>

        </div>


        <div class="row">

            <div class="form-group col-lg-12">
                <?php echo Form::label('photo', awtTrans('الصورة')); ?>

                <div class="input-group">
                    <span class="input-group-btn">
                        <a id="lfm" data-input="photo" data-preview="holder" class="btn btn-secondary text-white px-4" style="border-top-right-radius: 0;border-bottom-right-radius: 0;border-top-left-radius: 0;border-bottom-left-radius: 0;">
                            <i class="fa fa-picture-o"></i> <?php echo e(awtTrans('اختر الصورة')); ?>

                        </a>
                    </span>
                    <?php echo Form::text('photo', null, ['class' => $errors->has('photo') ? 'form-control is-invalid' : 'form-control' , 'readonly' => 'readonly']); ?>

                </div>
                <div class="mb-3 mt-3 d-block slider-holder" id="holder">
                    <img width="100" src="http://127.0.0.1:8000/storage/1/th.jpeg" alt="">
                </div>
                <small class="text-danger"><?php echo e($errors->first('photo')); ?></small>
            </div>
        </div>

    </div>
</div>


<?php echo Form::submit(awtTrans('Send Notification'), ['class' => 'btn btn-success']); ?>

<a href="<?php echo e(route('admin.notifications.index')); ?>" class="btn btn-primary"><i class="fas fa-arrow-left  fa-sm  "></i> <?php echo e(awtTrans('Back')); ?></a>
<?php echo Form::close(); ?>


<?php $__env->stopSection(); ?>
<?php $__env->startSection('scripts'); ?>
<script src="<?php echo e(url('dashboard')); ?>/forms/notifications/create.js"></script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\jaadara\Projects from 10-2022\Laravel-portfolio-website\resources\views/admin/notifications/create.blade.php ENDPATH**/ ?>