<?php $__env->startSection('site_title', formatTitle([__('Announcements'), __('Settings'), config('settings.title')])); ?>

<?php echo $__env->make('shared.breadcrumbs', ['breadcrumbs' => [
    ['url' => route('admin.dashboard'), 'title' => __('Admin')],
    ['title' => __('Settings')],
]], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

<h1 class="h2 mb-3 d-inline-block"><?php echo e(__('Announcements')); ?></h1>

<div class="card border-0 shadow-sm">
    <div class="card-header"><div class="font-weight-medium py-1"><?php echo e(__('Announcements')); ?></div></div>
    <div class="card-body">

        <ul class="nav nav-pills d-flex flex-fill flex-column flex-md-row mb-3" id="pills-tab" role="tablist">
            <li class="nav-item flex-grow-1 text-center">
                <a class="nav-link active" id="pills-guest-tab" data-toggle="pill" href="#pills-guest" role="tab" aria-controls="pills-guest" aria-selected="true"><?php echo e(__('Guest')); ?></a>
            </li>
            <li class="nav-item flex-grow-1 text-center">
                <a class="nav-link" id="pills-user-tab" data-toggle="pill" href="#pills-user" role="tab" aria-controls="pills-user" aria-selected="false"><?php echo e(__('User')); ?></a>
            </li>
        </ul>

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

        <form action="<?php echo e(route('admin.settings', 'announcements')); ?>" method="post" enctype="multipart/form-data">

            <?php echo csrf_field(); ?>

            <div class="tab-content" id="pills-tabContent">
                <div class="tab-pane fade show active" id="pills-guest" role="tabpanel" aria-labelledby="pills-guest-tab">
                    <div class="form-group">
                        <label for="i-announcement-guest"><?php echo e(__('Content')); ?></label>
                        <textarea name="announcement_guest" id="i-announcement-guest" class="form-control<?php echo e($errors->has('announcement_guest') ? ' is-invalid' : ''); ?>"><?php echo e(old('announcement_guest') ?? config('settings.announcement_guest')); ?></textarea>
                        <?php if($errors->has('announcement_guest')): ?>
                            <span class="invalid-feedback d-block" role="alert">
                                <strong><?php echo e($errors->first('announcement_guest')); ?></strong>
                            </span>
                        <?php endif; ?>
                    </div>

                    <div class="form-group">
                        <label for="i-announcement-guest-type"><?php echo e(__('Type')); ?></label>
                        <select name="announcement_guest_type" id="i-announcement-guest-type" class="custom-select<?php echo e($errors->has('announcement_guest_type') ? ' is-invalid' : ''); ?>">
                            <?php $__currentLoopData = ['primary' => __('Primary'), 'secondary' => __('Secondary'), 'success' => __('Success'), 'danger' => __('Danger'), 'warning' => __('Warning'), 'info' => __('Info'), 'secondary' => __('Secondary'), 'light' => __('Light'), 'dark' => __('Dark')]; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option value="<?php echo e($key); ?>" <?php if((old('announcement_guest_type') !== null && old('announcement_guest_type') == $key) || (config('settings.announcement_guest_type') == $key && old('announcement_guest_type') == null)): ?> selected <?php endif; ?>><?php echo e($value); ?></option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                        <?php if($errors->has('announcement_guest_type')): ?>
                            <span class="invalid-feedback d-block" role="alert">
                                <strong><?php echo e($errors->first('announcement_guest_type')); ?></strong>
                            </span>
                        <?php endif; ?>
                    </div>

                    <input type="hidden" name="announcement_guest_id" id="i-announcement-guest-id" class="form-control form-control-sm<?php echo e($errors->has('announcement_guest_id') ? ' is-invalid' : ''); ?>" value="<?php echo e(old('announcement_guest_id') ?? Str::random(16)); ?>">
                </div>

                <div class="tab-pane fade" id="pills-user" role="tabpanel" aria-labelledby="pills-user-tab">
                    <div class="form-group">
                        <label for="i-announcement-user"><?php echo e(__('Content')); ?></label>
                        <textarea name="announcement_user" id="i-announcement-user" class="form-control<?php echo e($errors->has('announcement_user') ? ' is-invalid' : ''); ?>"><?php echo e(old('announcement_user') ?? config('settings.announcement_user')); ?></textarea>
                        <?php if($errors->has('announcement_user')): ?>
                            <span class="invalid-feedback d-block" role="alert">
                                <strong><?php echo e($errors->first('announcement_user')); ?></strong>
                            </span>
                        <?php endif; ?>
                    </div>

                    <div class="form-group">
                        <label for="i-announcement-user-type"><?php echo e(__('Type')); ?></label>
                        <select name="announcement_user_type" id="i-announcement-user-type" class="custom-select<?php echo e($errors->has('announcement_user_type') ? ' is-invalid' : ''); ?>">
                            <?php $__currentLoopData = ['primary' => __('Primary'), 'secondary' => __('Secondary'), 'success' => __('Success'), 'danger' => __('Danger'), 'warning' => __('Warning'), 'info' => __('Info'), 'secondary' => __('Secondary'), 'light' => __('Light'), 'dark' => __('Dark')]; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option value="<?php echo e($key); ?>" <?php if((old('announcement_user_type') !== null && old('announcement_user_type') == $key) || (config('settings.announcement_user_type') == $key && old('announcement_user_type') == null)): ?> selected <?php endif; ?>><?php echo e($value); ?></option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                        <?php if($errors->has('announcement_user_type')): ?>
                            <span class="invalid-feedback d-block" role="alert">
                                <strong><?php echo e($errors->first('announcement_user_type')); ?></strong>
                            </span>
                        <?php endif; ?>
                    </div>

                    <input type="hidden" name="announcement_user_id" id="i-announcement-user-id" class="form-control form-control-sm<?php echo e($errors->has('announcement_user_id') ? ' is-invalid' : ''); ?>" value="<?php echo e(old('announcement_user_id') ?? Str::random(16)); ?>">
                </div>
            </div>

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

    </div>
</div><?php /**PATH /home/mixfitco/domains/webrankmonitor.com/public_html/resources/views/admin/settings/announcements.blade.php ENDPATH**/ ?>