<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Dashboard - Ticket Management App</title>
    <%- include('partials/bootstrapcss') %> <%- include('partials/bootstrapcss')
    %>

    <style>
      /* Additional styles for the dashboard page */
      /* * {
        margin: 0;
        padding: 0;
      } */
      .dashboard-container {
        display: flex;
        min-height: 100vh;
      }

      .dashboard-nav {
        background-color: #333;
        /* color: #fff; */
        padding: 20px;
        flex: 0 0 250px;
      }

      .dashboard-content {
        flex: 1;
        padding: 50px;
        background-color: #f5f5f5;
      }

      .dashboard-nav ul {
        list-style: none;
        padding: 0;
      }

      .dashboard-nav li {
        margin-bottom: 15px;
      }

      .dashboard-nav a {
        text-decoration: none;
        color: #fff;
        font-size: 18px;
      }

      .dashboard-btn {
        padding: 10px 20px;
        background-color: #333;
        color: #fff;
        border: none;
        cursor: pointer;
      }

      /*form */
      .create-ticket-container {
        max-width: 600px;
        margin: 0 auto;
        padding: 50px;
        background-color: #f5f5f5;
      }

      .create-ticket-form label {
        display: block;
        margin-bottom: 10px;
      }
      .description {
        width: 100%;
      }
      .create-ticket-form select,
      .create-ticket-form input {
        width: 100%;
        padding: 10px;
        margin-bottom: 15px;
        border: 1px solid #ccc;
      }

      .create-ticket-btn {
        padding: 10px 20px;
        background-color: #333;
        color: #fff;
        border: none;
        cursor: pointer;
      }

      /* cards */

      .ticket-container {
        display: flex;
        gap: 1rem;
        flex-wrap: wrap;
      }

      .ticket-card {
        background-color: #fff;

        padding: 10px;
        width: 23rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
      }

      .ticket-card-header {
        display: flex;
        justify-content: space-between;
      }

      .ticket-card-heading {
        font-size: 18px;
        font-weight: bold;
        margin-bottom: 10px;
      }

      .ticket-card-description {
        font-size: 16px;
        margin-bottom: 15px;
      }

      .ticket-card-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 5px;
      }
      .ticket-footer-right {
        display: flex;
        gap: 3px;
      }
      .priority-label {
        font-weight: bold;
        padding: 3px 8px;
        border-radius: 3px;
        color: #fff;
      }

      .priority-low {
        background-color: green;
      }

      .priority-medium {
        background-color: orange;
      }

      .priority-high {
        background-color: red;
      }

      .chat-btn {
        padding: 5px 10px;
        background-color: #333;
        color: #fff;
        border: none;
        text-decoration: none;
        cursor: pointer;
      }
      .chat-btn:hover {
        background-color: #3c3b3b;
      }
      .chat-btn:active {
        background-color: #3c3b3b;
      }
      @media (max-width: 767px) {
        .dashboard-content {
          padding: 1rem;
        }
        .dashboard-container {
          display: flex;
          flex-direction: column;
        }
        .dashboard-nav {
          background-color: #333;
          padding: 20px;
          flex: 0 0 0;
        }
      }
    </style>
  </head>
  <body>
    <%- include('partials/employeedashboardnavbar') %>
    <div class="dashboard-container">
      <%- include('partials/employeedashboardsidebar') %>
      <section class="dashboard-content">
        <h2>Your Tickets</h2>
        <p>Explore your tickets and manage your tasks efficiently.</p>
        <div class="ticket-container">
          <!-- Create tickets -->

          <!-- create a ticket for each ticket got from the server -->
          <%- include('partials/displaytickets') %>
        </div>
      </section>
    </div>
    <script src="/scripts/mytickets.js"></script>
    <%- include('partials/footer') %> <%- include('partials/bootstrapjs') %>
  </body>
</html>