<?php $__env->startSection('content'); ?>
<div class="row mb-4">
    <div class="col-md-12">
        <nav aria-label="breadcrumb">
            <ol class="breadcrumb mb-1">
                <li class="breadcrumb-item"><a href="<?php echo e(route('dashboard')); ?>" class="text-decoration-none text-muted small">Dashboard</a></li>
                <li class="breadcrumb-item"><a href="<?php echo e(route('notices.index')); ?>" class="text-decoration-none text-muted small">Notices</a></li>
                <li class="breadcrumb-item active text-primary small fw-semibold" aria-current="page">Publish</li>
            </ol>
        </nav>
        <h2 class="fw-bold text-dark">Publish New Notice</h2>
        <p class="text-secondary small">Broadcast important updates to your users with attachments.</p>
    </div>
</div>

<div class="row">
    <div class="col-lg-7">
        <div class="card border-0 shadow-lg rounded-4 overflow-hidden">
            <div class="card-header bg-white border-0 py-3 px-4 mt-2">
                <h6 class="m-0 fw-bold text-dark"><i class="bi bi-pencil-square me-2 text-primary"></i> Notice Details</h6>
            </div>
            <div class="card-body p-4 pt-2">
                <form action="<?php echo e(route('notices.store')); ?>" method="POST" enctype="multipart/form-data">
                    <?php echo csrf_field(); ?>
                    <div class="mb-4">
                        <label for="title" class="form-label fw-bold text-dark mb-2">Notice Title</label>
                        <div class="input-group">
                            <span class="input-group-text bg-light border-0"><i class="bi bi-type text-secondary"></i></span>
                            <input type="text" name="title" class="form-control bg-light border-0 <?php $__errorArgs = ['title'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" id="title" placeholder="e.g. Annual Staff Meeting 2026" value="<?php echo e(old('title')); ?>" required style="padding: 0.75rem;">
                        </div>
                        <?php $__errorArgs = ['title'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <div class="invalid-feedback d-block mt-2"><?php echo e($message); ?></div>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>

                    <div class="mb-4">
                        <label for="uploads" class="form-label fw-bold text-dark mb-2">Attachment <span class="text-muted fw-normal">(Optional)</span></label>
                        <div class="upload-container bg-light rounded-4 p-4 text-center border-2 border-dashed border-secondary-subtle">
                            <i class="bi bi-cloud-arrow-up-fill text-primary fs-1 mb-3 d-block"></i>
                            <p class="text-dark fw-semibold mb-1">Click to upload or drag and drop</p>
                            <p class="text-secondary small mb-3">PDF, DOC, JPG, or PNG (Max 2MB)</p>
                            <input type="file" name="uploads" class="form-control <?php $__errorArgs = ['uploads'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" id="uploads">
                        </div>
                        <?php $__errorArgs = ['uploads'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <div class="invalid-feedback d-block mt-2"><?php echo e($message); ?></div>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>

                    <hr class="my-4 opacity-50">

                    <div class="d-flex align-items-center justify-content-between">
                        <a href="<?php echo e(route('notices.index')); ?>" class="btn btn-link text-decoration-none text-secondary fw-semibold">
                            <i class="bi bi-arrow-left me-1"></i> Back to List
                        </a>
                        <div class="d-flex gap-2">
                            <button type="reset" class="btn btn-light rounded-3 px-4 fw-semibold text-secondary">Reset</button>
                            <button type="submit" class="btn btn-primary rounded-3 px-5 fw-bold shadow-sm">
                                <i class="bi bi-send-fill me-2"></i> Publish Notice
                            </button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
    
    <!-- Sidebar/Help info -->
    <div class="col-lg-5">
        <div class="card border-0 bg-primary text-white rounded-4 shadow-lg p-3">
            <div class="card-body">
                <h5 class="fw-bold mb-3">Pro Tips for Notices</h5>
                <div class="d-flex mb-3">
                    <i class="bi bi-lightning-fill me-3 fs-5"></i>
                    <p class="small mb-0">Use clear, concise titles to catch users' attention immediately.</p>
                </div>
                <div class="d-flex mb-3">
                    <i class="bi bi-file-earmark-pdf-fill me-3 fs-5"></i>
                    <p class="small mb-0">Prefer PDF format for documents to ensure they look the same for everyone.</p>
                </div>
                <div class="d-flex">
                    <i class="bi bi-shield-check me-3 fs-5"></i>
                    <p class="small mb-0">Double check files for sensitive information before publishing.</p>
                </div>
            </div>
        </div>
        
        <div class="card border-0 shadow-sm rounded-4 mt-4 p-2 bg-white">
            <div class="card-body d-flex align-items-center">
                <div class="bg-warning-subtle text-warning rounded-circle p-3 me-3">
                    <i class="bi bi-info-circle-fill fs-4"></i>
                </div>
                <div>
                    <h6 class="fw-bold text-dark mb-1">Publishing Policy</h6>
                    <p class="text-secondary small mb-0">Notices are visible to all authenticated staff members instantly.</p>
                </div>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('styles'); ?>
<style>
    .upload-container {
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
    }
    .upload-container:hover {
        background-color: #f1f5f9 !important;
        border-color: #3b82f6 !important;
    }
    .upload-container input[type="file"] {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        cursor: pointer;
    }
    .bg-warning-subtle { background-color: #fffbeb !important; }
    .text-warning { color: #d97706 !important; }
    .border-dashed { border-style: dashed !important; }
    .input-group-text { border: none !important; }
</style>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\laragon\www\portfolio\resources\views\notices\create.blade.php ENDPATH**/ ?>