{{!
    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_boost/footer

    Page footer.

    Example context (json):
    {
        "output": {
            "page_doc_link": "Help and documentation",
            "supportemail": "<a href=\"#\">Contact site support</a>",
            "has_popover_links": true,
            "services_support": "Services and support",
            "login_info": "You are logged in as cute kitten",
            "moodle_release": "90210",
            "has_communication_links": true,
            "communication_url": "https://element:8081/#/room/#yourroom:synapse",
            "communication_link": "<a href=\"#\">Communication room</a>"
        }
    }
}}

<footer id="page-footer" class="footer-popover mb-3">
    <hr class="mt-0">
    <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}}
    </div>
    <div class="footer-content-popover d-flex row" data-region="footer-content-popover">
        {{#output.has_communication_links}}
            <div class="footer-section col-lg-4 col-xl-3 footer-link-communication">
                <div class="footer-support-link">{{{ output.communication_link }}}</div>
                <hr class="d-lg-none">
            </div>
        {{/output.has_communication_links}}
        {{# output.has_popover_links }}
            <div class="footer-section col-lg-4 col-xl-3">
                {{# output.page_doc_link }}
                    <div class="footer-support-link">{{{ output.page_doc_link }}}</div>
                {{/ output.page_doc_link }}

                {{# output.services_support_link }}
                    <div class="footer-support-link">{{{ output.services_support_link }}}</div>
                {{/ output.services_support_link }}

                {{# output.supportemail }}
                    <div class="footer-support-link">{{{ output.supportemail }}}</div>
                {{/ output.supportemail }}
                <hr class="d-lg-none">
            </div>
        {{/ output.has_popover_links }}
        <div class="footer-section col-lg-4 col-xl-3">
            <div class="logininfo">
                {{{ output.login_info }}}
            </div>
            <div class="tool_usertours-resettourcontainer">
            </div>

            {{{ output.standard_footer_html }}}
            {{{ output.standard_end_of_body_html }}}
            <hr class="d-lg-none">
        </div>
        <div class="footer-section col-lg-12 col-xl-3 ml-auto">
            <hr class="d-none d-lg-block d-xl-none">
            {{^leftnavigation}}
                <div class="d-none d-lg-block mb-3">
                    {{> theme_liquid/socialicons}}
                </div>
            {{/leftnavigation}}
            <div>{{#str}}developedby, theme_liquid{{/str}}</div>
            <div>{{#str}}poweredbymoodle, core{{/str}}</div>
            {{#output.moodle_release}}
                <div>
                    {{#str}}version, core{{/str}} {{{ output.moodle_release }}}
                </div>
            {{/output.moodle_release}}
        </div>

        <div class="toggle-holder footer-section col-12 d-xlg-none">
            <label class="light" for="darktheme-checkbox-bottom">
                <i class="fa fa-sun-o"></i>
            </label>
            <div class="custom-control custom-switch">
                <input type="checkbox" class="custom-control-input darktheme-checkbox" id="darktheme-checkbox-bottom">
                <span class="custom-control-label"></span>
            </div>
            <label class="dark" for="darktheme-checkbox-bottom">
                <i class="fa fa-moon-o"></i>
            </label>
        </div>

        <div class="col-12 d-block d-lg-none">
            {{> theme_liquid/socialicons}}
        </div>
    </div>

    <div class="footer-content-debugging footer-dark bg-dark text-light">
        <div class="container-fluid footer-dark-inner">
            {{{ output.debug_footer_html }}}
        </div>
    </div>
</footer>
