<?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">
		<?php
		$logo = '/public/images/header-logo.png';
		if ( ! empty( $_ENV[ 'CLIENT_BRAND' ] ) ):
			switch ( $_ENV[ 'CLIENT_BRAND' ] ):
				case 'wise':
					$logo = '/public/images/wise/wise-header-logo.png';
					break;
			endswitch;
		endif;
		?>
		<img src="<?php echo $logo; ?>" id="print-logo">
		<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>

		<div id="print-container">
			<a href="#print" id="print-menu"><span class="icon icon-print"></span> <span class="hide-on-phone">Print</span></a>
			<div class="menu">
				<ul class="primary">
					<li>
						<a href="#" id="print-results">Search results</a>
					</li>
					<?php if( ! empty( $_ENV[ 'CLIENT_BRAND' ] ) && $_ENV[ 'CLIENT_BRAND' ] === 'wise' ): ?>
					<li>
						<a href="#" id="print-entire">Entire network</a>
					</li>
					<?php endif; ?>
				</ul>
			</div>
		</div>
		<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">This region is not currently part of the <?php if( ! empty( $_ENV['CLIENT_BRAND'] ) && $_ENV['CLIENT_BRAND'] == 'wise' ): ?> Wise Provider Networks. <?php else: ?> SmartCare Network. <?php endif; ?> </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 id="disclaimer-print">
							<p>
								*The PPO Agreement with this provider is expressly between the Third Party Administrator or Trust Fund and the Provider.
							</p>
							<?php if( ! empty( $_ENV[ 'CLIENT_BRAND' ] ) && $_ENV[ 'CLIENT_BRAND' ] === 'wise' ): ?>
							<p id="asterisk-message">
								**This facility may be used ONLY for specific specialty services. Members must obtain prior authorization from Payor before receiving services.
							</p>
							<?php endif; ?>
							<p>All other services are available at participating hospitals with Wise Provider Networks.</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 elseif('rating' == $order): ?>Rating <?php endif; ?></label>
								<button id="show-location" type="button" class="icon icon-down-arrow"></button>
							</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>
									<?php if( empty( $_ENV['CLIENT_BRAND'] ) || $_ENV['CLIENT_BRAND'] != 'wise' ): ?>
									<li>
										<a href="#" <?php if('rating' == $order): ?>class="active"<?php endif; ?> data-value="rating">Rating</a>
									</li>
									<?php endif; ?>
								</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>
					<?php if( empty( $_ENV[ 'CLIENT_BRAND' ] ) || $_ENV[ 'CLIENT_BRAND' ] !== 'wise' ): ?>
					<div class="form-block">
					<?php else: ?>
					<div class="form-block hidden">
					<?php endif; ?>
						<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>
					<?php if( ! empty( $_ENV[ 'CLIENT_BRAND' ] ) && $_ENV[ 'CLIENT_BRAND' ] === 'wise' ): ?>
					<div class="form-block group-block">
						<div class="search-filter-header clearfix">
							<h3>
								Employer or Group Name
							</h3>
							<a href="#" id="reset-client" class="clear-group">Change</a>
						</div>
						<span class="icon icon-group hide-on-mobile"></span>
						<?php echo Session::get( 'client' )[ 'client_name' ]; ?>

					</div>
					<?php endif; ?>
				</div>
				<div id="smartcare">
					<?php /* <span></span> This was for the app badge image */ ?>
					<h3>SmartCare Mobile Store</h3>
					<p>Download the SmartCare Mobile app for free and be able to search for a provider from you tablet or phone. Available for Android and iOS.</p>
					<ul>
						<li>
							<a id="google-play" href='https://play.google.com/store/apps/developer?id=Imagine%20Health&hl=en&utm_source=global_co&utm_medium=prtnr&utm_content=Mar2515&utm_campaign=PartBadge&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'><img alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png'/></a>
						</li>
						<li>
							<a id="app-store" href="https://itunes.apple.com/us/developer/imagine-health/id430444186" style="display:inline-block;overflow:hidden;background:url(https://linkmaker.itunes.apple.com/images/badges/en-us/badge_appstore-lrg.svg) no-repeat center center;width:135px;height:40px;"></a>
						</li>
					</ul>
				</div>
				<div id="disclaimer">
					<p>
						Coverage under your plan may not be available for all provider types listed. Please verify benefits prior to receiving services. Confirmation of network status for both physician and facility is recommended as some facilities may not be part of the network or may be covered at a different benefit level.
					</p>
					<?php if( ! empty( $_ENV[ 'CLIENT_BRAND' ] ) && $_ENV[ 'CLIENT_BRAND' ] === 'wise' ): ?>
					<p id="asterisk-message">
						* In the search results some Intermountain Health Care providers or facilities may show an asterisk (*) next to the name. The asterisk (*) indicates that these providers may have agreements that are expressly between the Third Party Administrator or Trust Fund and the Provider. This information is simply a contractual clarification and has no impact to member insurance benefits.
					</p>
					<?php endif; ?>
				</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); ?>;
		var favorites = false;
	</script>
<?php $__env->stopSection(); ?>

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