<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>EasyFood - Register</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css">
</head>
<body class="bg-light">

<!-- Navbar -->
<nav class="navbar bg-body-tertiary shadow-sm">
    <div class="container-fluid">
        <!-- Logo -->
        <a class="navbar-brand d-flex align-items-center" href="index.html">
            <img src="/images/logo.JPG" alt="Logo" height="40">
        </a>


        <!-- Profile Icon -->
        <div class="d-flex align-items-center">

        </div>
    </div>
</nav>
<div class=" mt-5 d-flex justify-content-center">
</div>

<!-- Profile Settings -->
<div class="container my-5">
    <div class="row justify-content-center">
        <div class="col-md-8 col-lg-6">
            <div class="card shadow-sm border-0 rounded-3">
                <div class="card-body p-4">
                    <!-- Title -->
                    <h3 class="mb-4 text-center">Register as customer</h3>

                    <!-- Profile Picture -->
                    <div class="text-center mb-4">
                        <img src="https://cdn-icons-png.flaticon.com/512/847/847969.png"
                             class="rounded-circle border shadow-sm"
                             alt="Profile" width="100" height="100">

                    </div>

                    <div xmlns:th="http://www.thymeleaf.org">
                        <!-- Form -->
                        <form class="form-signin mt-xl-5" method="post" action="/register">
                            <!-- Add CSRF token -->
                            <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>

                            <div class="mb-3">
                                <label class="form-label fw-semibold">Full Name</label>
                                <input type="text" name="fullName" class="form-control" value="" required>
                            </div>

                            <div class="mb-3">
                                <label class="form-label fw-semibold">Email</label>
                                <input type="email" name="email" class="form-control" value="" required>
                            </div>

                            <div class="mb-3">
                                <label class="form-label fw-semibold">Phone Number</label>
                                <input type="tel" name="phoneNumber" class="form-control" value="" required>
                            </div>

                            <div class="mb-3">
                                <label class="form-label fw-semibold">Password</label>
                                <input type="password" name="password" class="form-control" placeholder="" required>
                            </div>

                            <div class="mb-3">
                                <label class="form-label fw-semibold">Repeat Password</label>
                                <input type="password" name="repeatedPassword" class="form-control" placeholder=""
                                       required>
                            </div>

                            <!-- Display error message if any -->
                            <div th:if="${error}" class="alert alert-danger" role="alert">
                                <span th:text="${error}"></span>
                            </div>

                            <div class="d-flex justify-content-center">
                                <button type="submit" class="btn btn-warning fw-semibold">Register</button>
                            </div>
                        </form>

                    </div>

                </div>
            </div>
        </div>
    </div>
</div>

</body>
</html>