

<?php $__env->startSection('page_title', 'Create Announcement'); ?>

<?php $__env->startSection('content'); ?>
    <div class="row">
        <div class="col-lg-12">
            <div class="mb-4">
                <a href="<?php echo e(route('admin.announcements.index')); ?>" class="text-decoration-none text-muted small">
                    <i class="bi bi-arrow-left me-1"></i> Back to announcements
                </a>
            </div>

            <div class="card border-0 shadow-sm">
                <div class="card-header bg-white border-bottom p-4">
                    <h5 class="fw-bold mb-0">Create New Announcement</h5>
                </div>
                <div class="card-body p-4">
                    <form action="<?php echo e(route('admin.announcements.store')); ?>" method="POST">
                        <?php echo csrf_field(); ?>

                        <div class="row mb-4">
                            <div class="col-md-8">
                                <label class="form-label fw-bold small text-uppercase text-muted">Title</label>
                                <input type="text" name="title" class="form-control" placeholder="Announcement title"
                                    required>
                            </div>
                            <div class="col-md-4">
                                <label class="form-label fw-bold small text-uppercase text-muted">Type</label>
                                <select name="type" class="form-select" required>
                                    <option value="general">General</option>
                                    <option value="policy">Policy</option>
                                    <option value="event">Event</option>
                                    <option value="holiday">Holiday</option>
                                </select>
                            </div>
                        </div>

                        <div class="mb-4">
                            <label class="form-label fw-bold small text-uppercase text-muted">Content</label>
                            <textarea name="content" class="form-control" rows="6" placeholder="Write your announcement message here..."
                                required></textarea>
                        </div>

                        <div class="row mb-4">
                            <div class="col-md-6">
                                <label class="form-label fw-bold small text-uppercase text-muted">Expiry Date
                                    (Optional)</label>
                                <input type="date" name="expires_at" class="form-control">
                                <p class="text-muted smaller mt-1">Leave empty to keep it visible indefinitely.</p>
                            </div>
                            <div class="col-md-6 pt-4">
                                <div class="form-check form-switch card p-3 border-0 bg-light">
                                    <input class="form-check-input ms-0 me-3" type="checkbox" name="is_active"
                                        id="isActive" checked>
                                    <label class="form-check-label fw-bold small text-uppercase" for="isActive">Publicly
                                        Active</label>
                                </div>
                            </div>
                        </div>

                        <div class="d-flex justify-content-end gap-2 border-top pt-4">
                            <a href="<?php echo e(route('admin.announcements.index')); ?>" class="btn btn-light px-4">Cancel</a>
                            <button type="submit" class="btn btn-primary px-4">Publish Announcement</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH G:\wamp64\www\projects\attendance\resources\views/admin/announcements/create.blade.php ENDPATH**/ ?>