<div class="modal fade" id="smsMessageModal" tabindex="-1" aria-labelledby="smsMessageModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg modal-dialog-centered">
        <div class="modal-content">
            <form id="smsMessageForm" action="<?php echo e(route('admin.sms-messages.store')); ?>" method="POST">
                <?php echo csrf_field(); ?>
                <div class="modal-header">
                    <h5 class="modal-title" id="smsMessageModalLabel">Send SMS</h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <div class="modal-body">
                    <div class="row gx-3 gy-3">
                        <div class="col-md-6">
                            <label class="form-label">Recipients</label>
                            <select name="audience" id="smsAudience" class="form-select" required>
                                <option value="single">One customer / number</option>
                                <option value="zone">All active customers in a zone</option>
                                <option value="due">All active due customers</option>
                            </select>
                        </div>
                        <div class="col-md-6">
                            <label class="form-label">Schedule (optional)</label>
                            <input type="datetime-local" name="scheduled_at" class="form-control">
                        </div>
                        <div class="col-md-6" id="smsRecipientField">
                            <label class="form-label">Recipient Phone</label>
                            <input type="text" name="recipient" class="form-control" placeholder="+8801XXXXXXXXX">
                        </div>
                        <div class="col-md-6 d-none" id="smsZoneField">
                            <label class="form-label">Zone</label>
                            <select name="zone" class="form-select">
                                <option value="">Select zone</option>
                                <?php $__currentLoopData = $zones; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $zone): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($zone); ?>"><?php echo e($zone); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>
                        <div class="col-md-6">
                            <label class="form-label">Gateway</label>
                            <select name="gateway_id" class="form-select">
                                <option value="">Default Gateway</option>
                                <?php $__currentLoopData = $gateways; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $gateway): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($gateway->id); ?>"><?php echo e($gateway->name); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>
                        <div class="col-md-6">
                            <label class="form-label">Saved Template (optional)</label>
                            <select name="template_id" id="smsTemplate" class="form-select">
                                <option value="">Write a custom message</option>
                                <?php $__currentLoopData = $templates; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $template): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><option value="<?php echo e($template->id); ?>" data-body="<?php echo e($template->body); ?>"><?php echo e($template->name); ?></option><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>
                        <div class="col-12">
                            <label class="form-label">Message</label>
                            <textarea name="message" id="smsMessageBody" class="form-control" rows="4" required></textarea>
                            <small class="text-muted">If you choose a template, placeholders will be replaced automatically with each customer's data.</small>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
                    <button type="submit" class="btn btn-primary">Send SMS</button>
                </div>
            </form>
        </div>
    </div>
</div>
<?php /**PATH D:\herd\billing\laravel-app\resources\views/admin/sms-messages/partials/modal.blade.php ENDPATH**/ ?>