<!DOCTYPE html>
<html lang="id">

<head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
  <title>Analisis AI - NutriPosy</title>
  <link rel="icon" type="image/png" href="images/nutriposy.png">
  <link rel="stylesheet" href="{{ asset('css/bootstrap.css') }}" />
  <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&display=swap" rel="stylesheet">
  <link href="{{ asset('css/font-awesome.min.css') }}" rel="stylesheet" />
  <link href="{{ asset('css/style.css') }}" rel="stylesheet" />
  <link href="{{ asset('css/responsive.css') }}" rel="stylesheet" />
</head>

<body>

  <div class="hero_area">
    <header class="header_section">
      <div class="header_bottom">
        <div class="container-fluid">
          <nav class="navbar navbar-expand-lg custom_nav-container">
            <a class="navbar-brand" href="#">
              <img src="images/nutriposy.png" alt="NutriPosy Logo">
            </a>
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
              aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
              <span class="navbar-toggler-icon"></span>
            </button>

            <div class="collapse navbar-collapse" id="navbarSupportedContent">
              <div class="d-flex mr-auto flex-column flex-lg-row align-items-center">
                <ul class="navbar-nav">
                  <li class="nav-item active">
                    <a class="nav-link" href="{{ route('timbangan.index') }}">Timbangan Pintar</a>
                  </li>
                </ul>
              </div>
            </div>
          </nav>
        </div>
      </div>
    </header>

<section class="book_section layout_padding">
    <div class="container">
        <h4 style="font-size: 32px;">Hasil <span>Analisis AI</span></h4>
        <div class="card p-4 shadow-sm">
        <p><strong>Nama:</strong> {{ $nama }}</p>
        <p><strong>Umur:</strong> {{ $umur }} bulan</p>
        <p><strong>Berat:</strong> {{ $berat }} kg</p>
        <p><strong>Tinggi:</strong> {{ $tinggi }} cm</p>
        <p><strong>Catatan:</strong> {{ $catatan ?: '-' }}</p>
        <p><strong>Hasil Analisis:</strong> {{ $hasil_analisis }}</p>
        <p><strong>Tanggal Pemeriksaan:</strong> {{ \Carbon\Carbon::parse($tanggal)->format('d-m-Y') }}</p>

        
    </div>
        <p></p>
        <a href="{{ route('timbangan.index') }}" class="btn btn-secondary">Kembali ke Timbangan</a>
    </div>
</section>

    <!-- footer section -->
    <footer class="footer_section">
      <div class="container">
        <p>
          &copy; <span id="displayYear"></span> All Rights Reserved By
          <a href="#">NutriPosy</a>
        </p>
      </div>
    </footer>
  </div>

  <!-- ✅ Tambahkan jQuery & Bootstrap JS sebelum </body> -->
  <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"></script>

  <!-- ✅ Script untuk auto-close alert -->
  <script>
    setTimeout(function () {
      $('.alert').alert('close');
    }, 3000); // hilang setelah 3 detik
  </script>

</body>

</html>

