

<?php $__env->startSection('content'); ?>
    <div class="card">
        <div class="card-header">
            <h5><?php echo e(isset($leadership) ? 'Edit Leadership' : 'Add Leadership'); ?></h5>
        </div>
        <div class="card-body">
            <form action="<?php echo e(isset($leadership) ? route('leadership.update', $leadership->id) : route('leadership.store')); ?>"
                method="POST" enctype="multipart/form-data">
                <?php echo csrf_field(); ?>
                <?php if(isset($leadership)): ?>
                    <?php echo method_field('PUT'); ?>
                <?php endif; ?>

                <div class="mb-3">
                    <label>Name</label>
                    <input type="text" name="name" class="form-control"
                        value="<?php echo e(old('name', $leadership->name ?? '')); ?>" required>
                </div>

                <div class="mb-3">
                    <label>Email</label>
                    <input type="email" name="email" class="form-control"
                        value="<?php echo e(old('email', $leadership->email ?? '')); ?>" required>
                </div>

                <div class="mb-3">
                    <label>Degree</label>
                    <input type="text" name="degree" class="form-control"
                        value="<?php echo e(old('degree', $leadership->degree ?? '')); ?>">
                </div>

                <div class="mb-3">
                    <label>Position</label>
                    <input type="text" name="position" class="form-control"
                        value="<?php echo e(old('position', $leadership->position ?? '')); ?>" required>
                </div>

                <div class="mb-3">
                    <label>Short Description</label>
                    <textarea name="short_description" class="form-control" rows="2"><?php echo e(old('short_description', $leadership->short_description ?? '')); ?></textarea>
                </div>

                <div class="mb-3">
                    <label>Description</label>
                    <textarea name="description" class="form-control" rows="4"><?php echo e(old('description', $leadership->description ?? '')); ?></textarea>
                </div>

                <div class="mb-3">
                    <label>Image</label>
                    <input type="file" name="image" accept="image/*" class="form-control">
                    <?php if(isset($leadership) && $leadership->image): ?>
                        <div class="mt-2">
                            <img src="<?php echo e(asset('public/' . $leadership->image)); ?>" alt="Leadership Image" width="120">
                        </div>
                    <?php endif; ?>
                </div>

                <div class="mb-3 form-check">
                    <input type="checkbox" name="is_ceo" id="is_ceo" class="form-check-input"
                        <?php echo e(old('is_ceo', $leadership->is_ceo ?? false) ? 'checked' : ''); ?>>
                    <label for="is_ceo" class="form-check-label ms-2">Is CEO?</label>
                    <small class="form-text text-muted">Check this if the person is the CEO.</small>
                </div>

                <button class="btn btn-success mt-3"><?php echo e(isset($leadership) ? 'Update' : 'Save'); ?></button>
                <a href="<?php echo e(route('leadership.index')); ?>" class="btn btn-secondary mt-3">Cancel</a>
            </form>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.masterAdmin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\TGP-hospital-site\resources\views/admin/leadership/form.blade.php ENDPATH**/ ?>