<!-- companyBookingEmail.ejs -->
<%- include('partials/header', {
    title: 'New Booking Alert - Gear',
    heading: 'New Booking Received!',
    baseUrl: baseUrl
}) %>
<style type="text/css">
        .order-table, .info-table{
            width: 100%;
            text-align: left;
            font-size: 12px;
        }
        tr{
            border-bottom: 1px solid gray !important;
        }
        .total-row > td{
            font-weight: 600;
        }
      
</style>

<div class="order-number">Booking #<%= data.booking_code %></div>
<div class="status"><%= data.status %></div>

<p>You have received a new booking for your car. Please review the details below:</p>

<hr>

<h3>Booking Details</h3>
<table class="order-table" style="width: 100%; text-align: left; font-size: 12px;">
    <thead>
        <tr>
            <th>Car</th>
            <th>Dates</th>
            <th>Customer</th>
            <!-- <th>Price</th> -->
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>
                <% if(data.car && data.car.images && data.car.images.length > 0) { %>
                    <img src="<%= `${baseUrl}/uploads/${data.car.images[0]}` %>" alt="car" width="60px"> <br>
                <% } %>
                <%= data.car.title %>
            </td>
            <td>
                From: <%= new Date(data.start_date).toLocaleDateString() %> <%= data.start_time %><br>
                To: <%= new Date(data.end_date).toLocaleDateString() %> <%= data.end_time %>
            </td>
            <td> <%= data.user.name %> </td>
            <!-- <td>AED <%= data.day_price_with_fee.toFixed(2) %> / day</td> -->
        </tr>
     
        
        <th>Order Date:</th>
            <td><%= new Date(data.createdAt).toLocaleString() %></td>
        </tr>
    
    </tbody>
</table>

<hr>

<%- include('partials/footer') %>
