<!--
  Copyright © 2025-26 l5yth & contributors

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<% slim = defined?(slim) && slim %>
<footer class="app-footer<%= slim ? " app-footer--slim" : "" %>">
  <div class="footer-content">
    <span class="footer-brand">PotatoMesh</span>
    <% if version && !version.empty? %>
      <span class="mono"><%= version %></span>
    <% end %>
    <span class="footer-separator" aria-hidden="true">—</span>
    <span class="footer-links">
      GitHub:
      <a href="https://github.com/l5yth/potato-mesh" target="_blank">l5yth/potato-mesh</a>
      <% if contact_link && !contact_link.empty? %>
        <span class="footer-separator" aria-hidden="true">—</span>
        <span class="footer-contact">
          <%= site_name %> chat:
          <% if contact_link_url %>
            <a href="<%= contact_link_url %>" target="_blank"><%= contact_link %></a>
          <% else %>
            <%= contact_link %>
          <% end %>
        </span>
      <% end %>
    </span>
  </div>
</footer>
