<?php $__env->startSection('content'); ?>
<div class="container mt-3" style="max-width:100%;min-height:100%;">
    <div class="table-wrapper ">
        <div class="table-title">
            <div class="row mb-3">
                <div class="col d-flex justify-content-center">
                    <h2>Whatsapp <b>Mensagens</b></h2>
                </div>
            </div>

            <?php if($errors->any()): ?>
                <div class="alert alert-danger">
                    <ul>
                        <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <li><?php echo e($error); ?></li>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </ul>
                </div>
            <?php endif; ?>

            <?php if(session()->has('success')): ?>
                <div class="alert alert-success">
                    <ul>
                        <li><?php echo e(session('success')); ?></li>
                    </ul>
                </div>
            <?php endif; ?>
        </div>
    </div>

    <div class="row">
        <div class="col-md-12">
            <h4>Varíaveis</h4>
        </div>

        <span>{id}: Código da compra</span> <br>
        <span>{nome}: Nome do cliente</span> <br>
        <span>{valor}: Valor por cota</span> <br>
        <span>{total}: Total da compra</span> <br>
        <span>{cotas}: Cotas da compra</span> <br>
        <span>{sorteio}: Título do sorteio</span> <br>
        <span>{link}: Link de pagamento</span> <br>
    </div>

    <form action="<?php echo e(route('wpp.salvar')); ?>" method="POST">
        <?php echo csrf_field(); ?>
        <div class="row">
            <?php $__currentLoopData = $msgs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $msg): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <hr>
                <input type="hidden" name="id[<?php echo e($msg->id); ?>]" value="<?php echo e($msg->id); ?>">
                <div class="col-md-12 mt-2">
                    <label>Título</label>
                    <input type="text" name="titulo[<?php echo e($msg->id); ?>]" class="form-control" value="<?php echo e($msg->titulo); ?>">
                </div>
                <div class="col-md-12 mt-2 mb-2">
                    <label>Mensagem</label>
                    <textarea name="msg[<?php echo e($msg->id); ?>]" rows="10" class="form-control" style="resize: none"><?php echo e($msg->clearBreak()); ?></textarea>
                </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </div>

        <button type="submit" class="btn btn-sm btn-success mt-2 mb-4 float-right">Salvar</button>
    </form>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home4/somaut60/app-sitederifa/resources/views/wpp-msgs/index.blade.php ENDPATH**/ ?>