<?php global $theme_options;
if ($theme_options['option-footer-select']=='options-footer-1'){
?>
<div style="height: 100px; overflow: hidden;" ><svg viewBox="0 0 500 150" preserveAspectRatio="none" style="height: 100%; width: 100%;"><path d="M0.00,49.98 C147.57,119.91 351.30,2.48 500.00,49.98 L500.00,150.00 L0.00,150.00 Z" style="border-top: 1px solid #cbcbcb; fill: #f7f7f7;"></path></svg></div>
<footer class="footer1">
    <div class="container-fluid">
        <div class="row">
            <div class="col-12 col-md-6 col-lg-4 f-about">
                <?php if ( is_active_sidebar( 'footer1' ) ) { ?>
                    <?php dynamic_sidebar('footer1'); ?>
                <?php } ?>
            </div>
            <div class="col-12 col-md-6 col-lg-4 footer-menu footer-contact-us">
                <?php if ( is_active_sidebar( 'footer2' ) ) { ?>
                    <?php dynamic_sidebar('footer2'); ?>
                <?php } ?>
            </div>
            <div class="col-12 col-md-6 col-lg-4 footer-menu">
                <h4>دسترسی سریع</h4>
                <?php wp_nav_menu( array( 'theme_location' => 'footer-menu', 'container' => '' ) ); ?>
            </div>
            <?php if (!empty($theme_options["opt-footer-copyright-text"])){?>
                    <div class="container">
            <div class="row footer-row">
               <?php echo $theme_options["opt-footer-copyright-text"];  ?>
            </div>
                    </div>
            <?php } ?>
        </div>
    </div>
</footer>
    <?php } elseif ($theme_options['option-footer-select']=='options-footer-2'){ ?>
    <div style="height: 100px; overflow: hidden;" ><svg viewBox="0 0 500 150" preserveAspectRatio="none" style="height: 100%; width: 100%;"><path d="M0.00,49.98 C147.57,119.91 351.30,2.48 500.00,49.98 L500.00,150.00 L0.00,150.00 Z" style="border-top: 1px solid #cbcbcb; fill: #f7f7f7;"></path></svg></div>
    <footer class="footer2">
        <div class="container">
            <div class="row" style="margin-bottom: 30px;">
                <div class="container">
                    <div class="row">
                        <div class="col-12 col-md-6 col-lg-3" style="width:fit-content;">
                            <a href="<?php echo home_url();?>"><img src='<?php echo $theme_options['opt-header-logo']['url'];?>' class="logo"></a>
                        </div>
                        <div class="col-12 col-md-6 col-lg-9 footer2-specialtext">
                            <p><?php echo $theme_options["footer2-specialtext"];?></p>
                        </div>
                    </div>
                </div>

            </div>
            <div class="row">
                <div class="col-12 col-md-4 col-lg-3 f-about">
                    <?php if ( is_active_sidebar( 'footer2-1' ) ) { ?>
                        <?php dynamic_sidebar('footer2-1'); ?>
                    <?php }else{ ?>
                        <h4>ابزارک فعال نیست</h4>
                    <?php } ?>
                </div>
                <div class="col-12 col-md-4 col-lg-3 footer-menu">
                    <?php if ( is_active_sidebar( 'footer2-2' ) ) { ?>
                        <?php dynamic_sidebar('footer2-2'); ?>
                    <?php }else{ ?>
                        <h4>ابزارک فعال نیست</h4>
                    <?php } ?>
                </div>
                <div class="col-12 col-md-4 col-lg-3 footer-menu">
                    <?php if ( is_active_sidebar( 'footer2-3' ) ) { ?>
                        <?php dynamic_sidebar('footer2-3'); ?>
                    <?php }else{ ?>
                        <h4>ابزارک فعال نیست</h4>
                    <?php } ?>
                </div>
                <div class="col-12 col-md-4 col-lg-3 footer-menu">
                    <?php if ( is_active_sidebar( 'footer2-4' ) ) { ?>
                        <?php dynamic_sidebar('footer2-4'); ?>
                    <?php }else{ ?>
                        <h4>خبرنامه</h4>
                        <p>
                            می‌توانید با عضو شدن در خبرنامه ما از جدیدترین اخبار و اطلاعات با خبر شوید
                        </p>
                        <form action="<?php home_url('/')?>" class="form-outline">
                            <input type="email" class="form-control search-input" placeholder="ایمیل خود را وارد کنید ..." name="s"/>
                            <button class="btn btn-primary search-button">
                                عضوم کن
                            </button>
                        </form>
                    <?php } ?>
                </div>
                <?php if (!empty($theme_options["opt-footer-copyright-text"])){?>
                    <div class="container">
                        <div class="row footer-row">
                            <div class="col-12 col-lg-9 copyright">
                                <?php echo $theme_options["opt-footer-copyright-text"];  ?>
                            </div>
                            <div class="col-12 col-lg-3 footer2-socialicon">
                                <?php if (!empty($theme_options["opt-footer2-youtube-icon"])){?><a href="<?php echo $theme_options["opt-footer2-youtube-icon"];?>"><i class="fab fa-youtube"></i></a> <?php } ?>
                                <?php if (!empty($theme_options["opt-footer2-instagram-icon"])){?> <a href="<?php echo $theme_options["opt-footer2-instagram-icon"];?>"><i class="fab fa-instagram-square"></i></a> <?php } ?>
                                <?php if (!empty($theme_options["opt-footer2-telegram-icon"])){?> <a href="<?php echo $theme_options["opt-footer2-telegram-icon"];?>"><i class="fab fa-telegram"></i></a> <?php } ?>
                                <?php if (!empty($theme_options["opt-footer2-twitter-icon"])){?> <a href="<?php echo $theme_options["opt-footer2-twitter-icon"];?>"><i class="fab fa-twitter-square"></i></a> <?php } ?>
                            </div>
                        </div>
                    </div>
                <?php } ?>
                <?php if ( is_active_sidebar( 'footer2-under-copyright' ) ) { ?>
                    <div class="container under-copyright" style="margin-top:30px;">
                        <div class="row">
                            <div class="col-12 col-lg-8">
                                <?php dynamic_sidebar('footer2-under-copyright'); ?>
                            </div>
                            <div class="col-12 col-lg-4 footer2-namad">
                                <?php dynamic_sidebar('footer2-under-copyright-2'); ?>
                            </div>
                        </div>
                    </div>

                    <?php } ?>
            </div>
        </div>
    </footer>
    <div class="footer2-downbox" style="max-width:100% !important;">
        <div class="row">
            <div class="col-20percent">
                <a href="<?php if(!empty($theme_options['opt-header-phone-link'])){echo $theme_options['opt-header-phone-link'];}else{ echo home_url('#');}?>"><i class="fas fa-phone"></i></a>
                </div>
            <div class="col-20percent"><a href="<?php if(!empty($theme_options['opt-header-buttons-link-2'])){echo $theme_options['opt-header-buttons-link-2'];}else{ echo home_url('/cart');}?>"><i class="fas fa-shopping-bag"></i></a></div>
            <div class="col-20percent"><a href="<?php echo home_url('/')?>"><i class="fas fa-home"></i></a></div>
            <div class="col-20percent"><a href="<?php if(!empty($theme_options['opt-header-buttons-link-3'])){echo $theme_options['opt-header-buttons-link-3'];}else{ echo home_url('/wishlist');}?>"><i class="fas fa-heart"></i></a></div>
            <div class="col-20percent"><a href="<?php if(!empty($theme_options['opt-header-buttons-link'])){echo $theme_options['opt-header-buttons-link'];}else{ echo home_url('/my-account');}?>"><i class="fas fa-user"></i></div>
        </div>
    </div>

<?php }else{?>
    <div style="height: 100px; overflow: hidden;" ><svg viewBox="0 0 500 150" preserveAspectRatio="none" style="height: 100%; width: 100%;"><path d="M0.00,49.98 C147.57,119.91 351.30,2.48 500.00,49.98 L500.00,150.00 L0.00,150.00 Z" style="border-top: 1px solid #cbcbcb; fill: #f7f7f7;"></path></svg></div>
    <footer class="footer2">
        <div class="container">
            <div class="row" style="margin-bottom: 30px;">
                <div class="container">
                    <div class="row">
                        <div class="col-12 col-md-6 col-lg-3" style="width:fit-content;">
                            <a href="<?php echo home_url();?>"><img src='<?php echo $theme_options['opt-header-logo']['url'];?>' class="logo"></a>
                        </div>
                        <div class="col-12 col-md-6 col-lg-9 footer2-specialtext">
                            <p><?php echo $theme_options["footer2-specialtext"];?></p>
                        </div>
                    </div>
                </div>

            </div>
            <div class="row">
                <div class="col-12 col-md-4 col-lg-3 f-about">
                    <?php if ( is_active_sidebar( 'footer2-1' ) ) { ?>
                        <?php dynamic_sidebar('footer2-1'); ?>
                    <?php }else{ ?>
                        <h4>ابزارک فعال نیست</h4>
                    <?php } ?>
                </div>
                <div class="col-12 col-md-4 col-lg-3 footer-menu">
                    <?php if ( is_active_sidebar( 'footer2-2' ) ) { ?>
                        <?php dynamic_sidebar('footer2-2'); ?>
                    <?php }else{ ?>
                        <h4>ابزارک فعال نیست</h4>
                    <?php } ?>
                </div>
                <div class="col-12 col-md-4 col-lg-3 footer-menu">
                    <?php if ( is_active_sidebar( 'footer2-3' ) ) { ?>
                        <?php dynamic_sidebar('footer2-3'); ?>
                    <?php }else{ ?>
                        <h4>ابزارک فعال نیست</h4>
                    <?php } ?>
                </div>
                <div class="col-12 col-md-4 col-lg-3 footer-menu">
                    <?php if ( is_active_sidebar( 'footer2-4' ) ) { ?>
                        <?php dynamic_sidebar('footer2-4'); ?>
                    <?php }else{ ?>
                        <h4>خبرنامه</h4>
                        <p>
                            می‌توانید با عضو شدن در خبرنامه ما از جدیدترین اخبار و اطلاعات با خبر شوید
                        </p>
                        <form action="<?php home_url('/')?>" class="form-outline">
                            <input type="email" class="form-control search-input" placeholder="ایمیل خود را وارد کنید ..." name="s"/>
                            <button class="btn btn-primary search-button">
                                عضوم کن
                            </button>
                        </form>
                    <?php } ?>
                </div>
                <?php if (!empty($theme_options["opt-footer-copyright-text"])){?>
                    <div class="container">
                        <div class="row footer-row">
                            <div class="col-12 col-lg-9 copyright">
                                <?php echo $theme_options["opt-footer-copyright-text"];  ?>
                            </div>
                            <div class="col-12 col-lg-3 footer2-socialicon">
                                <?php if (!empty($theme_options["opt-footer2-youtube-icon"])){?><a href="<?php echo $theme_options["opt-footer2-youtube-icon"];?>"><i class="fab fa-youtube"></i></a> <?php } ?>
                                <?php if (!empty($theme_options["opt-footer2-instagram-icon"])){?> <a href="<?php echo $theme_options["opt-footer2-instagram-icon"];?>"><i class="fab fa-instagram-square"></i></a> <?php } ?>
                                <?php if (!empty($theme_options["opt-footer2-telegram-icon"])){?> <a href="<?php echo $theme_options["opt-footer2-telegram-icon"];?>"><i class="fab fa-telegram"></i></a> <?php } ?>
                                <?php if (!empty($theme_options["opt-footer2-twitter-icon"])){?> <a href="<?php echo $theme_options["opt-footer2-twitter-icon"];?>"><i class="fab fa-twitter-square"></i></a> <?php } ?>
                            </div>
                        </div>
                    </div>
                <?php } ?>
                <?php if ( is_active_sidebar( 'footer2-under-copyright' ) ) { ?>
                    <div class="container under-copyright" style="margin-top:30px;">
                        <div class="row">
                            <div class="col-12 col-lg-8">
                                <?php dynamic_sidebar('footer2-under-copyright'); ?>
                            </div>
                            <div class="col-12 col-lg-4 footer2-namad">
                                <?php dynamic_sidebar('footer2-under-copyright-2'); ?>
                            </div>
                        </div>
                    </div>

                <?php } ?>
            </div>
        </div>
    </footer>
    <div class="footer2-downbox" style="max-width: 100% !important;">
        <div class="row">
            <div class="col-20percent">
                <a href="<?php if(!empty($theme_options['opt-header-phone-link'])){echo $theme_options['opt-header-phone-link'];}else{ echo home_url('#');}?>"><i class="fas fa-phone"></i></a>
            </div>
            <div class="col-20percent"><a href="<?php if(!empty($theme_options['opt-header-buttons-link-2'])){echo $theme_options['opt-header-buttons-link-2'];}else{ echo home_url('/cart');}?>"><i class="fas fa-shopping-bag"></i></a></div>
            <div class="col-20percent"><a href="<?php echo home_url('/')?>"><i class="fas fa-home"></i></a></div>
            <div class="col-20percent"><a href="<?php if(!empty($theme_options['opt-header-buttons-link-3'])){echo $theme_options['opt-header-buttons-link-3'];}else{ echo home_url('/wishlist');}?>"><i class="fas fa-heart"></i></a></div>
            <div class="col-20percent"><a href="<?php if(!empty($theme_options['opt-header-buttons-link'])){echo $theme_options['opt-header-buttons-link'];}else{ echo home_url('/my-account');}?>"><i class="fas fa-user"></i></div>
        </div>
    </div>
        <?php }?>

</body>
<?php wp_footer(); ?>
</html>
