let emailHeader = `<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Email-template 2</title>
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800&display=swap"
        rel="stylesheet">
</head>
<body> <center style="max-width: 760px;width:100%;margin:45px auto;font-family: 'Poppins', sans-serif; table-layout: fixed;overflow-x: hidden;">
<table style="max-width: 760px;width:100%;background-color: #fff;overflow-x: hidden;">
   <tbody>
      <tr>
         <td style="text-align: center;padding: 22px;">
            <img style="width:12.5em" src="${process.env.WEB_ENDPOINT_ADMIN}/assets/img/beneikel-logo.png" alt="logo">
         </td>
      </tr>
      <tr>
         <td>
            <table style="background-color: #fff;border: 1px solid #dfdfdf;padding: 1.25em;
               border-radius: 10px;margin-bottom: 42px;margin:0 auto;max-width: 760px;    width: 100%;
               table-layout: fixed;overflow-x: hidden;" class="inner-table">
               <tbody>`
let emailFooter = `<tr>
<td>
   <table border="0" cellpadding="0" cellspacing="0" class="text_block block-2" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; word-break: break-word;" width="100%">
      <tbody>
         <tr>
            <td>
               <p style="text-align: center;
                  
                  font-size:1.625em;
                  line-height:34px;
                  font-weight:600;
                  letter-spacing: 0px;
                  color: #2F243A;
                  opacity: 1;margin-bottom: 15px;">Reach out to us</p>
            </td>
         </tr>
      </tbody>
   </table>
</td>
</tr>
<tr>
<td>
   <table style="width: 100%; text-align: center;margin: auto;">
      <tbody>
         <tr>
            <td style="text-align: center;">
               <div style="
                  display: inline-block;
                  ">
                  <table style="
                     width: 220px;
                     ">
                     <tr>
                        <td>
                           <a href="" style="border: 1px solid #D0D6DD;
                              border-radius: 10px;
                              opacity: 1;
                              display: inline-block;
                              text-align: center;
                              padding: 1.125em 0;width: 220px;">
                           <span style="display: inline-block;
                              width: 100%;"><img src="${process.env.WEB_ENDPOINT}/assets/images/call.png" style="width: 50px;height: 50px;"></span>
                           <span style="display: inline-block;text-align: center;
                           font-size:1.125em;
                           line-height:34px;
                           font-weight:600;
                              letter-spacing: 0px;
                              color: #2F243A;
                              opacity: 1;width: 100%;">07532 022 646</span>
                           </a>
                        </td>
                     </tr>
                  </table>
               </div>
               <div style="
                  display: inline-block;
                  ">
                  <table style="
                     width: 220px;
                     ">
                     <tr>
                        <td>
                           <a href="" style="border: 1px solid #D0D6DD;
                              border-radius: 10px;
                              opacity: 1;
                              display: inline-block;
                              text-align: center;
                              padding: 1.125em 0;width: 220px;">
                           <span style="display: inline-block;
                              width: 100%;"><img src="${process.env.WEB_ENDPOINT}/assets/images/message.png" style="width: 50px;height: 50px;"></span>
                           <span style="display: inline-block;text-align: center;
                              
                              font-size:1.125em;
                                line-height:34px;
                                font-weight:600;
                              letter-spacing: 0px;
                              color: #2F243A;
                              opacity: 1;width: 100%;">Message us</span>
                           </a>
                        </td>
                     </tr>
                  </table>
               </div>
            </td>
         </tr>
      </tbody>
   </table>
</td>
</tr>
<tr>
<td>
   <div class="alignment" style="
      text-align: center;padding: 1.875em 1em;background: #2F243A 0% 0% no-repeat padding-box;margin-top: 1.875em;
      ">
      <table border="0" cellpadding="0" cellspacing="0" class="social-table" role="presentation" style=" display: inline-block;">
         <tbody>
            <tr>
               <td style="display: inline-block;"><a href="https://www.facebook.com/profile.php?id=61551616379494" target="_blank"><img alt="facebook" height="40" src="${process.env.WEB_ENDPOINT}/assets/images/facebook.png" style="width:40px;height: auto; display: inline-block; border: 0;" title="Facebook" width="40"></a></td>
               <td style="display: inline-block;padding-left: 10px;"><a href="https://www.instagram.com/conveenie/" target="_blank"><img alt="twitter" height="40" src="${process.env.WEB_ENDPOINT}/assets/images/instagram.png" style="width:40px;height: auto; display: inline-block; border: 0;" title="instagram" width="40"></a></td>
               <td style="display: inline-block;padding-left: 10px;"><a href="https://www.linkedin.com/campaignmanager/login" target="_blank"><img alt="linkedin" height="40" src="${process.env.WEB_ENDPOINT}/assets/images/linkedin.png" style="width:40px;height: auto; display: inline-block; border: 0;" title="linkedin" width="40"></a></td>
               <td style="display: inline-block;padding-left: 10px;"><a href="https://business.tiktok.com" target="_blank"><img alt="tik-tok" height="40" src="${process.env.WEB_ENDPOINT}/assets/images/tik-tok.png" style="width:40px;height: auto; display: inline-block; border: 0;" title="tik-tok" width="40"></a></td>
               <td style="display: inline-block;padding-left: 10px;"><a href="https://twitter.com/i/professionals" target="_blank"><img alt="twitter" height="40" src="${process.env.WEB_ENDPOINT}/assets/images/twitter.png" style="width:40px;height: auto; display: inline-block; border: 0;" title="twitter" width="40"></a></td>
            </tr>
            <tr>
               <td>
                  <table>
                     <tbody>
                        <tr>
                           <td>
                              <a href="${process.env.WEB_ENDPOINT}/pages/about-us" style="text-align: center;
                                 
                                 font-size:12px;
                                 line-height: 34px;
                                 font-weight:normal;
                                 letter-spacing: 0px;
                                 color: #D0D6DD;
                                 opacity: 1;text-decoration: none;">About Us</a>
                              <a href="${process.env.WEB_ENDPOINT}/pages/FAQ" style="text-align: center;
                                 font-size:12px;
                                 line-height: 34px;
                                 font-weight:normal;
                                 letter-spacing: 0px;
                                 color: #D0D6DD;
                                 opacity: 1;text-decoration: none;margin-left: 10px;">FAQ's</a>
                              <a href="${process.env.WEB_ENDPOINT}/pages/contact-us" style="text-align: center;
                                 font-size:12px;
                                 line-height: 34px;
                                 font-weight:normal;
                                 letter-spacing: 0px;
                                 color: #D0D6DD;
                                 opacity: 1;text-decoration: none;margin-left: 10px;">Contact Us</a>
                              <a href="${process.env.WEB_ENDPOINT}/pages/blog" style="text-align: center;
                                 font-size:12px;
                                 line-height: 34px;
                                 font-weight:normal;
                                 letter-spacing: 0px;
                                 color: #D0D6DD;
                                 opacity: 1;text-decoration: none;margin-left: 10px;">Blog</a>
                              <a href="${process.env.WEB_ENDPOINT}/pages/careers" style="text-align: center;
                                 font-size:12px;
                                 line-height: 34px;
                                 font-weight:normal;
                                 letter-spacing: 0px;
                                 color: #D0D6DD;
                                 opacity: 1;text-decoration: none;margin-left: 10px;">Careers</a>   
                           </td>
                        </tr>
                     </tbody>
                  </table>
               </td>
            </tr>
         </tbody>
      </table>
   </div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</center></body></html>`



