<!-- address group -->
<section id="sect-address" class="border p-3  <?php echo (!empty($default)&& $default=='open')?'':'d-none'; ?>">
	<div class="row title-row" data-toggle="collapse" href="#collapseAddress" role="button" aria-expanded="false">
		<div class="col-12">
			<h3 id="sect-address-header">Address</h3>
		</div>
	</div>

	<div id="collapseAddress">
		<div class="row">
			<div class="col">
				<label><b>Type</b></label>
				<div class="input-group mb-3">
					<select class="form-control" name="address_type">
						<?php foreach ($residenceType as $key => $type): ?>
							<option value="<?php echo $type->id; ?>"><?php echo $type->type; ?></option>
						<?php endforeach ?>	
					</select>
				  <div class="input-group-append">
				    <button class="btn btn-warning btn-sm" type="button" data-toggle="modal" data-target="#addressType"><i class="fas fa-plus"></i></button>
				  </div>
				</div>
			</div>
		</div>

		<div class="row">
			<div class="col">
				<label><b>Address</b></label>
				<input class="form-control" rows="5" name="address_place" autocomplete="off">
			</div>
		</div>

		<div class="row">
			<div class="col-12 col-lg-6">
				<label><b>Postcode</b></label>
				<input type="text" class="form-control" name="address_postcode" autocomplete="off">
			</div>
			<div class="col-12 col-lg-6">
				<label><b>City</b></label>	
				<input type="text" class="form-control" autocomplete="off" name="address_city">
			</div>
		</div>

		<div class="row">
			<div class="col-12 col-lg-6">
				<label><b>State</b></label>
				<select class="select form-control" name="address_state">
					<?php if($states) foreach ($states as $key => $state): ?>
	                	<option value="<?php echo $state->id; ?>"><?php echo $state->state; ?></option>
	                <?php endforeach ?>
				</select>
			</div>
			<div class="col-12 col-lg-6">
				<label><b>Country</b></label>
				<select class="select form-control" name="address_country">
					<?php foreach ($countries as $key => $country): ?>
						<option value="<?php echo $country->id; ?>"><?php echo $country->country; ?></option>
					<?php endforeach ?>
				</select>
			</div>
		</div>

		<div class="row">
			<div class="col-12">
				<label><b>Contact Number</b></label>
				<div class="input-group mb-3">
				  <div class="input-group-prepend">
				    <select class="form-control" name="address_contact_header">
				    	<option>+60</option>
				    	<option>+65</option>
				    </select>
				  </div>
				  <input type="text" class="form-control" name="address_contact_number">
				</div>
			</div>
		</div>
		
		<div class="row">
			<div class="col-12 col-lg-2 mb-3 ml-auto">
				<button type="button" class="btn btn-primary btn-block" onclick="addAddress()" data-tooltip="tooltip" title="" data-original-title="Add new address to this form"><i class="fas fa-plus"></i></button>
			</div>
		</div>
		
		<div class="row">
			<div class="col">
				<div class="table-responsive">
					<table class="table table-bordered" id="tbl-address">
						<thead>
							<tr>
								<th>Detail</th>
								<th>Action</th>
							</tr>
						
						</thead>
						<tbody>
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</div>

</section>
<!-- address group -->