
<?php $__env->startSection('content'); ?>
<!-- Include SweetAlert2 JS -->
<style>
	.text-danger {
		color: red;
		margin-top: 0.25rem;
		font-size: 0.875rem;
	}
</style>
<div class="app-title">
	<div>
		<h1>
			<i class="fa-regular fa-plus mx-1"></i> Add New Church
		</h1>
	</div>
</div>

<section class="acc-form">
	<div class="container">
		<div class="row justify-content-center">
			<div class="col-lg-8 col-sm-12 col-xs-12 col-md-8">
				<div class="tile">
					<div class="tile-body">


						<!-- form start from here -->
						<form class="emp-master-form" action="<?php echo e(route('admin.store_church')); ?>" method="POST" enctype="multipart/form-data">
							<?php echo csrf_field(); ?>
							<div class="row">
								<div class="col-lg-12 col-sm-12 col-md-12 col-xs-12 mt-2 mb-2">
									<div class="form-group">
										<label class="form-head mb-1" for="name">Church Name:</label>
										<input type="text" class="form-control" name="church_name" id="church_name" placeholder="Enter Church Name" value="<?php echo e(old('church_name')); ?>">
									</div>
									<?php $__errorArgs = ['church_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
									<div class="text-danger mt-1"><?php echo e($message); ?></div>
									<?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>

								</div>


								<div class="col-lg-12 col-sm-12 col-md-12 col-xs-12 mt-2 mb-2">
									<div class="form-group">
										<label class="form-head mb-1" for="denomination">Denomination:</label>
										<select name="denomination" id="options" class="form-control">
											<option value="" disabled <?php echo e(old('denomination') ? '' : 'selected'); ?>>Select Denomination</option>
											<option value="Baptist" <?php echo e(old('denomination') == 'Baptist' ? 'selected' : ''); ?>>Baptist</option>
											<option value="AG" <?php echo e(old('denomination') == 'AG' ? 'selected' : ''); ?>>AG</option>
										</select>
									</div>
									<?php $__errorArgs = ['denomination'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
									<div class="text-danger mt-1"><?php echo e($message); ?></div>
									<?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
								</div>

								<div class="col-lg-12 col-sm-12 col-md-12 col-xs-12 mt-2 mb-2">
									<div class="form-group">
										<label class="form-head mb-1" for="city">City /District:</label>
										<input type="text" class="form-control" name="city" id="city" value="<?php echo e(old('city')); ?>" placeholder="Enter city">
									</div>
									<?php $__errorArgs = ['city'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
									<div class="text-danger mt-1"><?php echo e($message); ?></div>
									<?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
								</div>


								<div class="col-lg-12 col-sm-12 col-md-12 col-xs-12 mt-2 mb-2">
									<div class="form-group">
										<label class="form-head mb-1" for="email">State :</label>
										<input type="text" class="form-control" name="state" id="state" value="<?php echo e(old('state')); ?>" placeholder="Enter state">
									</div>
									<?php $__errorArgs = ['state'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
									<div class="text-danger mt-1"><?php echo e($message); ?></div>
									<?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
								</div>

								<div class="col-lg-12 col-sm-12 col-md-12 col-xs-12 mt-2 mb-2">
									<div class="form-group">
										<label class="form-head mb-1" for="church_logo">Church Logo:</label>
										<input type="file" class="form-control" name="church_logo" id="church_logo" accept="image/*">
									</div>
									<?php $__errorArgs = ['church_logo'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
									<div class="text-danger mt-1"><?php echo e($message); ?></div>
									<?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
								</div>

						</form>

						<div class="col-md-12 col-lg-12 col-sm-12 col-xs-12 mt-4 mb-2">
							<div class="form-group text-center">
								<button class="btn submit-btn w-100" type="submit">
									<i class="fa-sharp fa-light fa-paper-plane mx-2"></i> Add Church </button>
							</div>
						</div>
					</div>
					</form>
					<!-- fom end here -->
				</div>
			</div>
		</div>
	</div>
	</div>
</section>

<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>

<?php if(session('success')): ?>
<script>
	Swal.fire({
		icon: 'success',
		title: 'Success!',
		text: "<?php echo e(session('success')); ?>",
		confirmButtonText: 'OK'
	}).then((result) => {
		if (result.isConfirmed) {
			window.location.href = "<?php echo e(route('admin.church')); ?>";
		}
	});
</script>
<?php endif; ?>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp2\htdocs\churchappadmin\resources\views/admin/add_church.blade.php ENDPATH**/ ?>