{{!
    This file is part of Moodle - http://moodle.org/

    Moodle is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Moodle is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
}}
{{!
    @template theme_academi/footer

    Page footer template.

    Example context (json):
    {
        "output": {
            "doctype": "<!DOCTYPE html>",
            "page_title": "Footer",
            "main_content": "<h1>Headers keep HTML validators happy</h1>",
            "footersmall": "false",
            "copyrightfoorer": "Copyright © 2017 - Developed by LMSACE.com. Powered by Moodle",
            "fstatus1": "true",
            "fstatus2": "true",
            "fstatus3": "true",
            "fstatus4": "true",
            "ftitle1": "About Us",
            "ftitle2": "Info",
            "ftitle3": "Contact Us",
            "ftitle4": "Follow Us",
            "backtotopbtn": "true"
        }
    }
}}
{{#footersmall}}
    <footer id="page-footer" class=" footer-popover footer-dark text-light">
        <div id="footer">
            <div class="footer-bottom">
                {{# copyrightfooter}}
                    <p>{{{copyrightfooter}}}</p>
                {{/ copyrightfooter}}
            </div>
        </div>
    </footer>
{{/footersmall}}

{{^footersmall}}
    <footer id="page-footer" class="footer-popover footer-dark text-light">
        <div id="footer" {{#footerbgimgclass}} class="{{footerbgimgclass}}" {{/footerbgimgclass}}>
            {{#footerstatus}}
                <div class="footer-main">
                    <div class="container-fluid">
                        <div id="course-footer">
                            {{{ output.course_footer }}}
                        </div>
                        <div class="row">
                            {{! Footer block 1 start }}
                                {{#fstatus1}}
                                    <div class="{{colclass}}">
                                        <div class="infoarea">
                                            {{#ftitle1}}
                                                <h2>{{ftitle1}}</h2>
                                            {{/ftitle1}}
                                            {{#footlogostatus}}
                                                {{#footerlogourl}}
                                                    <div class="footer-logo">
                                                        <a href="#"><img src="{{footerlogourl}}" width="100" height="100" alt="Academi"></a>
                                                    </div>
                                                {{/footerlogourl}}
                                            {{/footlogostatus}}
                                            {{#footnote}}
                                                {{{footnote}}}
                                            {{/footnote}}
                                        </div>
                                    </div>
                                {{/fstatus1}}
                            {{! Footer block 1 end }}

                            {{! Footer block 2 start }}
                                {{#fstatus2}}
                                    <div class="{{colclass}} footer-links-block">
                                        <div class="foot-links">
                                            {{#ftitle2}}
                                                <h2>{{ftitle2}}</h2>
                                            {{/ftitle2}}
                                            {{# infolink}}
                                                <ul>
                                                    {{{infolink}}}
                                                </ul>
                                            {{/ infolink}}
                                        </div>
                                    </div>
                                {{/fstatus2}}
                            {{! Footer block 2 end }}

                            {{! Footer block 3 start }}
                                {{#fstatus3}}
                                    <div class="{{colclass}}">
                                        <div class="contact-info">
                                            {{#ftitle3}}
                                                <h2>{{ftitle3}}</h2>
                                            {{/ftitle3}}
                                            {{# address}}
                                                <p>{{address}}</p>
                                            {{/ address}}
                                            {{# phoneno}}
                                                <p><i class="fa fa-phone-square"></i> {{phone}} : {{phoneno}}</p>
                                            {{/ phoneno}}
                                            {{# emailid}}
                                                <p><i class="fa fa-envelope"></i> {{email}} : <a class="mail-link" href="mailto:{{emailid}}">{{emailid}}</a></p>
                                            {{/ emailid}}
                                        </div>
                                    </div>
                                {{/fstatus3}}
                            {{! Footer block 3 end }}

                            {{! Footer block 4 start }}
                                {{#fstatus4}}
                                    <div class="{{colclass}}">
                                        <div class="social-media">
                                            {{#ftitle4}}
                                                <h2>{{ftitle4}}</h2>
                                            {{/ftitle4}}
                                            <ul>
                                            {{#socialmedia}}
                                                {{# socialstatus}}
                                                    {{#sicon}}
                                                        <li class="smedia-{{sno}}">
                                                            <a href="{{{surl}}}" target="_blank" style="background-color: {{{siconcolor}}}">
                                                                <span class="media-icon">
                                                                    <i class="fa fa-{{sicon}}"></i>
                                                                </span>
                                                            </a>
                                                        </li>
                                                    {{/sicon}}
                                                {{/ socialstatus}}
                                            {{/socialmedia}}
                                            </ul>
                                        </div>
                                    </div>
                                {{/fstatus4}}
                            {{! Footer block 4 end }}
                        </div>
                    </div>
                </div>
            {{/footerstatus}}
            {{#footerbottomstatus}}
                <div class="footer-bottom">
                    {{# copyrightfooter}}
                        <p>{{{copyrightfooter}}}</p>
                    {{/ copyrightfooter}}
                    {{! Moodle footer debug footer }}
                    <div class="footer-content-debugging">
                        <div class="container">{{{ output.debug_footer_html }}}</div>
                    </div>
                </div>
            {{/footerbottomstatus}}
            {{! Moodle footer help icon popover }}
            <div data-region="footer-container-popover">
                {{#output.has_communication_links}}
                    <button onclick="window.open('{{output.communication_url}}', '_blank', 'noreferrer')" class="btn btn-icon bg-primary text-white icon-no-margin btn-footer-communication" aria-label="{{#str}}communicationroomlink, course{{/str}}">
                        {{#pix}}t/messages-o, core{{/pix}}
                    </button>
                {{/output.has_communication_links}}
                <button class="btn btn-icon bg-secondary icon-no-margin btn-footer-popover" data-action="footer-popover" aria-label="{{#str}}showfooter, theme_boost{{/str}}">
                    {{#pix}}e/question, core{{/pix}}
                </button>
            </div>
            <div class="footer-content-popover container" data-region="footer-content-popover">
                {{#output.has_communication_links}}
                    <div class="footer-section p-3 border-bottom footer-link-communication">
                        <div class="footer-support-link">{{{ output.communication_link }}}</div>
                    </div>
                {{/output.has_communication_links}}
                {{# output.has_popover_links }}
                    <div class="footer-section p-3 border-bottom">
                        {{# output.page_doc_link }}
                            <div>{{{ output.page_doc_link }}}</div>
                        {{/ output.page_doc_link }}

                        {{# output.services_support_link }}
                            <div>{{{ output.services_support_link }}}</div>
                        {{/ output.services_support_link }}

                        {{# output.supportemail }}
                            <div>{{{ output.supportemail }}}</div>
                        {{/ output.supportemail }}
                    </div>
                {{/ output.has_popover_links }}

                <div class="footer-section p-3 border-bottom">
                    <div class="logininfo">
                        {{{ output.login_info }}}
                    </div>
                    <div class="tool_usertours-resettourcontainer">
                    </div>
                    {{{ output.standard_footer_html }}}
                    {{{ output.standard_end_of_body_html }}}
                </div>

                <div class="footer-section p-3">
                    <div>{{#str}}poweredbymoodle, core{{/str}}</div>
                    {{#output.moodle_release}}
                        <div>{{#str}}version, core{{/str}}{{{ output.moodle_release }}}</div>
                    {{/output.moodle_release}}
                </div>
            </div>
        </div>
    </footer>
{{/footersmall}}

{{#backtotopbtn}}
    <a id="backToTop" href="#" class="btn btn-primary btn-lg back-to-top " role="button"><span class="fa fa-angle-up"></span></a>
{{/backtotopbtn}}

{{#js}}
M.util.js_pending('theme_boost/loader');
require(['theme_boost/loader', 'theme_boost/drawer'], function(Loader, Drawer) {
    Drawer.init();
    M.util.js_complete('theme_boost/loader');
});
{{/js}}

{{#js}}
require(['theme_boost/footer-popover'], function(FooterPopover) {
    FooterPopover.init();
});
{{/js}}

