<?php
/**
 * SGAccount - Footer Layout (AdminLTE 3.2)
 * Shared across all pages.
 */
?>
<footer class="main-footer text-sm bg-light border-top">
  <div class="container-fluid d-flex justify-content-between align-items-center flex-wrap py-2 px-3">
    <div>
      <strong>&copy; <?= date('Y') ?> <a href="<?= BASE_URL ?>" class="text-primary">SGAccount</a>.</strong>
      All rights reserved.
    </div>
    <div>
      <span class="d-none d-md-inline mr-2 text-muted">Version</span>
      <span class="badge badge-primary">1.0.0</span>
    </div>
  </div>
</footer>

<!-- Control Sidebar (optional, collapsible panel on right) -->
<aside class="control-sidebar control-sidebar-dark">
  <!-- Add content here if needed -->
</aside>

<!-- AdminLTE + Plugins -->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/admin-lte@3.2/dist/js/adminlte.min.js"></script>
<script src="assets/js/app.js"></script>

<!-- Toast Notifications (AdminLTE built-in) -->
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<script src="assets/js/toast.js"></script>
<script>
/* === SGAccount Global Toast === */
window.showToast = function (icon, message) {
  const Toast = Swal.mixin({
    toast: true,
    position: 'top-end',
    showConfirmButton: false,
    timer: 2500,
    timerProgressBar: true
  });
  Toast.fire({ icon: icon, title: message });
};

/* === Auto-dismiss alerts === */
$(function(){
  setTimeout(() => { $('.alert-auto-dismiss').fadeOut('slow'); }, 3000);
});
</script>
