{{ include('common/header.twig') }}
<div class="page-title">
	<div class="row align-items-center">
		<div class="col-sm-12">
			<h2 class="page-title-text d-inline-block">{{ page_title }}</h2>
			<div class="breadcrumbs d-inline-block">
				<ul>
					<li><a href="#">Home</a></li>
					<li><a href="{{ common.info.url_route }}customers">Customers</a></li>
					<li>{{ page_title }}</li>
				</ul>
			</div>
		</div>
	</div>
</div>

<form action="{{ action }}" method="post">
	<input type="hidden" name="_token" value="{{ token }}">
	<input type="hidden" name="customer[id]" value="{{ result.id }}">
	<div class="panel panel-default">
		<div class="panel-body">
			<div class="row">
				<div class="col-md-3">
					<div class="form-group">
						<label>First Name <span class="form-required">*</span></label>
						<div class="input-group">
							<div class="input-group-prepend">
								<span class="input-group-text"><i class="las la-user"></i></span>
							</div>
							<input type="text" name="customer[firstname]" class="form-control" value="{{ result.firstname }}" placeholder="Enter First Name . . . ">
						</div>
					</div>
				</div>
				<div class="col-md-3">
					<div class="form-group">
						<label>Last Name <span class="form-required">*</span></label>
						<div class="input-group">
							<div class="input-group-prepend">
								<span class="input-group-text"><i class="las la-user"></i></span>
							</div>
							<input type="text" name="customer[lastname]" class="form-control" value="{{ result.lastname }}" placeholder="Enter Last Name . . . ">
						</div>
					</div>
				</div>
				<div class="col-md-6">
					<div class="form-group">
						<label>Email Address <span class="form-required">*</span></label>
						<div class="input-group">
							<div class="input-group-prepend">
								<span class="input-group-text"><i class="las la-envelope"></i></span>
							</div>
							<input type="email" name="customer[mail]" class="form-control" value="{{ result.email }}" placeholder="Enter Email Address . . . ">
						</div>
					</div>
				</div>
				<div class="col-md-6">
					<div class="form-group">
						<label>Mobile Number <span class="form-required">*</span></label>
						<div class="input-group">
							<div class="input-group-prepend">
								<span class="input-group-text"><i class="las la-mobile"></i></span>
							</div>
							<input type="text" name="customer[mobile]" class="form-control" value="{{ result.mobile }}" placeholder="Enter Mobile Number . . . ">
						</div>
					</div>
				</div>
				<div class="col-md-6">
					<div class="form-group">
						<label>Date of Birth</label>
						<div class="input-group">
							<div class="input-group-prepend">
								<span class="input-group-text"><i class="las la-calendar"></i></span>
							</div>
							<input type="text" id="user-dob" name="customer[dob]" class="form-control bg-white" value="{% if result.dob %}{{ result.dob|date(common.info.date_format) }}{% endif %}" placeholder="Enter Date of Birth . . . " readonly autocomplete="off">
						</div>
					</div>
				</div>
				<div class="col-md-6">
					<div class="form-group">
						<label>Blood Group</label>
						<div class="input-group">
							<div class="input-group-prepend">
								<span class="input-group-text"><i class="las la-heartbeat"></i></span>
							</div>
							<select name="customer[bloodgroup]" class="custom-select">
								<option value="A+" {{ result.bloodgroup == 'A+' ? 'selected' : '' }}>A+</option>
								<option value="A-" {{ result.bloodgroup == 'A-' ? 'selected' : '' }}>A-</option>
								<option value="B+" {{ result.bloodgroup == 'B+' ? 'selected' : '' }}>B+</option>
								<option value="B-" {{ result.bloodgroup == 'B-' ? 'selected' : '' }}>B-</option>
								<option value="O+" {{ result.bloodgroup == 'O+' ? 'selected' : '' }}>O+</option>
								<option value="O-" {{ result.bloodgroup == 'O-' ? 'selected' : '' }}>O-</option>
								<option value="AB+" {{ result.bloodgroup == 'AB+' ? 'selected' : '' }}>AB+</option>
								<option value="AB-" {{ result.bloodgroup == 'AB-' ? 'selected' : '' }}>AB-</option>
							</select>
						</div>
					</div>
				</div>
				<div class="col-md-6">
					<div class="form-group">
						<label>Gender</label>
						<div class="input-group">
							<div class="input-group-prepend"><span class="input-group-text"><i class="las la-genderless"></i></span></div>
							<select name="customer[gender]" class="custom-select">
								<option value="Male" {{ result.gender == 'Male' ? 'selected' : '' }}>Male</option>
								<option value="Female" {{ result.gender == 'Female' ? 'selected' : '' }}>Female</option>
								<option value="Other" {{ result.gender == 'Other' ? 'selected' : '' }}>Other</option>
							</select>
						</div>
					</div>
				</div>
				{% if result.id %}
					<div class="col-md-6">
						<div class="form-group">
							<label>Status</label>
							<div class="input-group">
								<div class="input-group-prepend"><span class="input-group-text"><i class="las la-check-square"></i></span></div>
								<select name="customer[status]" class="custom-select">
									<option value="1" {{ result.status == '1' ? 'selected' : '' }}>Active</option>
									<option value="0" {{ result.status == '0' ? 'selected' : '' }}>InActive</option>
								</select>
							</div>
						</div>
					</div>
				{% endif %}
			</div>
			<div class="dotted-seprator mt-3 mb-4"></div>
			<div class="row">
				<div class="col-md-3">
					<div class="form-group">
						<label>Address Line 1</label>
						<div class="input-group">
							<div class="input-group-prepend">
								<span class="input-group-text"><i class="las la-map-pin"></i></span>
							</div>
							<input type="text" name="customer[address][address1]" class="form-control" value="{{ result.address.address1 }}" placeholder="Enter Address Line 1 . . .">
						</div>
					</div>
				</div>
				<div class="col-md-3">
					<div class="form-group">
						<label>Address Line 2</label>
						<div class="input-group">
							<div class="input-group-prepend">
								<span class="input-group-text"><i class="las la-map-pin"></i></span>
							</div>
							<input type="text" name="customer[address][address2]" class="form-control" value="{{ result.address.address2 }}" placeholder="Enter Address Line 2 . . .">
						</div>
					</div>
				</div>
				<div class="col-md-6">
					<div class="form-group">
						<label>City</label>
						<div class="input-group">
							<div class="input-group-prepend">
								<span class="input-group-text"><i class="las la-map-signs"></i></span>
							</div>
							<input type="text" name="customer[address][city]" class="form-control" value="{{ result.address.city }}" placeholder="Enter City . . .">
						</div>
					</div>
				</div>
				<div class="col-md-6">
					<div class="form-group">
						<label>Country</label>
						<div class="input-group">
							<div class="input-group-prepend">
								<span class="input-group-text"><i class="las la-map-marker"></i></span>
							</div>
							<input type="text" name="customer[address][country]" class="form-control" value="{{ result.address.country }}" placeholder="Enter Country . . .">
						</div>
					</div>
				</div>
				<div class="col-md-6">
					<div class="form-group">
						<label>Postal/Zip Code</label>
						<div class="input-group">
							<div class="input-group-prepend">
								<span class="input-group-text"><i class="las la-map"></i></span>
							</div>
							<input type="text" name="customer[address][postal]" class="form-control" value="{{ result.address.postal }}" placeholder="Enter Postal/Zip Code . . .">
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="panel-footer text-center">
			<button type="submit" name="submit" class="btn btn-primary"><i class="ti-save-alt pr-2"></i> Save</button>
		</div>
	</div>
</form>
<!-- Footer -->
{{ include('common/footer.twig') }}