<?php
/**
 * The template for displaying the footer
 *
 * Contains the closing of the #content div and all content after.
 *
 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
 *
 * @package NexProperty
 */

$footer_logo = get_theme_mod( 'footer_logo' );
if( get_theme_mod( 'footer_logo' )) {
	$footer_logo = get_theme_mod( 'footer_logo' );
}
$footer_content = get_theme_mod( 'footer_content' );
$footer_phone_number = get_theme_mod( 'footer_phone_number' );
$email_address = get_theme_mod( 'footer_email_address' );

?>
	<footer>
		
		<div class="top-footer">
			<div class="container">
				<div class="row">
					<?php if( is_active_sidebar( 'footer' ) ) : ?>
					<div class="col-lg-2 col-md-4 col-sm-6 col-12">
						<div class="my-property widget">
							<?php if( $footer_logo ) : ?>
								<img src="<?php echo esc_url( $footer_logo ) ?>" alt="<?php echo esc_attr( 'footer logo' ) ?>">
							<?php else: ?>
								<p><?php echo esc_html( get_bloginfo( 'name' ) ); ?></p>
							<?php endif; ?>
							<?php if( $footer_content ) : ?>
								<p><?php echo wp_kses_post( $footer_content ); ?></p>
							<?php else: ?>
								<p><?php echo esc_html( get_bloginfo( 'description' ) ); ?></p>
							<?php endif; ?>
							<div class="social">
								<a href="#"><i class="fab fa-facebook-f"></i></a>
								<a href="#"><i class="fab fa-twitter"></i></a>
								<a href="#"><i class="fab fa-instagram"></i></a>
							</div>
						</div><!--my-property end-->
					</div>
					<div id="recent-posts-3" class="col-lg-2 col-md-4 col-sm-6 col-12 widget widget_recent_entries">
						<h2 class="widget-title"><?php echo esc_html__('Company','classified-ads-directory');?></h2>
						<ul>
							<li>
								<a href="#"><?php echo esc_html__('Product','classified-ads-directory');?></a>
							</li>
							<li>
								<a href="#"><?php echo esc_html__('Blog','classified-ads-directory');?></a>
							</li>
							<li>
								<a href="#"><?php echo esc_html__('Support','classified-ads-directory');?></a>
							</li>
						</ul>
					</div>
					<div id="recent-posts-3" class="col-lg-3 col-md-4 col-sm-6 col-12 widget widget_recent_entries">
						<h2 class="widget-title"><?php echo esc_html__('Features','classified-ads-directory');?></h2>
						<ul>
							<li>
								<a href="#"><?php echo esc_html__('Screen Sharing','classified-ads-directory');?></a>
							</li>
							<li>
								<a href="#"><?php echo esc_html__('iOS & Android Apps','classified-ads-directory');?></a>
							</li>
							<li>
								<a href="#"><?php echo esc_html__('File Sharing ser Management','classified-ads-directory');?></a>
							</li>
						
						</ul>
					</div>

					<div id="recent-posts-3" class="col-lg-2 col-md-4 col-sm-6 col-12 widget widget_recent_entries">
						<h2 class="widget-title"><?php echo esc_html__('Contact Us','classified-ads-directory');?></h2>
						<ul>
							<?php if( $email_address ) : ?>
							<li>
								<a href="mailto:<?php echo esc_attr( $email_address ); ?>"><?php echo esc_html( $email_address ); ?></a>
							</li>
							<?php endif; ?>
							<?php if( $footer_phone_number ) : ?>
							<li>
								<a href="tel:<?php echo esc_html( $footer_phone_number ); ?>"><?php echo esc_html( $footer_phone_number ); ?></a>
							</li>
							<?php endif; ?>
						</ul>
					</div>
					<?php endif;?>
					<?php
						if( is_active_sidebar( 'footer' ) ) : 
							dynamic_sidebar( 'footer' ); 
						endif;
					?>
				</div>
			</div>
			</div><!--top-footer end-->
			<?php if( get_theme_mod( 'footer_copyright_text') ) : ?>
				<div class="bottom-footer">
				<div class="container">
					<div class="row">
						<div class="col-sm-6 text-sm-left">
							<h3><?php echo esc_html(get_theme_mod( 'footer_copyright_text' )); ?></h3>
						</div>
						<div class="col-sm-6 text-sm-right">
							<h3>
								<?php if(!empty(get_theme_mod( 'footer_powered_by_link' ))):?>
									<a href="<?php echo esc_url(get_theme_mod( 'footer_powered_by_link' ));?>" target="_blank"><?php echo esc_html(get_theme_mod( 'footer_powered_by' ));?></a>
								<?php else:?>
									<?php echo esc_html(get_theme_mod( 'footer_powered_by' ));?>
								<?php endif;?>
							</h3>
						</div>
					</div>
				</div>
			</div><!--bottom-footer end-->
			<?php endif; ?>
		</div>
	</footer><!--footer end-->
</div><!--wrapper end-->
<?php wp_footer(); ?>
</body>
</html>