exports.forgotPasswordTemplate = (requiredData) => {
   return (
      {
         "subject": 'Reset Password',
         "html": `${emailHeader}
        <tr>
        <td>
            <div class="mm">
    
                <table style="background-color: #fff;border: 1px solid #dfdfdf;padding: 25px;
                border-radius: 72px;margin-bottom: 42px;margin:0 auto;" class="inner-table">
                <tr>
                    <td style="text-align: center;padding: 9px 23px 14px 23px;">
                        <img src="${process.env.WEB_ENDPOINT_ADMIN}/assets/img/msg.png" alt="logo">
                        <h4 style=" font-size:18px;font-weight:600;margin: 10px 0 0 0;color:#111;">Hello ${requiredData.fullName}! To reset your password, please click the button below.</h4>
                    
                    </td>
                </tr>
                <tr>
                    <td style="text-align: center;display: block;margin: 20px;">
                    <a target="_blank"  style="background: #EE942B;border: none;color: #fff;font-size: 15px;padding: 14px 20px;cursor: pointer;text-decoration:none;" href="${requiredData.link}">Reset Password</a>
                    <p style="font-size:14px;color:#6D6D6D;margin-bottom: 45px;"></p>
                        <p style="max-width: 80%;margin: auto; color:#111;font-size:16px;font-weight:600;border-top:1px solid #dfdfdf;padding-top: 38px;">
                            Have questions or trouble logging in?</p>
                            <p style="color:#111;font-size:16px;font-weight:600;margin:0;padding-top: 14px;">
                                Contact us at: <a href="mailto:support@demo.com" style="color:#111;cursor:default;text-decoration: none;">support@demo.com</a>
                            </p>
                    
                    </td>
                </tr>
            
            </table>
        </div>
        </td>
    </tr>`
      }
   )
}

   

exports.addAdminTemplate = (requiredData) => {
   return (
      {
         "subject": 'Hey! Welcome to the team',
         "html": `${emailHeader}
        <tr>
        <td>
            <div class="mm">
        
                <table style="background-color: #fff;border: 1px solid #dfdfdf;padding: 25px;
                border-radius: 72px;margin-bottom: 42px;margin:0 auto;width:100%;" class="inner-table">
                <tr>
                    <td style="text-align: center;padding: 9px 23px 14px 23px;">
                        <img src="${process.env.WEB_ENDPOINT}/assets/images/msg.png" alt="logo">
                        <h4 style=" font-size:18px;font-weight:600;margin: 10px 0 0 0;color:#111;">Hello ${requiredData.fullName}! Below are your login credentials.</h4>
                </td>
            </tr>
            <tr>
                <td style="font-size: 15px;color: #6b6b6b;line-height: 22px;text-align: center;"><b>Email:</b> ${requiredData.email}</td>
            </tr>
            <tr>
                <td style="font-size: 15px;color: #6b6b6b;line-height: 22px;text-align: center;"><b>Password:</b> ${requiredData.password}</td>
            </tr>
            <tr>
                <td style="text-align: center;display: block;margin-top: 20px;">
                    <a target="_blank"  style="background: #EE942B;border: none;color: #fff;font-size: 15px;padding: 14px 20px;cursor: pointer;text-decoration:none;" href="${requiredData.link}">Login</a>
                <p style="font-size:14px;color:#6D6D6D;margin-bottom: 45px;"></p>
                    <p style="    max-width: 80%;
                    margin: auto; color:#111;font-size:16px;font-weight:600;border-top:1px solid #dfdfdf;padding-top: 38px;">
                        Have questions or trouble logging in?</p>
                        <p style="color:#111;font-size:16px;font-weight:600;margin:0;padding-top: 14px;">
                            Contact us at: <a href="mailto:support@demo.com" style="color:#111;cursor:default;text-decoration: none;">support@demo.com</a>
                        </p>
                
                </td>
            </tr>
            
            </table>
        </div>
        </td>
        </tr>
        ${emailFooter}`
      }
   )
}
