import { getCurrentYear } from "../../../utils/helpers"

export const exceptionEmail = (errorLog: any): string => {
  return `
<!DOCTYPE html>
<html lang="en" class="no-js">
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="description" content="" />
    <meta name="author" content="" />
    <title>System Error - Costifys</title>
    <style type="text/css" rel="stylesheet">
      body,
      html {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        padding: 0;
        margin: 0;
      }
      *,
      ::after,
      ::before {
        box-sizing: border-box;
      }
      body,
      html,
      p {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Helvetica, Arial, sans-serif;
        color: #111111;
        font-size: 16px;
        line-height: 22px;
      }
      body {
        background: #fafafa;
      }
      center {
        width: 600px;
        text-align: center;
        margin: 50px auto;
      }
      .email-top {
        height: 3px;
        background-color: #111111;
        margin-top: 36px;
      }
      .email-bottom {
        margin-bottom: 36px;
        height: 3px;
        background-color: #111111;
      }
      .email-body {
        padding: 50px;
        text-align: left;
        background: #fff;
      }
      h1 {
        margin-top: -20px;
        margin-bottom: 0;
      }
      img.blog-img {
        border-radius: 10px;
        margin-bottom: 15px;
        object-fit: cover;
        max-width: 100%;
      }
      h2 {
        margin-top: 0;
        line-height: 36px;
        font-size: 24px;
        font-weight: 700;
        margin-bottom: 5px;
      }
      .btn {
        border-radius: 6px;
        background-color: #2f855a;
        color: #fff;
        text-align: center;
        font-size: 16px;
        letter-spacing: 0;
        line-height: 18px;
        padding: 16px 20px;
        display: inline-block;
        min-width: 200px;
      }
      .btn:focus,
      .btn:hover {
        color: #fff;
        opacity: 0.85;
      }
      p {
        margin-top: 0;
      }
      ul {
        list-style: decimal;
        padding-left: 26px;
        margin-top: 0;
        margin-bottom: 20px;
      }
      li {
        padding-left: 10px;
      }
      .f-18 {
        font-size: 18px;
      }
      a {
        text-decoration: none;
        color: #262f37;
      }
      a:hover {
        color: #2f855a;
      }
      .downloads {
        height: 50px;
      }
      @media (max-width: 650px) {
        center {
          width: 430px;
        }
        img.blog-img {
          height: 170px;
        }
      }
      @media (max-width: 420px) {
        center {
          width: 100%;
          padding: 0 15px;
          margin: 30px 0;
        }
        .email-body {
          padding: 30px 20px;
        }
        .downloads {
          height: auto;
        }
      }
    </style>
  </head>
  <body>
    <center>
      <img src="cid:unique@cidLogo" alt="Costify Logo" height="50" />
      <div class="email-top"></div>
      <div class="email-body">
        <p
          style="
            margin-top: 0;
            margin-bottom: 25px;
            font-size: 20px;
            line-height: 22px;
            font-weight: bold;
            color: #111111;
          "
        >
          System Error Alert
        </p>
        <p style="margin-bottom: 25px">
          A system error has occurred in the Costifys application. Please review the details below:
        </p>
        <p style="margin-bottom: 25px">
          <strong>Error Code:</strong> 500<br>
          <strong>Message:</strong> ${errorLog.message}<br>
          <strong>Error Trace:</strong> ${errorLog.stack}
        </p>
        <div>
          <p style="margin-bottom: 0px">Regards,</p>
          <p style="margin-bottom: 0px">Support Team</p>
          <p style="margin-bottom: 0px">Costifys App</p>
          <p style="margin-bottom: 0px">
            <a href="https://www.costifys.com/">https://www.costifys.com/</a>
          </p>
        </div>
      </div>
      <div class="email-bottom"></div>
      <div class="email-footer">
        <img src="cid:unique@cidLogo" alt="Costify Logo" height="50" />
        <p style="line-height: 18px">${getCurrentYear()} Costifys | All Rights Reserved.</p>
      </div>
    </center>
  </body>
</html>
    `
}
