<form wire:submit.prevent="create">
    <div class="mb-3">
        <label for="name" class="form-label">Subject Name <span class="text-danger">*</span></label>
        <input type="text" wire:model="name" class="form-control <?php $__errorArgs = ['name'];
$__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="name" placeholder="Enter subject name">
        <!--[if BLOCK]><![endif]--><?php $__errorArgs = ['name'];
$__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"><?php echo e($message); ?></div>
        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><!--[if ENDBLOCK]><![endif]-->
    </div>
    
    <div class="d-flex justify-content-end gap-2">
        <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
        <button type="submit" class="btn btn-primary">
            <i class="fas fa-plus me-2"></i>Create Subject
        </button>
    </div>
</form>

<script>
document.addEventListener('livewire:init', function () {
    Livewire.on('close-modal', function () {
        const modal = bootstrap.Modal.getInstance(document.getElementById('createSubjectModal'));
        if (modal) {
            modal.hide();
        }
    });
    
    Livewire.on('subjectCreated', function () {
        Livewire.dispatch('$refresh');
    });
});
</script><?php /**PATH C:\wamp64\www\edu-p\resources\views/livewire/create-subject-form.blade.php ENDPATH**/ ?>