<?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 NDesign
 */

?>
<footer id="colophon" class="site-footer" >
	<?php if(get_theme_mod( 'footer_logo' )||get_theme_mod( 'site_description' )||get_theme_mod( 'fb_link' ) || get_theme_mod( 'twitter_link' ) || get_theme_mod( 'linked_in_link' ) || get_theme_mod( 'pinterest_link' ) || get_theme_mod( 'youtube_link' )|| get_theme_mod( 'footer_social_title' ) || get_theme_mod( 'contact_address' ) || get_theme_mod( 'phone_text' ) || get_theme_mod( 'email_text' ) || get_theme_mod( 'contact_form_id' )) { ?>
	<div class="footer-content-section page-section" id="contact-us">
		<div class="container">
			<div class="row">
				<div class="col-lg-4">
					<!-- About Company Start -->
					<!-- Footer site logo start -->
					<?php if ( get_theme_mod( 'footer_logo' ) ) { ?>
						<div class="site-logo">
							<img src="<?php echo esc_url( get_theme_mod( 'footer_logo' ) ); ?>">
						</div>
					<?php } ?>
					<!-- Footer site logo end -->
					<!-- Footer site description start -->
					<?php if ( get_theme_mod( 'site_description' ) ) { ?>
						<div class="footer-site-description">
							<p><?php echo esc_html( get_theme_mod( 'site_description' ) ); ?></p>
						</div>
					<?php } ?>
					<!-- Footer site description end -->
					<!-- About Company End -->
					<!-- Stay Connected Start -->
					<?php if ( get_theme_mod( 'fb_link' ) || get_theme_mod( 'twitter_link' ) || get_theme_mod( 'linked_in_link' ) || get_theme_mod( 'pinterest_link' ) || get_theme_mod( 'youtube_link' ) ) { ?>
						<div class="stay-connected mb-3 mb-lg-0">
							<!-- Footer Social media title start -->
							<?php if ( get_theme_mod( 'footer_social_title' ) ) { ?>
								<h3 class="footer-title contact-form-title footer-social-title">
									<?php echo esc_html( get_theme_mod( 'footer_social_title' ) ); ?>
								</h3>
							<?php } ?>
							<!-- Footer Social media title end -->
							<!-- Socail media links section start -->
							<ul class="list-inline mb-0 footer-social-links">
								<!-- Facebook link start -->
								<?php if ( get_theme_mod( 'fb_link' ) ) { ?>
									<li class="list-inline-item facebook-link">
										<a href="<?php echo esc_url( get_theme_mod( 'fb_link' ) ); ?>" target="_blank" class="<?php echo esc_attr( get_theme_mod( 'fb_icon' ) ); ?>"><i class="fa fa-<?php echo esc_attr( get_theme_mod( 'fb_icon' ) ); ?>"></i></a>
									</li>
								<?php } ?>
								<!-- Facebook link end -->
								<!-- Twitter link start -->
								<?php if ( get_theme_mod( 'twitter_link' ) ) { ?>
									<li class="list-inline-item twitter-link">
										<a href="<?php echo esc_url( get_theme_mod( 'twitter_link' ) ); ?>" target="_blank" class="<?php echo esc_attr( get_theme_mod( 'twitter_icon' ) ); ?>"><i class="fa fa-<?php echo esc_attr( get_theme_mod( 'twitter_icon' ) ); ?>"></i></a>
									</li>
								<?php } ?>
								<!-- Twitter link end -->
								<!-- linkedin link start -->
								<?php if ( get_theme_mod( 'linked_in_link' ) ) { ?>
									<li class="list-inline-item linkedin-link">
										<a href="<?php echo esc_url( get_theme_mod( 'linked_in_link' ) ); ?>" target="_blank" class="<?php echo esc_attr( get_theme_mod( 'linked_in_icon' ) ); ?>"><i class="fa fa-<?php echo esc_attr( get_theme_mod( 'linked_in_icon' ) ); ?>"></i></a>
									</li>
								<?php } ?>
								<!-- linkedin link end -->
								<!-- Pinterest link start -->
								<?php if ( get_theme_mod( 'pinterest_link' ) ) { ?>
									<li class="list-inline-item pinterest-link">
										<a href="<?php echo esc_url( get_theme_mod( 'pinterest_link' ) ); ?>" target="_blank" class="<?php echo esc_attr( get_theme_mod( 'pinterest_icon' ) ); ?>"><i class="fa fa-<?php echo esc_attr( get_theme_mod( 'pinterest_icon' ) ); ?>"></i></a>
									</li>
								<?php } ?>
								<!-- Pinterest link end -->
								<!-- Youtube link start -->
								<?php if ( get_theme_mod( 'youtube_link' ) ) : ?>
									<li class="list-inline-item">
										<span class="youtube-link">
											<a href="<?php echo esc_url( get_theme_mod( 'youtube_link' ) ); ?>" target="_blank" class="<?php echo esc_attr( get_theme_mod( 'youtube_icon' ) ); ?>"><i class="fa fa-<?php echo esc_attr( get_theme_mod( 'youtube_icon' ) ); ?>"></i></a>
										</span>
									</li>
								<?php endif ?>
								<!-- Youtube link end -->
							</ul>
							<!-- Socail media links section end -->
						</div>
					<?php } ?>
					<!-- Stay Connected End -->
				</div>
				<?php if ( get_theme_mod( 'contact_address' ) || get_theme_mod( 'phone_text' ) || get_theme_mod( 'email_text' ) ) { ?>
					<div class="col-lg-4">
						<!-- footer contact address title start -->
						<?php if ( get_theme_mod( 'contact_title' ) ) { ?>
							<h3 class="footer-title contact-title">
								<?php echo esc_html( get_theme_mod( 'contact_title' ) ); ?>
							</h3>
						<?php } ?>
						<!-- footer contact address title end -->
						<ul class="list-unstyled footer-address-listing">
							<!-- Contact address start -->
							<?php if ( get_theme_mod( 'contact_address' ) ) { ?>
								<li class="contact-address">
									<i class="fa fa-<?php echo esc_attr( get_theme_mod( 'caddress_icon' ) ); ?>"></i>
									<?php echo esc_html( get_theme_mod( 'contact_address' ) ); ?>
								</li>
							<?php } ?>
							<!-- Contact address end -->
							<!-- Phone number start -->
							<?php if ( get_theme_mod( 'phone_text' ) ) { ?>
								<li class="phone-number">
									<i class="fa fa-<?php echo esc_attr( get_theme_mod( 'phone_icon' ) ); ?>"></i>
									<a href="<?php echo esc_url( get_theme_mod( 'phone_link' ) ); ?>"><?php echo esc_html( get_theme_mod( 'phone_text' ) ); ?></a>
								</li>
							<?php } ?>
							<!-- Phone number end -->
							<!-- Email address start -->
							<?php if ( get_theme_mod( 'email_text' ) ) { ?>
								<li class="email-address">
									<i class="fa fa-<?php echo esc_attr( get_theme_mod( 'email_icon' ) ); ?>"></i>
									<a href="<?php echo esc_url( get_theme_mod( 'email_link' ) ); ?>"><?php echo esc_html( get_theme_mod( 'email_text' ) ); ?></a>
								</li>
							<?php } ?>
							<!-- Email address end -->
						</ul>
					</div>
				<?php } ?>
				<?php if ( get_theme_mod( 'contact_form_id' ) ) { ?>
					<div class="col-lg-4">
						<!-- Footer Contact form title start -->
						<?php if ( get_theme_mod( 'contact_form_title' ) ) { ?>
							<h3 class="footer-title contact-form-title">
								<?php echo esc_html( get_theme_mod( 'contact_form_title' ) ); ?>
							</h3>
						<?php } ?>
						<!-- Footer Contact form title end -->
						<!-- Footer Contact form start -->
						<div class="footer-contact-form">
							<?php echo do_shortcode( '[contact-form-7 id="' . get_theme_mod( 'contact_form_id' ) . '" title="Contact form 1"]' ); ?>
						</div>
						<!-- Footer Contact form end -->
					</div>
				<?php } ?>
			</div>
		</div>
	</div>
<?php } else if(is_user_logged_in()){ ?>
	<div class="footer-content-section page-section" id="contact-us">
		<div class="container">
			<div class="row">
				<div class="col-lg-12">
					<a class="btn btn-dark-primary" href="<?php echo esc_url( admin_url( 'customize.php' ) ); ?>"><i class="fa fa-pencil mr-2"></i>Customize</a>
				</div>
			</div>
		</div>
	</div>
<?php } ?>
	<div class="footer-copyright-section">
		<div class="container">
			<div class="row">
				<div class="col-12">
					<div class="site-info">
						<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'ndesign' ) ); ?>">
							<?php
							/* translators: %s: CMS name, i.e. WordPress. */
							printf( esc_html__( 'Proudly powered by %s', 'ndesign' ), 'WordPress' );
							?>
						</a>
						<span class="sep"> | </span>
						<?php
						/* translators: 1: Theme name, 2: Theme author. */
						printf( esc_html__( 'Theme: %1$s by %2$s.', 'ndesign' ), 'ndesign', 'SPEC INDIA' );
						if ( function_exists( 'the_privacy_policy_link' ) ) {
							the_privacy_policy_link( ' | ' );
						}
						?>
					</div><!-- .site-info -->
				</div>
			</div>
		</div>
	</div>
</footer><!-- #colophon -->
<a href="javascript:" id="return-to-top">
	<i class="fa fa-chevron-up"></i>
</a>
</div><!-- #page -->
<?php wp_footer(); ?>
</body>
</html>
