<?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 Edumodo
 */
$edumodo_footer_layout_style         = edumodo_get_theme_mod('edumodo_section_footer_layout_select', 'layout-1');
$edumodo_enable_footer_column        = edumodo_get_theme_mod('edumodo_section_footer_column', 'column-4');
$edumodo_enable_footer_bottom_social = edumodo_get_theme_mod('edumodo_section_footer_social_enable', 'on');
$edumodo_enable_footer_bottom        = edumodo_get_theme_mod('edumodo_section_footer_bottom_trigger', 'on');
$edumodo_change_copyright            = edumodo_get_theme_mod('edumodo_section_footer_change_copyright', 'off');
$edumodo_copyright_text              = edumodo_get_theme_mod('edumodo_section_footer_copyright_text', '');
$edumodo_change_credit               = edumodo_get_theme_mod('edumodo_section_footer_change_credit', 'off');
$edumodo_change_credit_text          = edumodo_get_theme_mod('edumodo_section_footer_credit_text', '');
$edumodo_change_credit_url           = edumodo_get_theme_mod('edumodo_section_footer_credit_url', '');
$facebook                            = get_theme_mod('edumodo_footer_social_fb_url', '#');
$twitter                             = get_theme_mod('edumodo_footer_social_tw_url', '#');
$instagram                           = get_theme_mod('edumodo_footer_social_ins_url', '#');
$linkedin                            = get_theme_mod('edumodo_footer_social_lk_url', '#');
$whatsapp                            = get_theme_mod('edumodo_footer_social_whts_url', '#');
$youtube                             = get_theme_mod('edumodo_footer_social_yt_url', '#');
$skype                               = get_theme_mod('edumodo_footer_social_sk_url', '#');
$snapchat                            = get_theme_mod('edumodo_footer_social_snap_url', '#');

?>
<div id="footer-<?php echo $edumodo_footer_layout_style; ?>">
    <?php
            switch ( $edumodo_enable_footer_column ) {

                case 'column-1':
                    get_template_part( 'template-parts/footer/column', 'one' );
                    break;

                case 'column-2':
                    get_template_part( 'template-parts/footer/column', 'two' );
                    break;

                case 'column-3':
                    get_template_part( 'template-parts/footer/column', 'three' );
                    break;

                case 'column-4':
                    get_template_part( 'template-parts/footer/column', 'four' );
                    break;

                default:
                    get_template_part( 'template-parts/footer/column', 'four' );
            }
        ?>
    <?php if('on' == $edumodo_enable_footer_bottom):?>
    <div id="copyright" class="copyright">
        <div class="container">
            <div class="row">
                <div class="col-md-6 col-sm-6">
                    <div class="edumodo-credit-wrapper">
                        <?php if('on'==$edumodo_change_copyright):?>
                        <div class="copyright-info"><?php echo $edumodo_copyright_text;?></div>
                        <?php endif;?>
                        <?php if('on'==$edumodo_change_credit):?>
                        <div class="user-credit">
                            <a href="<?php echo $edumodo_change_credit_url; ?>">
                                <?php echo $edumodo_change_credit_text; ?>
                            </a>
                        </div>
                        <?php endif;?>
                    </div>
                </div>

                <?php if ( 'on' == $edumodo_enable_footer_bottom_social ):?>
                <div class="col-md-6 col-sm-6">
                    <div class="footer-social-icons text-right">
                        <ul>
                            <?php if (!empty($facebook)) : ?>
                            <li><a href="<?php echo esc_url($facebook); ?>"><i class="fa fa-facebook"></i></a></li>
                            <?php endif; ?>
                            <?php if (!empty($twitter)) : ?>
                            <li><a href="<?php echo esc_url($twitter); ?>"><i class="fa fa-twitter"></i></a></li>
                            <?php endif; ?>
                            <?php if (!empty($instagram)) : ?>
                            <li><a href="<?php echo esc_url($instagram); ?>"><i class="fa fa-instagram"></i></a></li>
                            <?php endif; ?>
                            <?php if (!empty($linkedin)) : ?>
                            <li><a href="<?php echo esc_url($linkedin); ?>"><i class="fa fa-linkedin"></i></a></li>
                            <?php endif; ?>
                            <?php if (!empty($whatsapp)) : ?>
                            <li><a href="<?php echo esc_url($whatsapp); ?>"><i class="fa fa-whatsapp"></i></a></li>
                            <?php endif; ?>
                            <?php if (!empty($youtube)) : ?>
                            <li><a href="<?php echo esc_url($youtube); ?>"><i class="fa fa-youtube"></i></a></li>
                            <?php endif; ?>
                            <?php if (!empty($skype)) : ?>
                            <li><a href="<?php echo esc_url($skype); ?>"><i class="fa fa-skype"></i></a></li>
                            <?php endif; ?>
                            <?php if (!empty($snapchat)) : ?>
                            <li><a href="<?php echo esc_url($snapchat); ?>"><i class="fa fa-snapchat"></i></a></li>
                            <?php endif; ?>
                        </ul>
                    </div>
                </div>
                <?php endif; ?>
            </div>
        </div>
    </div>
    <?php endif;?>
</div>