<?php $__env->startSection('location'); ?>
	<input id="latTest" type="hidden" value="<?php echo Session::get('location')['lat']; ?>" />
    <input id="longTest" type="hidden" value="<?php echo Session::get('location')['lng']; ?>" />
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>

	<section id="search-header-container" class="center clearfix">
		<header id="search-header" class="clearfix">
			<?php if($search_page): ?>
				<?php echo $__env->make('textsearch', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
			<?php else: ?>
				<?php echo $__env->make('results-title', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
			<?php endif; ?>
		</header>
		<a href="#" id="mobile-filters-link" class="show-on-phone">Filters</a>
	</section>

	<section id="search-content-container" class="clearfix" >
		<div id="search-content" class="<?php if('map' != $view_type): ?> center <?php endif; ?>"> <!-- <?php if(isset($searchContentClasses)): ?> <?php echo $searchContentClasses; ?> <?php endif; ?> -->
			<?php if('map' == $view_type): ?>
				<div class="spinner-container spinner-map">
					<p class="spinner gte-ie10">Updating Results</p>
					<img src="/public/images/spinner.gif" class="spinner lt-ie10" />
				</div>
				<div class="no-results no-results-map">
					<h2 class="no-results-header">No Results Found</h2>
					<p class="no-results-description">Try increasing your search radius, or edit your search to try again.</p>
				</div>
				<div id="map-canvas"></div>
			<?php else: ?>
				<div id="search-results-container">
					<div class="show-on-mobile">
						<?php echo $__env->make('pagination', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
					</div>
					<div id="search-results-append">
						<div class="spinner-container">
							<p class="spinner gte-ie10">Updating Results</p>
							<img src="/public/images/spinner.gif" class="spinner lt-ie10" />
						</div>
						<div class="no-results no-results-list">
							<h2 class="no-results-header">No Results Found</h2>
							<p class="no-results-description">Try increasing your search radius, or edit your search to try again.</p>
						</div>
					</div>
					<div class="show-on-mobile">
						<?php echo $__env->make('pagination', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
						<p class="list-verification-message">*Please verify if your provider will be able to schedule your delivery at a Lovelace facility</p>
					</div>
				</div>
			<?php endif; ?>
			<aside id="search-options-container" class="hide-on-phone">
				<header id="search-options-header" class="show-on-phone">
					<a href="#" id="cancel-search-options">Cancel</a>
					<p>Filters</p>
					<a href="#" id="apply-search-options">Apply</a>
				</header>
				<div id="search-options">
					<?php if( (empty($_ENV['DISABLE_MAP_VIEW']) || !$_ENV['DISABLE_MAP_VIEW']) ): ?>
					<div class="form-block hide-on-mobile">
						<h3>View As</h3>
						<div id="toggle-switch" class="clearfix">
							<label id="toggle-list" <?php if( $view_type != 'map' ): ?>class="active"<?php endif; ?>><span class="icon icon-list-lines"></span>List</label>
							<div id="toggle">
								<span <?php if( $view_type == 'map' ): ?>style="left: 40px;"<?php endif; ?>></span>
							</div>
							<label id="toggle-map" <?php if( $view_type == 'map' ): ?>class="active"<?php endif; ?>><span class="icon icon-pin"></span>Map</label>
						</div>
					</div>
					<?php endif; ?>
					<?php if('list' == $view_type): ?>
					<div class="form-block">
						<h3>Sort By</h3>
						<form name="location-sort-form" id="location-sort-form" class="clearfix custom-dropdown">
							<div id="location-sort" class="clearfix custom-dropdown-selected">
								<label><?php if('distance' == $order): ?>Location (Nearest) <?php elseif('name' == $order): ?>Name <?php endif; ?></label>
								<input id="show-location" type="button" class="icon" value="e" />
							</div>
							<div class="menu">
								<ul class="primary">
									<li>
										<a href="#" <?php if('distance' == $order): ?>class="active"<?php endif; ?> data-value="distance">Location (Nearest)</a>
									</li>
									<li>
										<a href="#" <?php if('name' == $order): ?>class="active"<?php endif; ?> data-value="name">Name</a>
									</li>
								</ul>
							</div>
						</form>
					</div>
					<?php endif; ?>
					<div class="form-block">
						<h3>City/Zip Code</h3>
						<div id="location-error-message"><div class="error-dot"></div>Cannot find location. Please try again.</div>
						<div class="text-container">
							<form method="post" action="/location/update" id="search-form-form">
								<div>
									<input type="text" name="search-city-zip" id="search-city-zip" class="required" placeholder="City or Zip Code" value="<?php echo Session::get('location')['search']; ?>" autocomplete="off">
									<input type="hidden" name="zip" id="zip">
									<input type="hidden" name="lat" id="lat">
									<input type="hidden" name="lng" id="lng">
									<button id="search-button" type="submit" class="icon"><span class="icon icon-pin"></span></button>
								</div>
							</form>
						</div>
					</div>
					<div class="form-block clearfix">
						<h3>Select Search Radius</h3>
						<div id="slider-container">
							<div id="slider"></div>
							<span id="slider-amount"></span>
						</div>
						<input type="hidden" id="radius-default" name="radius-default" value="<?php echo $distance; ?>" />
					</div>
					<div class="form-block">
						<div class="clearfix search-filter-header">
							<h3>Filter by Perks</h3> <a class="clear-search-filters" href="#">Clear</a>
						</div>
						<ul id="search-filters">
							<li>
								<label>
									<span class="checkbox-container <?php if(strpos($perks, 'Hospital Room Services') !== false): ?>checked <?php endif; ?>">
										<span class="icon icon-check"></span>
										<input type="checkbox" name="hospital-room-services" autocomplete="off">
									</span>Hospital Room Services</label>
								<a href="#">Only</a>
							</li>
							<li>
								<label>
									<span class="checkbox-container <?php if(strpos($perks, 'Transportation Services') !== false): ?>checked <?php endif; ?>">
										<span class="icon icon-check"></span>
										<input type="checkbox" name="transportation-services" autocomplete="off">
									</span>Transportation Services</label>
								<a href="#">Only</a>
							</li>
							<li>
								<label>
									<span class="checkbox-container <?php if(strpos($perks, 'Patient Advocate Services') !== false): ?>checked <?php endif; ?>">
										<span class="icon icon-check"></span>
										<input type="checkbox" name="patient-advocate-services" autocomplete="off">
									</span>Patient Advocate Services</label>
								<a href="#">Only</a>
							</li>
							<li>
								<label>
									<span class="checkbox-container <?php if(strpos($perks, 'Wellness Services') !== false): ?>checked <?php endif; ?>">
										<span class="icon icon-check"></span>
										<input type="checkbox" name="wellness-services" autocomplete="off">
									</span>Wellness Services</label>
								<a href="#">Only</a>
							</li>
							<li>
								<label>
									<span class="checkbox-container <?php if(strpos($perks, 'Meal Services') !== false): ?>checked <?php endif; ?>">
										<span class="icon icon-check"></span>
										<input type="checkbox" name="meal-services" autocomplete="off">
									</span>Meal Services</label>
								<a href="#">Only</a>
							</li>
							<li>
								<label>
									<span class="checkbox-container <?php if(strpos($perks, 'Family and Visitors Services') !== false): ?>checked <?php endif; ?>">
										<span class="icon icon-check"></span>
										<input type="checkbox" name="family-and-visitors-services" autocomplete="off">
									</span>Family and Visitors Services</label>
								<a href="#">Only</a>
							</li>
							<li>
								<label>
									<span class="checkbox-container <?php if(strpos($perks, 'Miscellaneous Services') !== false): ?>checked <?php endif; ?>">
										<span class="icon icon-check"></span>
										<input type="checkbox" name="miscellaneous-services" autocomplete="off">
									</span>Miscellaneous Services</label>
								<a href="#">Only</a>
							</li>
						</ul>
						<input type="hidden" id="locationsType" name="locationsType" value="<?php echo $type; ?>" autocomplete="off" >
						<input type="hidden" id="specialty" name="specialty" value="<?php echo $specialty; ?>" autocomplete="off" >
						<input type="hidden" id="search_terms" name="search_terms" value="<?php echo e($search_terms); ?>" autocomplete="off" >
						<input type="hidden" name="results-orderby" id="results-orderby" value="<?php echo $order; ?>" autocomplete="off" >
						<input type="hidden" name="page" id="page" value="<?php echo $page; ?>" autocomplete="off" >
					</div>
				</div>
				<div id="smartcare">
					<span></span>
					<h3><?php echo isset($_ENV['APP_TITLE']) ? $_ENV['APP_TITLE'] : 'SmartCare'; ?> Mobile</h3>
					<p>Download the <?php echo isset($_ENV['APP_TITLE']) ? $_ENV['APP_TITLE'] : 'SmartCare'; ?> Mobile mobile app for free and be able to search for a provider from you tablet or phone. Available for <a href="<?php echo $_ENV['ANDROID_APP_LINK']; ?>">Android</a> and <a href="<?php echo $_ENV['IOS_APP_LINK']; ?>">iOS</a>.</p>
					<ul>
						<li>
							<a href="<?php echo $_ENV['ANDROID_APP_LINK']; ?>" target="_blank">Download from GooglePlay &rsaquo;</a>
						</li>
						<li>
							<a href="<?php echo $_ENV['IOS_APP_LINK']; ?>" target="_blank">Download from AppStore &rsaquo;</a>
						</li>
					</ul>
				</div>
			</aside>
		</div>
	</section>
	<?php if('list' == $view_type): ?>
		<section id="search-footer-container" class="center hide-on-mobile">
			<footer id="search-footer" class="clearfix">
				<p>Showing <span id="pagination-start"></span>-<span id="pagination-end"></span> (of <span id="pagination-total"></span>)</p>
				<?php echo $__env->make('pagination', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
				<p class="list-verification-message">*Please verify if your provider will be able to schedule your delivery at a Lovelace facility</p>
			</footer>
		</section>
	<?php endif; ?>

	<script type="text/javascript">
		var autocomplete_data = <?php echo json_encode($autocomplete_data); ?>;
		var autocomplete_data_coordinates = <?php echo json_encode($autocomplete_data_coordinates); ?>;
	</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>