<?php
require_once __DIR__ . '/../lib/Env.php';
load_env(__DIR__ . '/../.env');
?>
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>PHP Chat Widget</title>
  <link rel="stylesheet" href="assets/styles.css">
</head>
<body>
  <h1 style="font-family: sans-serif; padding: 16px;">Demo: PHP 7.4 Chat Widget</h1>

  <!-- Chat Widget -->
  <div id="chat-widget" class="chat-closed">
    <div class="chat-header">
      <div>OpenAI Chat</div>
      <div class="chat-controls">
        <button id="btn-max">▢</button>
        <button id="btn-min">—</button>
      </div>
    </div>
    <div class="chat-body">
      <div id="messages"></div>
    </div>
    <div class="chat-footer">
      <input id="chat-input" type="text" placeholder="Ketik pesan..."/>
      <button id="send-btn">Kirim</button>
    </div>
  </div>

  <button id="floating-open">💬</button>

  <script src="assets/app.js"></script>
</body>
</html>