<div style="display:grid; gap:16px;">
    <div class="form-group">
        <label class="form-label" for="audience_type">Send To</label>
        <select class="input" id="audience_type" name="audience_type" required>
            <?php $__currentLoopData = $audienceTypes ?? \App\Services\Comms\MessageService::AUDIENCE_TYPES; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $type): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <option value="<?php echo e($type); ?>" <?php if(old('audience_type', 'individual') === $type): echo 'selected'; endif; ?>><?php echo e(str_replace('_', ' ', ucfirst($type))); ?></option>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </select>
    </div>
    <div class="form-group">
        <label class="form-label" for="audience_targets">Targets</label>
        <input class="input" type="text" id="audience_targets" name="audience_targets" value="<?php echo e(old('audience_targets')); ?>" placeholder="User IDs, role names, department names, or class IDs (comma-separated)">
        <small style="color:var(--text2);">Examples: <code>Teacher,Parent</code> for roles · <code>Academic,Finance</code> for departments · <code>1,2</code> for class IDs · user IDs for individuals</small>
    </div>
    <div class="form-group">
        <label class="form-label" for="subject">Subject</label>
        <input class="input" type="text" id="subject" name="subject" value="<?php echo e(old('subject', $message?->subject ?? '')); ?>">
    </div>
    <div class="form-group">
        <label class="form-label" for="priority">Priority</label>
        <select class="input" id="priority" name="priority">
            <?php $__currentLoopData = ['normal', 'high', 'urgent']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $priority): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <option value="<?php echo e($priority); ?>" <?php if(old('priority', $message?->priority ?? 'normal') === $priority): echo 'selected'; endif; ?>><?php echo e(ucfirst($priority)); ?></option>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </select>
    </div>
    <div class="form-group">
        <label class="form-label" for="body">Message</label>
        <textarea class="input" id="body" name="body" rows="6" required><?php echo e(old('body', $message?->body ?? '')); ?></textarea>
    </div>
</div>
<?php /**PATH C:\laragon\www\southend\resources\views\messages\_audience-form.blade.php ENDPATH**/ ?>