<!DOCTYPE html>
<html lang="ja">
    <head>
        <%- include("../layout/head",{ title: "アカウント" }); %>
    </head>
    <body>
        <header>
            <%- include("../layout/header"); %>
        </header>
        <main>
            <div class="container">
                <%- include("../components/errorAlert",{ message: errorMessage }); %>
                <div class="card" style="width: 30rem;">
                    <h5 class="card-header">アカウント</h5>
                    <div class="card-body text-center">
                        <h6 class="card-title">ユーザー名: <%= session.user.name %></h6>
                        <%- session.user.name === "admin" ? "<p class='card-text text-muted'>管理者としてログインしています</p>" : "" %>
                        <a href="/account/edit" class="btn btn-success">編集</a>
                        <a href="/account/logout" class="btn btn-danger">ログアウト</a>
                    </div>
                </div>
            </div>
        </main>
        <footer>
            <%- include("../layout/footer"); %>
        </footer>
    </body>
    <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js" integrity="sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.min.js" integrity="sha384-cuYeSxntonz0PPNlHhBs68uyIAVpIIOZZ5JqeqvYYIcEL727kskC66kF92t6Xl2V" crossorigin="anonymous"></script>
</html>