<?php global $dicom_opt;
/**
 * The template for displaying the footer
 * @package Dicom
*/
	if( isset( $dicom_opt['enable_lazyloader'] ) ):
		$is_lazyloader = $dicom_opt['enable_lazyloader'];
	else:
		$is_lazyloader = true;
	endif;

	if( $is_lazyloader == true ):
		$lazy_class = 'smartify';
		$lazy_attr = 'sm-';
	else:
		$lazy_class = '';
		$lazy_attr = '';
	endif;
	
	if ( isset( $dicom_opt['footer_copyright_text'] ) ) :
		$footer_info_content 	= $dicom_opt['footer_info_content'];
		$enable_back_to_top 	= $dicom_opt['enable_back_to_top'];
	else:
		$footer_info_content 	= '';
		$enable_back_to_top 	= true;
	endif;

	$footer_style = function_exists( 'get_field' ) ? get_field( 'footer_style' ) : '';
	$footer_class = 'footer-area';
	if($footer_style == 2){
		$footer_class = 'footer-area it-footer-area';
	}elseif($footer_style == 3){
			$footer_class = 'footer-area ds-footer-area';
		}

	$footer_shape_image 		= isset( $dicom_opt['footer_shape_image']['url'] ) ? $dicom_opt['footer_shape_image']['url'] : '';
	?>
	<!-- Start Footer Area -->
	<?php if ( !is_404() ) : ?>
		<footer class="<?php echo esc_attr($footer_class) ?>">
            <div class="container">
                <div class="row">
				<?php $footer_column = !empty($dicom_opt['footer_column']) ? $dicom_opt['footer_column'] : '3'; ?>
                    <div class="col-lg-<?php echo esc_attr($footer_column); ?> col-md-6">
                        <div class="single-footer-widget">
                            <a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="logo">
								<?php dicom_main_logo() ?>
                            </a>
                            <p><?php echo esc_html( $footer_info_content ); ?></p>
							
							<?php if( isset( $dicom_opt['is_footer_social_icon'] ) && $dicom_opt['is_footer_social_icon'] == '1' ): ?>
								<ul class="social-link">
									<?php dicom_social_link(); ?>
								</ul>
							<?php endif; ?>
                        </div>
                    </div>

                    <?php if ( is_active_sidebar( 'footer_widgets') ) : ?>
						<?php dynamic_sidebar( 'footer_widgets' ); ?>
					<?php endif; ?>
                </div>
			</div>
			<?php if($footer_style == 2): ?>
					<div class="footer-bottom-area">
						<div class="container">
							<div class="row align-items-center">
								<div class="col-lg-12 col-md-12">
									<?php if ( isset( $dicom_opt['footer_copyright_text'] ) ): ?>
										<p><?php echo wp_kses_post( $dicom_opt['footer_copyright_text'] ); ?></p>
									<?php else: ?>
										<p><?php esc_html_e( '2022 Dicom is Proudly Powered by HiBootstrap', 'dicom' ); ?></p>
									<?php endif ?>
								</div>
							</div>
						</div>
					</div>
					<?php elseif($footer_style == 3): ?>
						<div class="footer-bottom-area">
							<div class="container">
								<div class="row align-items-center">
									<div class="col-lg-12 col-md-12">
										<?php if ( isset( $dicom_opt['footer_copyright_text'] ) ): ?>
											<p><?php echo wp_kses_post( $dicom_opt['footer_copyright_text'] ); ?></p>
										<?php else: ?>
											<p><?php esc_html_e( '2022 Dicom is Proudly Powered by HiBootstrap', 'dicom' ); ?></p>
										<?php endif ?>
									</div>
								</div>
							</div>
						</div>
					<?php else: ?>
						<div class="container">
							<div class="footer-bottom-area">
								<div class="row align-items-center">
									<div class="col-lg-6 col-md-6">
										<?php if ( isset( $dicom_opt['footer_copyright_text'] ) ): ?>
											<p><?php echo wp_kses_post( $dicom_opt['footer_copyright_text'] ); ?></p>
										<?php else: ?>
											<p><?php esc_html_e( '2022 Dicom is Proudly Powered by HiBootstrap', 'dicom' ); ?></p>
										<?php endif ?>
									</div>

									<div class="col-lg-6 col-md-6">
										<?php if( has_nav_menu('footer-menu') ) :
											$args = array(
												'theme_location' 	=> 'footer-menu',
												'menu'            	=> 'footer-menu',
												'container'       	=> 'ul',
												'fallback_cb'  		=> false,
												'menu_class'      	=> 'menu',
												'depth'           	=> 1,
											);
											wp_nav_menu( $args );
										endif; ?>
									</div>
								</div>
							</div>
						</div>
				<?php endif; ?>
			<?php if($footer_style == 1): ?>
				<?php if( $footer_shape_image != '' ): ?>
					<div class="shape16"><img class="<?php echo esc_attr($lazy_class); ?>" <?php echo esc_attr($lazy_attr); ?>src="<?php echo esc_url( $footer_shape_image ); ?>" alt="<?php esc_html_e( 'Footer Shape Image', 'dicom' ); ?>"></div>
				<?php endif; ?>
			<?php endif; ?>

        </footer>
	<?php endif; ?>

	<?php if( $enable_back_to_top == true ) : ?>
		<div class="go-top"><i class='bx bx-up-arrow-alt'></i></div>
	<?php endif; ?>

	<?php
		global $wp;
		$current_url = home_url(add_query_arg(array(), $wp->request));
		$home_url = home_url();
	?>
	<?php if ( strpos($current_url, 'themes.hibootstrap.com/dicom') != false ): ?>
		<div class="et-demo-options-toolbar">
			<?php if( dicom_rtl() == true ): ?>
				<a href="<?php echo esc_url( $current_url ); ?>" class="hint--bounce hint--left hint--black" id="toggle-quick-options" aria-label="LTR Demo">
					<i class="fa fa-align-left"></i>
				</a>
			<?php else: ?>
				<a href="<?php echo esc_url( $current_url ); ?>/?rtl=enable" class="hint--bounce hint--left hint--black" id="toggle-quick-options" aria-label="RTL Demo">
					<i class="fa fa-align-right"></i>
				</a>
			<?php endif; ?>
			<a href="mailto:hello@hibootstrap.com" target="_blank" rel="nofollow" class="hint--bounce hint--left hint--black" aria-label="Reach Us">
				<i class="fa fa-life-ring"></i>
			</a>
			<a href="https://docs.hibootstrap.com/docs/dicom-theme-documentation/" target="_blank" rel="nofollow" class="hint--bounce hint--left hint--black" aria-label="Documentation">
				<i class="fa fa-book"></i>
			</a>
			<a href="https://1.envato.market/Vqyga" target="_blank" rel="nofollow" class="hint--bounce hint--left hint--black" aria-label="Purchase Dicom">
				<i class="fa fa-shopping-cart"></i>
			</a>
		</div>
	<?php endif; ?>
	

	<?php wp_footer(); ?>

	</body>
</html>