<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Main Page</title>
    <link rel="stylesheet" href="../css/subacc.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">

</head>
<body>
    <div class="container">
        <div class="wrapper">
          
            <div class="title"><span>Choose Subaccount</span></div>

            
                <span id="user-email" data-email="<?php echo htmlspecialchars($user_info['email']); ?>">
                <span id="profile_id" data-profile-id="<?php echo htmlspecialchars($user_info['profile_id']); ?>">
           

            <div id="objects-container"></div>

            <div class="button-container">
                <a href="../php/logout.php" class="logout-btn">Logout</a>
                <button id="create-object-btn" class="create-btn">Create Subaccount</button>
            </div>

            <!-- Popup dialog for creating objects -->
            <div id="popup-dialog" class="popup-dialog">
                <div id="popup-content" class="popup-content">
                    <p>Enter a name for the subaccount:</p>
                    <input type="text" id="object-name-input" placeholder="Object Name">
                    <div class="button-container">
                        <button id="confirm-btn" class="popup-btn">Confirm</button>
                        <button id="cancel-btn" class="popup-btn">Cancel</button>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- Link to external JS file -->
    <script src="../javascript/subaccount.js"></script>
</body>
</html>
