<?php $__env->startSection('title', translate('FCM Settings')); ?>

<?php $__env->startSection('content'); ?>
    <div class="content container-fluid">

        <div class="d-flex flex-wrap gap-2 align-items-center mb-4">
            <h2 class="h1 mb-0 d-flex align-items-center">
                <img width="20" class="avatar-img" src="<?php echo e(asset('public/assets/admin/img/firebase.png')); ?>" alt="">
                <span class="page-header-title ml-2 mt-2">
                    <?php echo e(translate('firebase_push_notification_setup')); ?>

                </span>
            </h2>
        </div>

        <div class="card">
            <div class="card-header-shadow pb-0">
                <div class="d-flex flex-wrap justify-content-between w-100 row-gap-1">
                    <ul class="nav nav-tabs nav--tabs border-0 ml-3">
                        <li class="nav-item mr-2 mr-md-4">
                            <a href="<?php echo e(route('admin.business-settings.web-app.third-party.fcm-index')); ?>" class="nav-link pb-2 px-0 pb-sm-3" data-slide="1">
                                <img src="<?php echo e(asset('/public/assets/admin/img/notify.png')); ?>" alt="">
                                <span><?php echo e(translate('Push Notification')); ?></span>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a href="<?php echo e(route('admin.business-settings.web-app.third-party.fcm-config')); ?>" class="nav-link pb-2 px-0 pb-sm-3 active" data-slide="2">
                                <img src="<?php echo e(asset('/public/assets/admin/img/firebase2.png')); ?>" alt="">
                                <span><?php echo e(translate('Firebase Configuration')); ?></span>
                            </a>
                        </li>
                    </ul>
                    
                </div>
            </div>
            <div class="card-body">
                <div class="card-body">
                    <form action="<?php echo e(env('APP_MODE')!='demo'?route('admin.business-settings.web-app.third-party.update-fcm'):'javascript:'); ?>" method="post"
                          enctype="multipart/form-data">
                        <?php echo csrf_field(); ?>
                        <?php ($key=\App\Model\BusinessSetting::where('key','push_notification_key')->first()->value); ?>
                        <div class="form-group">
                            <label class="input-label"><?php echo e(translate('server key')); ?></label>
                            <textarea name="push_notification_key" class="form-control"
                                      required><?php echo e(env('APP_MODE')!='demo'?$key:''); ?></textarea>
                        </div>

                        <div class="row d-none">
                            <?php ($projectId=\App\Model\BusinessSetting::where('key','fcm_project_id')->first()->value); ?>
                            <div class="col-md-12 col-12">
                                <div class="form-group">
                                    <label class="input-label" for="exampleFormControlInput1"><?php echo e(translate('FCM Project ID')); ?></label>
                                    <input type="text" value="<?php echo e($projectId); ?>"
                                           name="fcm_project_id" class="form-control">
                                </div>
                            </div>
                        </div>
                        <div class="d-flex justify-content-end">
                            <button type="<?php echo e(env('APP_MODE')!='demo'?'submit':'button'); ?>"
                                    class="btn btn--primary call-demo"><?php echo e(translate('submit')); ?>

                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>

        <div class="modal fade" id="firebase-modal">
            <div class="modal-dialog status-warning-modal">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal">
                            <span aria-hidden="true" class="tio-clear"></span>
                        </button>
                    </div>
                    <div class="modal-body pb-5 pt-0">
                        <div class="max-349 mx-auto mb-20">
                            <div class="text-center">
                                <img src="<?php echo e(asset('/public/assets/admin/img/firebase/slide-4.png')); ?>" alt="" class="mb-3">
                                <h5 class="modal-title mb-2"><?php echo e(translate('Please_Visit_the_Docs_to_Set_FCM_on_Mobile_Apps')); ?></h5>
                            </div>
                            <div class="text-center">
                                <p>
                                    <?php echo e(translate('Please_check_the_documentation_below_for_detailed_instructions_on_setting_up_your_mobile_app_to_receive_Firebase_Cloud_Messaging_(FCM)_notifications.')); ?>

                                </p>
                                <a href="https://docs.6amtech.com/docs-grofresh/mobile-apps/mandatory-setup#setup-firebase-for-push-notification" target="_blank" ><?php echo e(translate('Click Here')); ?></a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startPush('script_2'); ?>
    <script>
        $('[data-slide]').on('click', function(){
            let serial = $(this).data('slide')
            $(`.tab--content .item`).removeClass('show')
            $(`.tab--content .item:nth-child(${serial})`).addClass('show')
        })
    </script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('layouts.admin.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/mimeld/admin.mxepto.mimeld.com/resources/views/admin-views/business-settings/fcm-config.blade.php ENDPATH**/ ?>