
emailHeader = `<!DOCTYPE html>
<html>

<head>
   <meta name="viewport" content="width=device-width" />
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
   <title>Registration</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=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap"
      rel="stylesheet">
</head>

<body>
   <center
      style="max-width: 760px;width:100%;margin:45px auto;font-family: 'nunito', sans-serif; table-layout: fixed;overflow-x: hidden;">
      <table style="max-width: 760px;width:100%;background-color: #fff;overflow-x: hidden;">
         <tbody>
            <!--header-->
            <tr>
               <td style="text-align: center;padding: 22px;">
                  <img style="width:12.5em" src="${process.env.WEB_ENDPOINT}/assets/images/logo.png" alt="logo">
               </td>
            </tr>
            <!--header-end-->
            <tr>
               <td>
                  <table style="background-color: #fff;border: 1px solid #CFCFCF;padding: 1.25em;
                        border-radius: 20px;margin-bottom: 42px;margin:0 auto;max-width: 760px;    width: 100%;
                        table-layout: fixed;overflow-x: hidden;" class="inner-table">
                     <tbody>
                        <!--top-section-->`
emailFooter = `
<!--regard-section-->
                        <tr>
                           <td>
                              <table style="width: 100%;
                                 opacity: 1;  border-top: 1px solid #DFDFDF;margin-top: 15px;
                                 ">
                                 <tbody>
                                    <tr>
                                       <td>
                                          <p style="text-align: left;
                                             font-size: 0.9375em;
                                             font-weight: normal;
                                             line-height: 21px;
                                             letter-spacing: 0px;
                                             color: #1B1B1B;
                                             opacity: 1;margin: 15px 0 0 0;">Please log in to your account at <a
                                             href="${process.env.WEB_ENDPOINT}" style="color:#014CC4;text-decoration: none;">www.demo.net</a> to explore the full range of
                                             services
                                             and features available to you. If you have any questions or need assistance, please
                                             contact
                                             us at <a href="mailto:support@demo.net" style="color:#014CC4;text-decoration: none;">support@demo.net</a>.
                                          </p>
                                          <p style="text-align: left;
                                             font-size: 0.9375em;
                                             font-weight: normal;
                                             line-height: 21px;
                                             letter-spacing: 0px;
                                             color: #1B1B1B;
                                             opacity: 1;margin: 10px 0 0 0;">Thank you for choosing Dr. Hivey. We look forward to providing you with exceptional care.
                                          </p>
                                          <p style="text-align: left;
                                             font-size: 0.9375em;
                                             font-weight: 600;
                                             line-height: 21px;
                                             letter-spacing: 0px;
                                             color: #1B1B1B;
                                             opacity: 1;margin: 20px 0 0 0;">Best Regards
                                          </p>
                                          <p style="text-align: left;
                                             font-size: 0.9375em;
                                             font-weight: 600;
                                             line-height: 21px;
                                             letter-spacing: 0px;
                                             color: #1B1B1B;
                                             opacity: 1;margin: 0px 0 0 0;">Dr. Hivey
                                          </p>
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                           </td>
                        </tr>
<tr>
<td>
   <div class="alignment" style="
         text-align: center;padding: 1.875em 1em;background: #014CC4 0% 0% no-repeat padding-box;margin-top: 1.875em;border-radius: 10px;
         ">
      <table border="0" cellpadding="0" cellspacing="0" class="social-table"
         role="presentation" style=" display: inline-block; ">
         <tbody>
            <tr>
               <td style="display: inline-block;text-align: center;">
                  <a href="" target="_blank"><img alt="facebook" height="40" width="40"
                        src="${process.env.WEB_ENDPOINT}/assets/images/facebook.png"
                        style="width:40px;height:40px;display: block; border: 0;text-align: center;margin: auto;"
                        title="Facebook" ></a>
                  <a href="" style="text-align: center;
                        font-size: 12px;
                        font-weight: 500;
                        line-height: 34px;
                        letter-spacing: 0px;
                        color: #fff;
                        opacity: 1;text-decoration: none;">About Us</a>
               </td>
               <td style="display: inline-block;padding-left: 25px;">
               <a href="" target="_blank"><img alt="facebook" height="40" width="40"
                        src="${process.env.WEB_ENDPOINT}/assets/images/instagram.png"
                        style="width:40px;height:40px;display: block; border: 0;text-align: center;margin: auto;"
                        title="Facebook" ></a>
                  <a href="" style="text-align: center;
                        font-size: 12px;
                        font-weight: 500;
                        line-height: 34px;
                        letter-spacing: 0px;
                        color: #fff;
                        opacity: 1;text-decoration: none;">FAQ's</a>
               </td>
               <td style="display: inline-block;padding-left: 25px;"><a href="" target="_blank"><img alt="facebook" height="40" width="40"
               src="${process.env.WEB_ENDPOINT}/assets/images/linkedin.png"
               style="width:40px;height:40px;display: block; border: 0;text-align: center;margin: auto;"
               title="Facebook" ></a>
         <a href="" style="text-align: center;
               font-size: 12px;
               font-weight: 500;
               line-height: 34px;
               letter-spacing: 0px;
               color: #fff;
               opacity: 1;text-decoration: none;">Contact
               Us</a>
               </td>
               <td style="display: inline-block;padding-left: 25px;"><a href="" target="_blank"><img alt="facebook" height="40" width="40"
               src="${process.env.WEB_ENDPOINT}/assets/images/twitter.png"
               style="width:40px;height:40px;display: block; border: 0;text-align: center;margin: auto;"
               title="Facebook" ></a>
         <a href="" style="text-align: center;
               font-size: 12px;
               font-weight: 500;
               line-height: 34px;
               letter-spacing: 0px;
               color: #fff;
               opacity: 1;text-decoration: none;">Blog</a>
               </td>
            </tr>
         </tbody>
      </table>
   </div>
</td>
</tr>
<!--footer-end-->
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</center>
</body>

</html>`

//------------------arbic----------------------
let emailHeader_ar = `<!DOCTYPE html>
<html>

<head>
   <meta name="viewport" content="width=device-width" />
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
   <title>Registration</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=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap"
      rel="stylesheet">
</head>

<body>
   <center
      style="max-width: 760px;width:100%;margin:45px auto;font-family: 'nunito', sans-serif; table-layout: fixed;overflow-x: hidden;">
      <table style="max-width: 760px;width:100%;background-color: #fff;overflow-x: hidden;">
         <tbody>
            <!--header-->
            <tr>
               <td style="text-align: center;padding: 22px;">
                  <img style="width:12.5em" src="${process.env.WEB_ENDPOINT}/assets/images/logo.png" alt="logo">
               </td>
            </tr>
            <!--header-end-->
            <tr>
               <td>
                  <table style="background-color: #fff;border: 1px solid #CFCFCF;padding: 1.25em;
                        border-radius: 20px;margin-bottom: 42px;margin:0 auto;max-width: 760px;    width: 100%;
                        table-layout: fixed;overflow-x: hidden;" class="inner-table">
                     <tbody>
                        <!--top-section-->`
let emailFooter_ar = `
<!--regard-section-->
                        <tr>
                           <td>
                              <table style="width: 100%;
                                 opacity: 1;  border-top: 1px solid #DFDFDF;margin-top: 15px;
                                 ">
                                 <tbody>
                                    <tr>
                                       <td>
                                          <p style="text-align: left;
                                             font-size: 0.9375em;
                                             font-weight: normal;
                                             line-height: 21px;
                                             letter-spacing: 0px;
                                             color: #1B1B1B;
                                             opacity: 1;margin: 15px 0 0 0;">يرجى تسجيل الدخول إلى حسابك في <a
                                             href="${process.env.WEB_ENDPOINT}" style="color:#014CC4;text-decoration: none;">www.demo.net</a> لاستكشاف مجموعة كاملة من
                                             خدمات
                                             والميزات المتاحة لك. إذا كان لديك أي أسئلة أو بحاجة إلى المساعدة، من فضلك
                                             اتصال
                                             us at <a href="mailto:support@demo.net" style="color:#014CC4;text-decoration: none;">support@demo.net</a>.
                                          </p>
                                          <p style="text-align: left;
                                             font-size: 0.9375em;
                                             font-weight: normal;
                                             line-height: 21px;
                                             letter-spacing: 0px;
                                             color: #1B1B1B;
                                             opacity: 1;margin: 10px 0 0 0;">شكرا لاختيارك دوكتوم. ونحن نتطلع إلى توفير رعاية استثنائية لك.
                                          </p>
                                          <p style="text-align: left;
                                             font-size: 0.9375em;
                                             font-weight: 600;
                                             line-height: 21px;
                                             letter-spacing: 0px;
                                             color: #1B1B1B;
                                             opacity: 1;margin: 20px 0 0 0;">أطيب التحيات،
                                          </p>
                                          <p style="text-align: left;
                                             font-size: 0.9375em;
                                             font-weight: 600;
                                             line-height: 21px;
                                             letter-spacing: 0px;
                                             color: #1B1B1B;
                                             opacity: 1;margin: 0px 0 0 0;">فريق دوكتوم
                                          </p>
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                           </td>
                        </tr>
<tr>
<td>
   <div class="alignment" style="
         text-align: center;padding: 1.875em 1em;background: #014CC4 0% 0% no-repeat padding-box;margin-top: 1.875em;border-radius: 10px;
         ">
      <table border="0" cellpadding="0" cellspacing="0" class="social-table"
         role="presentation" style=" display: inline-block; ">
         <tbody>
            <tr>
               <td style="display: inline-block;text-align: center;">
                  <a href="" target="_blank"><img alt="facebook" height="40" width="40"
                        src="${process.env.WEB_ENDPOINT}/assets/images/facebook.png"
                        style="width:40px;height:40px;display: block; border: 0;text-align: center;margin: auto;"
                        title="Facebook" ></a>
                  <a href="" style="text-align: center;
                        font-size: 12px;
                        font-weight: 500;
                        line-height: 34px;
                        letter-spacing: 0px;
                        color: #fff;
                        opacity: 1;text-decoration: none;">معلومات عنا</a>
               </td>
               <td style="display: inline-block;padding-left: 25px;">
               <a href="" target="_blank"><img alt="facebook" height="40" width="40"
                        src="${process.env.WEB_ENDPOINT}/assets/images/instagram.png"
                        style="width:40px;height:40px;display: block; border: 0;text-align: center;margin: auto;"
                        title="Facebook" ></a>
                  <a href="" style="text-align: center;
                        font-size: 12px;
                        font-weight: 500;
                        line-height: 34px;
                        letter-spacing: 0px;
                        color: #fff;
                        opacity: 1;text-decoration: none;">الأسئلة الشائعة</a>
               </td>
               <td style="display: inline-block;padding-left: 25px;"><a href="" target="_blank"><img alt="facebook" height="40" width="40"
               src="${process.env.WEB_ENDPOINT}/assets/images/linkedin.png"
               style="width:40px;height:40px;display: block; border: 0;text-align: center;margin: auto;"
               title="Facebook" ></a>
         <a href="" style="text-align: center;
               font-size: 12px;
               font-weight: 500;
               line-height: 34px;
               letter-spacing: 0px;
               color: #fff;
               opacity: 1;text-decoration: none;">اتصال
               نحن</a>
               </td>
               <td style="display: inline-block;padding-left: 25px;"><a href="" target="_blank"><img alt="facebook" height="40" width="40"
               src="${process.env.WEB_ENDPOINT}/assets/images/twitter.png"
               style="width:40px;height:40px;display: block; border: 0;text-align: center;margin: auto;"
               title="Facebook" ></a>
         <a href="" style="text-align: center;
               font-size: 12px;
               font-weight: 500;
               line-height: 34px;
               letter-spacing: 0px;
               color: #fff;
               opacity: 1;text-decoration: none;">مدونة</a>
               </td>
            </tr>
         </tbody>
      </table>
   </div>
</td>
</tr>
<!--footer-end-->
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</center>
</body>

</html>`

//------------------french----------------------
let emailHeader_fr = `<!DOCTYPE html>
<html>

<head>
   <meta name="viewport" content="width=device-width" />
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
   <title>Registration</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=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap"
      rel="stylesheet">
</head>

<body>
   <center
      style="max-width: 760px;width:100%;margin:45px auto;font-family: 'nunito', sans-serif; table-layout: fixed;overflow-x: hidden;">
      <table style="max-width: 760px;width:100%;background-color: #fff;overflow-x: hidden;">
         <tbody>
            <!--header-->
            <tr>
               <td style="text-align: center;padding: 22px;">
                  <img style="width:12.5em" src="${process.env.WEB_ENDPOINT}/assets/images/logo.png" alt="logo">
               </td>
            </tr>
            <!--header-end-->
            <tr>
               <td>
                  <table style="background-color: #fff;border: 1px solid #CFCFCF;padding: 1.25em;
                        border-radius: 20px;margin-bottom: 42px;margin:0 auto;max-width: 760px;    width: 100%;
                        table-layout: fixed;overflow-x: hidden;" class="inner-table">
                     <tbody>
                        <!--top-section-->`
let emailFooter_fr = `
<!--regard-section-->
                        <tr>
                           <td>
                              <table style="width: 100%;
                                 opacity: 1;  border-top: 1px solid #DFDFDF;margin-top: 15px;
                                 ">
                                 <tbody>
                                    <tr>
                                       <td>
                                          <p style="text-align: left;
                                             font-size: 0.9375em;
                                             font-weight: normal;
                                             line-height: 21px;
                                             letter-spacing: 0px;
                                             color: #1B1B1B;
                                             opacity: 1;margin: 15px 0 0 0;">Veuillez vous connecter à votre compte sur <a
                                             href="${process.env.WEB_ENDPOINT}" style="color:#014CC4;text-decoration: none;">www.telemedicine.trigma.in</a> pour explorer toute la gamme de
                                             prestations de service
                                             et les fonctionnalités à votre disposition. Si vous avez des questions ou avez besoin d'aide, veuillez
                                             contact
                                             nous à<a href="mailto:support@demo.net" style="color:#014CC4;text-decoration: none;">support@demo.net</a>.
                                          </p>
                                          <p style="text-align: left;
                                             font-size: 0.9375em;
                                             font-weight: normal;
                                             line-height: 21px;
                                             letter-spacing: 0px;
                                             color: #1B1B1B;
                                             opacity: 1;margin: 10px 0 0 0;">Merci d'avoir choisi Dr. Hivey. Nous sommes impatients de vous prodiguer des soins exceptionnels.
                                          </p>
                                          <p style="text-align: left;
                                             font-size: 0.9375em;
                                             font-weight: 600;
                                             line-height: 21px;
                                             letter-spacing: 0px;
                                             color: #1B1B1B;
                                             opacity: 1;margin: 20px 0 0 0;">Cordialement,
                                          </p>
                                          <p style="text-align: left;
                                             font-size: 0.9375em;
                                             font-weight: 600;
                                             line-height: 21px;
                                             letter-spacing: 0px;
                                             color: #1B1B1B;
                                             opacity: 1;margin: 0px 0 0 0;">L'équipe Dr. Hivey
                                          </p>
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                           </td>
                        </tr>
<tr>
<td>
   <div class="alignment" style="
         text-align: center;padding: 1.875em 1em;background: #014CC4 0% 0% no-repeat padding-box;margin-top: 1.875em;border-radius: 10px;
         ">
      <table border="0" cellpadding="0" cellspacing="0" class="social-table"
         role="presentation" style=" display: inline-block; ">
         <tbody>
            <tr>
               <td style="display: inline-block;text-align: center;">
                  <a href="" target="_blank"><img alt="facebook" height="40" width="40"
                        src="${process.env.WEB_ENDPOINT}/assets/images/facebook.png"
                        style="width:40px;height:40px;display: block; border: 0;text-align: center;margin: auto;"
                        title="Facebook" ></a>
                  <a href="" style="text-align: center;
                        font-size: 12px;
                        font-weight: 500;
                        line-height: 34px;
                        letter-spacing: 0px;
                        color: #fff;
                        opacity: 1;text-decoration: none;">À propos de nous</a>
               </td>
               <td style="display: inline-block;padding-left: 25px;">
               <a href="" target="_blank"><img alt="facebook" height="40" width="40"
                        src="${process.env.WEB_ENDPOINT}/assets/images/instagram.png"
                        style="width:40px;height:40px;display: block; border: 0;text-align: center;margin: auto;"
                        title="Facebook" ></a>
                  <a href="" style="text-align: center;
                        font-size: 12px;
                        font-weight: 500;
                        line-height: 34px;
                        letter-spacing: 0px;
                        color: #fff;
                        opacity: 1;text-decoration: none;">FAQ's</a>
               </td>
               <td style="display: inline-block;padding-left: 25px;"><a href="" target="_blank"><img alt="facebook" height="40" width="40"
               src="${process.env.WEB_ENDPOINT}/assets/images/linkedin.png"
               style="width:40px;height:40px;display: block; border: 0;text-align: center;margin: auto;"
               title="Facebook" ></a>
         <a href="" style="text-align: center;
               font-size: 12px;
               font-weight: 500;
               line-height: 34px;
               letter-spacing: 0px;
               color: #fff;
               opacity: 1;text-decoration: none;">Contact
               Nous</a>
               </td>
               <td style="display: inline-block;padding-left: 25px;"><a href="" target="_blank"><img alt="facebook" height="40" width="40"
               src="${process.env.WEB_ENDPOINT}/assets/images/twitter.png"
               style="width:40px;height:40px;display: block; border: 0;text-align: center;margin: auto;"
               title="Facebook" ></a>
         <a href="" style="text-align: center;
               font-size: 12px;
               font-weight: 500;
               line-height: 34px;
               letter-spacing: 0px;
               color: #fff;
               opacity: 1;text-decoration: none;">Blog</a>
               </td>
            </tr>
         </tbody>
      </table>
   </div>
</td>
</tr>
<!--footer-end-->
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</center>
</body>

</html>`


exports.forgotPasswordTemplate = (requiredData) => {
   return (
      {
         "subject": 'Forgot password',
         "html": `${emailHeader}
          <tr>
          <td>
             <table style="background-color: #fff;border: 1px solid #CFCFCF;padding: 1.25em;
                   border-radius: 20px;margin-bottom: 42px;margin:0 auto;max-width: 760px;    width: 100%;
                   table-layout: fixed;overflow-x: hidden;" class="inner-table">
                <tbody>
                   <!--top-section-->
                   <tr>
                      <td
                         style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
                         <div style="text-align: center;position: relative;">
                            <img src="registration.png" alt="image" style="width: 16em;position: relative;
                                  z-index: 1;">
                            <div style="padding: 1em">
                               <p
                                  style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
                                  Thanks for registration
                               </p>
                               <p
                                  style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
                                  Hi , ${requiredData.fullName}
                               </p>
                               <p style="font-size:0.9375em;font-weight:normal;
                                     margin: 10px auto 0;color:#787878;">We are delighted to welcome you to
                                  Dr. Hivey. Your account has been successfully created, and we are excited to have
                                  you as a part of our healthcare family.
                               </p>
                            </div>
                         </div>
                      </td>
                   </tr>
                   <!--top-section-end-->
                   <tr>
                      <td style="text-align: left;padding:0px;">
                         <h2 style="margin:1em 0 12px;text-align: left;
                               font-size:1.2em; font-weight: 700; line-height: 34px;
                               letter-spacing: 0px;
                               color: #1E232C;
                               opacity: 1;">
                            With your new account, you can:
                         </h2>
                         <table style="
                               background: #FFFFFF 0% 0% no-repeat padding-box;
                            
                               opacity: 1;
                               width: 100%;
                               max-width: 760px;
                               width: 100%;
                               table-layout: fixed;
                               ">
                            <tbody>
                               <tr>
                                  <td >
                                     <div style="display: inline-block;vertical-align: top; margin-bottom: 12px;">
                                        <table
                                           style="width: 320px;max-width: 320px;width: 100%;table-layout: fixed;margin: auto;">
                                           <tbody>
                                              <tr>
                                                 <td style="vertical-align: baseline;width: 20%;"><span style="display: inline-block;
                                                   margin-right: 10px;
                                                   vertical-align: middle;
                                                   width: 45px;">
                                                       <img src="calender.png" alt="" style="height: 45px;vertical-align: middle;"></span>
                                                 </td>
                                                 <td>
                                                    <span style="text-align: left;width: 80%;
                                                      font-size: 0.9875em;
                                                      font-weight:500;
                                                      line-height: 21px;
                                                      letter-spacing: 0px;
                                                      color: #1B1B1B;
                                                      opacity: 1;list-style: none;margin: 0;">Schedule appointments online</span>
                                                 </td>
                                              </tr>
                                           </tbody>
                                        </table>
                                     </div>
                                     <div style="display: inline-block;vertical-align: top; margin-bottom: 12px;">
                                        <table
                                           style="width: 320px;max-width: 320px;width: 100%;table-layout: fixed;margin: auto;">
                                           <tbody>
                                              <tr>
                                                 <td style="vertical-align: baseline;width: 20%;"><span style="display: inline-block;
                                                   margin-right: 10px;
                                                   vertical-align: middle;
                                                   width: 45px;">
                                                       <img src="medical-record.png" alt="" style="height: 45px;vertical-align: middle;"></span>
                                                 </td>
                                                 <td>
                                                    <span style="text-align: left;width: 80%;
                                                      font-size: 0.9875em;
                                                      font-weight:500;
                                                      line-height: 21px;
                                                      letter-spacing: 0px;
                                                      color: #1B1B1B;
                                                      opacity: 1;list-style: none;margin: 0;">Access your medical records</span>
                                                 </td>
                                              </tr>
                                           </tbody>
                                        </table>
                                     </div>
                                     <div style="display: inline-block;vertical-align: top; margin-bottom: 12px;">
                                        <table
                                           style="width: 320px;max-width: 320px;width: 100%;table-layout: fixed;margin: auto;">
                                           <tbody>
                                              <tr>
                                                 <td style="vertical-align: baseline;width: 20%;"><span style="display: inline-block;
                                                   margin-right: 10px;
                                                   vertical-align: middle;
                                                   width: 45px;">
                                                       <img src="notifications.png" alt="" style="height: 45px;vertical-align: middle;"></span>
                                                 </td>
                                                 <td>
                                                    <span style="text-align: left;width: 80%;
                                                      font-size: 0.9875em;
                                                      font-weight:500;
                                                      line-height: 21px;
                                                      letter-spacing: 0px;
                                                      color: #1B1B1B;
                                                      opacity: 1;list-style: none;margin: 0;">Receive important health updates</span>
                                                 </td>
                                              </tr>
                                           </tbody>
                                        </table>
                                     </div>
                                     <div style="display: inline-block;vertical-align: top; margin-bottom: 12px;">
                                        <table
                                           style="width: 320px;max-width: 320px;width: 100%;table-layout: fixed;margin: auto;">
                                           <tbody>
                                              <tr>
                                                 <td style="vertical-align: baseline;width: 20%;"><span style="display: inline-block;
                                                   margin-right: 10px;
                                                   vertical-align: middle;
                                                   width: 45px;">
                                                       <img src="near-hospitals.png" alt="" style="height: 45px;vertical-align: middle;"></span>
                                                 </td>
                                                 <td>
                                                    <span style="text-align: left;width: 80%;
                                                      font-size: 0.9875em;
                                                      font-weight:500;
                                                      line-height: 21px;
                                                      letter-spacing: 0px;
                                                      color: #1B1B1B;
                                                      opacity: 1;list-style: none;margin: 0;">Find nearby doctors & hospitals</span>
                                                 </td>
                                              </tr>
                                           </tbody>
                                        </table>
                                     </div>
                                  </td>
                                  <!-- <td style="vertical-align: top;padding: 0px 0px 15px 0;">
                                        <table >
                                           <tbody>
                                              <tr>
                                                 <td style="vertical-align: baseline;"><span style="display: inline-block;
                                                    margin-right: 10px;
                                                    vertical-align: middle;
                                                    width: 45px;">
                                                    <img src="medical-record.png" alt=""
                                                       style="height: 45px;vertical-align: middle;"></span>
                                                 </td>
                                                 <td>
                                                    <span style="text-align: left;
                                                       font-size: 0.9875em;
                                                       font-weight:500;
                                                       line-height: 21px;
                                                       letter-spacing: 0px;
                                                       color: #1B1B1B;
                                                       opacity: 1;list-style: none;margin: 0;">Access your medical records <span style="
                                                       display: inline-block;
                                                       width: 18px;
                                                       vertical-align: middle;
                                                       "></span> </span>
                                                    </span>
                                                 </td>
                                              </tr>
                                           </tbody>
                                        </table>
                                     </td> -->
                               </tr>
                               <!-- <tr>
                                     <td style="vertical-align: top;padding: 0px 0px 15px 0;">
                                        <table 
                                           >
                                           <tbody>
                                              <tr>
                                                 <td style="vertical-align: baseline;"><span style="display: inline-block;
                                                    margin-right: 10px;
                                                    vertical-align: middle;
                                                    width: 45px;">
                                                    <img src="notifications.png" alt=""
                                                       style="height: 45px;vertical-align: middle;"></span>
                                                 </td>
                                                 <td>
                                                    <span style="text-align: left;
                                                       font-size: 0.9875em;
                                                       font-weight:500;
                                                       line-height: 21px;
                                                       letter-spacing: 0px;
                                                       color: #1B1B1B;
                                                       opacity: 1;list-style: none;margin: 0;">Receive important health updates <span style="
                                                       display: inline-block;
                                                       width: 18px;
                                                       vertical-align: middle;
                                                       "></span> </span>
                                                 </td>
                                              </tr>
                                           </tbody>
                                        </table>
                                     </td>
                                     <td style="vertical-align: top;padding: 0px 0px 15px 0;">
                                        <table >
                                           <tbody>
                                              <tr>
                                                 <td style="vertical-align: baseline;"><span style="display: inline-block;
                                                    margin-right: 10px;
                                                    vertical-align: middle;
                                                    width: 45px;">
                                                    <img src="near-hospitals.png" alt=""
                                                       style="height: 45px;vertical-align: middle;"></span>
                                                 </td>
                                                 <td>
                                                    <span style="text-align: left;
                                                       font-size: 0.9875em;
                                                       font-weight:500;
                                                       line-height: 21px;
                                                       letter-spacing: 0px;
                                                       color: #1B1B1B;
                                                       opacity: 1;list-style: none;margin: 0;">Find nearby doctors & hospitals <span style="
                                                       display: inline-block;
                                                       width: 18px;
                                                       vertical-align: middle;
                                                       "></span> </span>
                                                    </span>
                                                 </td>
                                              </tr>
                                           </tbody>
                                        </table>
                                     </td>
                                  </tr> -->
                            </tbody>
                         </table>
                      </td>
                   </tr>
                   <!--regard-section-->
                   <tr>
                      <td>
                         <table style="width: 100%;
                            opacity: 1;  border-top: 1px solid #DFDFDF;margin-top: 15px;
                            ">
                            <tbody>
                               <tr>
                                  <td>
                                     <p style="text-align: left;
                                        font-size: 0.9375em;
                                        font-weight: normal;
                                        line-height: 21px;
                                        letter-spacing: 0px;
                                        color: #1B1B1B;
                                        opacity: 1;margin: 15px 0 0 0;">Please log in to your account at <a
                                        href="#" style="color:#014CC4;text-decoration: none;">www.telemedicine.trigma.in</a> to explore the full range of
                                        services
                                        and features available to you. If you have any questions or need assistance, please
                                        contact
                                        us at <a href="#" style="color:#014CC4;text-decoration: none;">support@demo.net</a>.
                                     </p>
                                     <p style="text-align: left;
                                        font-size: 0.9375em;
                                        font-weight: normal;
                                        line-height: 21px;
                                        letter-spacing: 0px;
                                        color: #1B1B1B;
                                        opacity: 1;margin: 10px 0 0 0;">Thank you for choosing Dr. Hivey. We look forward to providing you with exceptional care.
                                     </p>
                                     <p style="text-align: left;
                                        font-size: 0.9375em;
                                        font-weight: 600;
                                        line-height: 21px;
                                        letter-spacing: 0px;
                                        color: #1B1B1B;
                                        opacity: 1;margin: 20px 0 0 0;">Best Regards
                                     </p>
                                     <p style="text-align: left;
                                        font-size: 0.9375em;
                                        font-weight: 600;
                                        line-height: 21px;
                                        letter-spacing: 0px;
                                        color: #1B1B1B;
                                        opacity: 1;margin: 0px 0 0 0;">Dr. Hivey.
                                     </p>
                                  </td>
                               </tr>
                            </tbody>
                         </table>
                      </td>
                   </tr>
         `
      }
   )
}

// forgot  password updated successfully

exports.forgotPasswordUpdatedSuccessfullyTemplate = (requiredData) => {
   return (
      {
         "subject": 'forgot password updated successfully',
         "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}/assets/images/logo1.png" alt="logo">
                         <h4 style=" font-size:18px;font-weight:600;margin: 10px 0 0 0;color:#111;">Hello ${requiredData.fullName}! <br>
                         To reset your password updated successfully, please login to click the button below.</h4>
                     
                     </td>
                 </tr>
                 <tr>
                     <td style="text-align: center;display: block;margin: 20px;">
                     <a target="_blank"  style="background: #0048ba;border: none;color: #fff;font-size: 15px;padding: 14px 20px;cursor: pointer;text-decoration:none;" href="${process.env.WEB_ENDPOINT}/auth/login">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@beneikel.com" style="color:#111;cursor:default;text-decoration: none;">support@beneikel.com</a>
                             </p>
                     
                     </td>
                 </tr>
             
             </table>
         </div>
         </td>
     </tr>
         `
      }
   )
}
// forget password template
exports.forgetPasswordTemplate = (requiredData) => {
let generatedotp = requiredData.generatedOTP;
let finalotp = String(generatedotp); 
   return (

      {
         "subject": 'Forgot password',
         "html": `${emailHeader}
                       <tr>
                              <td
                                 style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
                                 <div style="text-align: center;position: relative;">
                                    <img src="${process.env.WEB_ENDPOINT}/assets/images/forget-password.png" alt="image" style="width: 16em;position: relative;
                                       z-index: 1;">
                                    <div style="padding: 1em">
                                       <p
                                          style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
                                          Forgot password
                                       </p>
                                       <p
                                          style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
                                          Hi , ${requiredData.userFullName}
                                       </p>
                                       <p style="font-size:0.9375em;font-weight:normal;
                                          margin: 10px auto 0;color:#787878;">We received a request to reset the password for your account. If you didn't request this, you can safely ignore this email.
                                       </p>
                                    </div>
                                 </div>
                              </td>
                           </tr>
                           <!--top-section-end-->
                           <tr>
                              <td style="padding:0px;">
                                 <h2 style="margin:1em 0 12px;text-align: center;
                                    font-size:1.2em; font-weight: 700; line-height: 34px;
                                    letter-spacing: 0px;
                                    color: #1E232C;
                                    opacity: 1;">
                                   Request OTP
                                 </h2>
                                 <div style="text-align: center;">
                                 <span style="display: inline-block;
                                 background: #014CC4;
                                 padding: 0.8em 1.2em;
                                 font-size: 18px;
                                 font-weight: 700;
                                 color: #ffffff;
                                 cursor:pointer;
                                 text-decoration: none;
                                 border-radius: 7px;text-align: center;margin: 0px 7px 15px 0px;
                                ">${finalotp.charAt(0)}</span>
                                 <span style="display: inline-block;
                                 background: #014CC4;
                                 padding: 0.8em 1.2em;
                                 font-size: 18px;
                                 font-weight: 700;
                                 cursor:pointer;
                                 color: #ffffff;
                                 text-decoration: none;
                                 border-radius: 7px;text-align: center;margin: 0px 7px 15px 0px;
                                ">${finalotp.charAt(1)}</span>
                                   <span style="display: inline-block;
                                   background: #014CC4;
                                   padding: 0.8em 1.2em;
                                   font-size: 18px;
                                   font-weight: 700;
                                   cursor:pointer;
                                   color: #ffffff;
                                   text-decoration: none;
                                   border-radius: 7px;text-align: center;margin: 0px 7px 15px 0px;
                                  ">${finalotp.charAt(2)}</span>
                                  <span style="display: inline-block;
                                  background: #014CC4;
                                  padding: 0.8em 1.2em;
                                  font-size: 18px;
                                  font-weight: 700;
                                  cursor:pointer;
                                  color: #ffffff;
                                  text-decoration: none;
                                  border-radius: 7px;text-align: center;margin: 0px 7px 15px 0px;
                                 ">${finalotp.charAt(3)}</span>
                                </div>
                                    <p style="text-align: center;;
                                    font-size: 0.9375em;
                                    font-weight: normal;
                                    line-height: 21px;
                                    letter-spacing: 0px;
                                    color: #1B1B1B;
                                    opacity: 1;margin: 10px 0 0 0;">If you did not request this password reset, please ignore this email. Your password will remain unchanged.

                                 </p>
                              </td>
                           </tr>
            ${emailFooter}`
      }
   )

}
// forget password template arabic
exports.forgetPasswordTemplate_ar = (requiredData) => {
   let generatedotp = requiredData.generatedOTP;
   let finalotp = String(generatedotp); 
      return (
   
         {
            "subject": 'هل نسيت كلمة السر',
            "html": `${emailHeader_ar}
                         <tr>
   <td style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
      <div style="text-align: center;position: relative;">
         <img src="${process.env.WEB_ENDPOINT}/assets/images/forget-password.png" alt="image" style="width: 16em;position: relative; z-index: 1;">
         <div style="padding: 1em">
            <p style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
               نسيت كلمة المرور
            </p>
            <p style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
               مرحباً, ${requiredData.userFullName}
            </p>
            <p style="font-size:0.9375em;font-weight:normal;margin: 10px auto 0;color:#787878;">
               لقد تلقينا طلباً لإعادة تعيين كلمة المرور لحسابك. إذا لم تكن قد طلبت ذلك، يمكنك تجاهل هذا البريد الإلكتروني بأمان.
            </p>
         </div>
      </div>
   </td>
</tr>
<!--top-section-end-->
<tr>
   <td style="padding:0px;">
      <h2 style="margin:1em 0 12px;text-align: center;font-size:1.2em; font-weight: 700; line-height: 34px;letter-spacing: 0px;color: #1E232C;opacity: 1;">
         طلب رمز التحقق
      </h2>
      <div style="text-align: center;">
         <span style="display: inline-block;background: #014CC4;padding: 0.8em 1.2em;font-size: 18px;font-weight: 700;color: #ffffff;cursor:pointer;text-decoration: none;border-radius: 7px;text-align: center;margin: 0px 7px 15px 0px;">
            ${finalotp.charAt(0)}
         </span>
         <span style="display: inline-block;background: #014CC4;padding: 0.8em 1.2em;font-size: 18px;font-weight: 700;cursor:pointer;color: #ffffff;text-decoration: none;border-radius: 7px;text-align: center;margin: 0px 7px 15px 0px;">
            ${finalotp.charAt(1)}
         </span>
         <span style="display: inline-block;background: #014CC4;padding: 0.8em 1.2em;font-size: 18px;font-weight: 700;cursor:pointer;color: #ffffff;text-decoration: none;border-radius: 7px;text-align: center;margin: 0px 7px 15px 0px;">
            ${finalotp.charAt(2)}
         </span>
         <span style="display: inline-block;background: #014CC4;padding: 0.8em 1.2em;font-size: 18px;font-weight: 700;cursor:pointer;color: #ffffff;text-decoration: none;border-radius: 7px;text-align: center;margin: 0px 7px 15px 0px;">
            ${finalotp.charAt(3)}
         </span>
      </div>
      <p style="text-align: center;font-size: 0.9375em;font-weight: normal;line-height: 21px;letter-spacing: 0px;color: #1B1B1B;opacity: 1;margin: 10px 0 0 0;">
         إذا لم تكن قد طلبت إعادة تعيين كلمة المرور، يرجى تجاهل هذا البريد الإلكتروني. ستظل كلمة المرور الخاصة بك كما هي.
      </p>
   </td>
</tr>

               ${emailFooter_ar}`
         }
      )
   
   }
// forget password template french
exports.forgetPasswordTemplate_fr = (requiredData) => {
   let generatedotp = requiredData.generatedOTP;
   let finalotp = String(generatedotp); 
      return (
   
         {
            "subject": 'Mot de passe oublié',
            "html": `${emailHeader_fr}
                          <tr>
   <td style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
      <div style="text-align: center;position: relative;">
         <img src="${process.env.WEB_ENDPOINT}/assets/images/forget-password.png" alt="image" style="width: 16em;position: relative; z-index: 1;">
         <div style="padding: 1em">
            <p style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
               Mot de passe oublié
            </p>
            <p style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
               Bonjour, ${requiredData.userFullName}
            </p>
            <p style="font-size:0.9375em;font-weight:normal;margin: 10px auto 0;color:#787878;">
               Nous avons reçu une demande de réinitialisation de mot de passe pour votre compte. Si vous n'avez pas demandé cela, vous pouvez ignorer ce courriel en toute sécurité.
            </p>
         </div>
      </div>
   </td>
</tr>
<!--top-section-end-->
<tr>
   <td style="padding:0px;">
      <h2 style="margin:1em 0 12px;text-align: center; font-size:1.2em; font-weight: 700; line-height: 34px; letter-spacing: 0px; color: #1E232C; opacity: 1;">
         Demande de OTP
      </h2>
      <div style="text-align: center;">
         <span style="display: inline-block; background: #014CC4; padding: 0.8em 1.2em; font-size: 18px; font-weight: 700; color: #ffffff; cursor:pointer; text-decoration: none; border-radius: 7px;text-align: center;margin: 0px 7px 15px 0px;">
            ${finalotp.charAt(0)}
         </span>
         <span style="display: inline-block; background: #014CC4; padding: 0.8em 1.2em; font-size: 18px; font-weight: 700; cursor:pointer; color: #ffffff; text-decoration: none; border-radius: 7px;text-align: center;margin: 0px 7px 15px 0px;">
            ${finalotp.charAt(1)}
         </span>
         <span style="display: inline-block; background: #014CC4; padding: 0.8em 1.2em; font-size: 18px; font-weight: 700; cursor:pointer; color: #ffffff; text-decoration: none; border-radius: 7px;text-align: center;margin: 0px 7px 15px 0px;">
            ${finalotp.charAt(2)}
         </span>
         <span style="display: inline-block; background: #014CC4; padding: 0.8em 1.2em; font-size: 18px; font-weight: 700; cursor:pointer; color: #ffffff; text-decoration: none; border-radius: 7px;text-align: center;margin: 0px 7px 15px 0px;">
            ${finalotp.charAt(3)}
         </span>
      </div>
      <p style="text-align: center; font-size: 0.9375em; font-weight: normal; line-height: 21px; letter-spacing: 0px; color: #1B1B1B; opacity: 1;margin: 10px 0 0 0;">
         Si vous n'avez pas demandé cette réinitialisation de mot de passe, veuillez ignorer ce courriel. Votre mot de passe restera inchangé.
      </p>
   </td>
</tr>

               ${emailFooter_fr}`
         }
      )
   
   }


// signup template
exports.signUpTemplate = (requiredData) => {
   return (
      {
         "subject": 'You’ve successfully registered',
         "html": `${emailHeader}
       <tr>
               <td>
                  <table style="background-color: #fff;
                        border-radius: 20px;margin-bottom: 42px;margin:0 auto;max-width: 760px;    width: 100%;
                        table-layout: fixed;overflow-x: hidden;" class="inner-table">
                     <tbody>
                        <!--top-section-->
                        <tr>
                           <td
                              style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
                              <div style="text-align: center;position: relative;">
                                 <img src="${process.env.WEB_ENDPOINT}/assets/images/registration.png" alt="image" style="width: 16em;position: relative;
                                       z-index: 1;">
                                 <div style="padding: 1em">
                                    <p
                                       style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
                                       Thanks for registration
                                    </p>
                                    <p
                                       style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
                                       Hi,  ${requiredData.fullName ? requiredData.fullName : requiredData.hospital_name}!
                                    </p>
                                    <p style="font-size:0.9375em;font-weight:normal;
                                          margin: 10px auto 0;color:#787878;">We are delighted to welcome you to
                                       Dr. Hivey. Your account has been successfully created, and we are excited to have
                                       you as a part of our healthcare family.
                                    </p>
                                 </div>
                              </div>
                           </td>
                        </tr>
                        <!--top-section-end-->
                        <tr>
                           <td style="text-align: left;padding:0px;">
                              <h2 style="margin:1em 0 12px;text-align: left;
                                    font-size:1.2em; font-weight: 700; line-height: 34px;
                                    letter-spacing: 0px;
                                    color: #1E232C;
                                    opacity: 1;">
                                 With your new account, you can:
                              </h2>
                              <table style="
                                    background: #FFFFFF 0% 0% no-repeat padding-box;
                                 
                                    opacity: 1;
                                    width: 100%;
                                    max-width: 760px;
                                    width: 100%;
                                    table-layout: fixed;
                                    ">
                                 <tbody>
                                    <tr>
                                       <td >
                                          <div style="display: inline-block;vertical-align: top; margin-bottom: 12px;">
                                             <table
                                                style="width: 320px;max-width: 320px;width: 100%;table-layout: fixed;margin: auto;">
                                                <tbody>
                                                   <tr>
                                                      <td style="vertical-align: baseline;width: 20%;"><span style="display: inline-block;
                                                        margin-right: 10px;
                                                        vertical-align: middle;
                                                        width: 45px;">
                                                            <img src="${process.env.WEB_ENDPOINT}/assets/images/calender.png" alt="" style="height: 45px;vertical-align: middle;"></span>
                                                      </td>
                                                      <td>
                                                         <span style="text-align: left;width: 80%;
                                                           font-size: 0.9875em;
                                                           font-weight:500;
                                                           line-height: 21px;
                                                           letter-spacing: 0px;
                                                           color: #1B1B1B;
                                                           opacity: 1;list-style: none;margin: 0;">Schedule appointments online</span>
                                                      </td>
                                                   </tr>
                                                </tbody>
                                             </table>
                                          </div>
                                          <div style="display: inline-block;vertical-align: top; margin-bottom: 12px;">
                                             <table
                                                style="width: 320px;max-width: 320px;width: 100%;table-layout: fixed;margin: auto;">
                                                <tbody>
                                                   <tr>
                                                      <td style="vertical-align: baseline;width: 20%;"><span style="display: inline-block;
                                                        margin-right: 10px;
                                                        vertical-align: middle;
                                                        width: 45px;">
                                                            <img src="${process.env.WEB_ENDPOINT}/assets/images/medical-record.png" alt="" style="height: 45px;vertical-align: middle;"></span>
                                                      </td>
                                                      <td>
                                                         <span style="text-align: left;width: 80%;
                                                           font-size: 0.9875em;
                                                           font-weight:500;
                                                           line-height: 21px;
                                                           letter-spacing: 0px;
                                                           color: #1B1B1B;
                                                           opacity: 1;list-style: none;margin: 0;">Access your medical records</span>
                                                      </td>
                                                   </tr>
                                                </tbody>
                                             </table>
                                          </div>
                                          <div style="display: inline-block;vertical-align: top; margin-bottom: 12px;">
                                             <table
                                                style="width: 320px;max-width: 320px;width: 100%;table-layout: fixed;margin: auto;">
                                                <tbody>
                                                   <tr>
                                                      <td style="vertical-align: baseline;width: 20%;"><span style="display: inline-block;
                                                        margin-right: 10px;
                                                        vertical-align: middle;
                                                        width: 45px;">
                                                            <img src="${process.env.WEB_ENDPOINT}/assets/images/notifications.png" alt="" style="height: 45px;vertical-align: middle;"></span>
                                                      </td>
                                                      <td>
                                                         <span style="text-align: left;width: 80%;
                                                           font-size: 0.9875em;
                                                           font-weight:500;
                                                           line-height: 21px;
                                                           letter-spacing: 0px;
                                                           color: #1B1B1B;
                                                           opacity: 1;list-style: none;margin: 0;">Receive important health updates</span>
                                                      </td>
                                                   </tr>
                                                </tbody>
                                             </table>
                                          </div>
                                          <div style="display: inline-block;vertical-align: top; margin-bottom: 12px;">
                                             <table
                                                style="width: 320px;max-width: 320px;width: 100%;table-layout: fixed;margin: auto;">
                                                <tbody>
                                                   <tr>
                                                      <td style="vertical-align: baseline;width: 20%;"><span style="display: inline-block;
                                                        margin-right: 10px;
                                                        vertical-align: middle;
                                                        width: 45px;">
                                                            <img src="${process.env.WEB_ENDPOINT}/assets/images/near-hospitals.png" alt="" style="height: 45px;vertical-align: middle;"></span>
                                                      </td>
                                                      <td>
                                                         <span style="text-align: left;width: 80%;
                                                           font-size: 0.9875em;
                                                           font-weight:500;
                                                           line-height: 21px;
                                                           letter-spacing: 0px;
                                                           color: #1B1B1B;
                                                           opacity: 1;list-style: none;margin: 0;">Find nearby doctors & hospitals</span>
                                                      </td>
                                                   </tr>
                                                </tbody>
                                             </table>
                                          </div>
                                       </td>
                                       <!-- <td style="vertical-align: top;padding: 0px 0px 15px 0;">
                                             <table >
                                                <tbody>
                                                   <tr>
                                                      <td style="vertical-align: baseline;"><span style="display: inline-block;
                                                         margin-right: 10px;
                                                         vertical-align: middle;
                                                         width: 45px;">
                                                         <img src="${process.env.WEB_ENDPOINT}/assets/images/medical-record.png" alt=""
                                                            style="height: 45px;vertical-align: middle;"></span>
                                                      </td>
                                                      <td>
                                                         <span style="text-align: left;
                                                            font-size: 0.9875em;
                                                            font-weight:500;
                                                            line-height: 21px;
                                                            letter-spacing: 0px;
                                                            color: #1B1B1B;
                                                            opacity: 1;list-style: none;margin: 0;">Access your medical records <span style="
                                                            display: inline-block;
                                                            width: 18px;
                                                            vertical-align: middle;
                                                            "></span> </span>
                                                         </span>
                                                      </td>
                                                   </tr>
                                                </tbody>
                                             </table>
                                          </td> -->
                                    </tr>
                                    <!-- <tr>
                                          <td style="vertical-align: top;padding: 0px 0px 15px 0;">
                                             <table 
                                                >
                                                <tbody>
                                                   <tr>
                                                      <td style="vertical-align: baseline;"><span style="display: inline-block;
                                                         margin-right: 10px;
                                                         vertical-align: middle;
                                                         width: 45px;">
                                                         <img src="${process.env.WEB_ENDPOINT}/assets/images/notifications.png" alt=""
                                                            style="height: 45px;vertical-align: middle;"></span>
                                                      </td>
                                                      <td>
                                                         <span style="text-align: left;
                                                            font-size: 0.9875em;
                                                            font-weight:500;
                                                            line-height: 21px;
                                                            letter-spacing: 0px;
                                                            color: #1B1B1B;
                                                            opacity: 1;list-style: none;margin: 0;">Receive important health updates <span style="
                                                            display: inline-block;
                                                            width: 18px;
                                                            vertical-align: middle;
                                                            "></span> </span>
                                                      </td>
                                                   </tr>
                                                </tbody>
                                             </table>
                                          </td>
                                          <td style="vertical-align: top;padding: 0px 0px 15px 0;">
                                             <table >
                                                <tbody>
                                                   <tr>
                                                      <td style="vertical-align: baseline;"><span style="display: inline-block;
                                                         margin-right: 10px;
                                                         vertical-align: middle;
                                                         width: 45px;">
                                                         <img src="${process.env.WEB_ENDPOINT}/assets/images/near-hospitals.png" alt=""
                                                            style="height: 45px;vertical-align: middle;"></span>
                                                      </td>
                                                      <td>
                                                         <span style="text-align: left;
                                                            font-size: 0.9875em;
                                                            font-weight:500;
                                                            line-height: 21px;
                                                            letter-spacing: 0px;
                                                            color: #1B1B1B;
                                                            opacity: 1;list-style: none;margin: 0;">Find nearby doctors & hospitals <span style="
                                                            display: inline-block;
                                                            width: 18px;
                                                            vertical-align: middle;
                                                            "></span> </span>
                                                         </span>
                                                      </td>
                                                   </tr>
                                                </tbody>
                                             </table>
                                          </td>
                                       </tr> -->
                                 </tbody>
                              </table>
                           </td>
                        </tr>
                        
           ${emailFooter}`
      }
   )

}
// signup french-------------
exports.signUpTemplate_fr = (requiredData) => {
   return (
      {
         "subject": 'Vous vous êtes inscrit avec succès',
         "html": `${emailHeader_fr}
       <tr>
               <td>
                  <table style="background-color: #fff;
                        border-radius: 20px;margin-bottom: 42px;margin:0 auto;max-width: 760px;    width: 100%;
                        table-layout: fixed;overflow-x: hidden;" class="inner-table">
                     <tbody>
                        <!--top-section-->
                        <tr>
                           <td
                              style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
                              <div style="text-align: center;position: relative;">
                                 <img src="${process.env.WEB_ENDPOINT}/assets/images/registration.png" alt="image" style="width: 16em;position: relative;
                                       z-index: 1;">
                                 <div style="padding: 1em">
                                    <p
                                       style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
                                       Merci pour l'inscription
                                    </p>
                                    <p
                                       style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
                                       Hi, ${requiredData.fullName ? requiredData.fullName : requiredData.hospital_name}!
                                    </p>
                                    <p style="font-size:0.9375em;font-weight:normal;
                                          margin: 10px auto 0;color:#787878;">Nous sommes ravis de vous accueillir
                                          Dr. Hivey. Votre compte a été créé avec succès et nous sommes ravis de l'avoir
                                          vous en tant que membre de notre famille de soins de santé.
                                    </p>
                                 </div>
                              </div>
                           </td>
                        </tr>
                        <!--top-section-end-->
                        <tr>
                           <td style="text-align: left;padding:0px;">
                              <h2 style="margin:1em 0 12px;text-align: left;
                                    font-size:1.2em; font-weight: 700; line-height: 34px;
                                    letter-spacing: 0px;
                                    color: #1E232C;
                                    opacity: 1;">
                                    Avec votre nouveau compte, vous pouvez :
                              </h2>
                              <table style="
                                    background: #FFFFFF 0% 0% no-repeat padding-box;
                                 
                                    opacity: 1;
                                    width: 100%;
                                    max-width: 760px;
                                    width: 100%;
                                    table-layout: fixed;
                                    ">
                                 <tbody>
                                    <tr>
                                       <td >
                                          <div style="display: inline-block;vertical-align: top; margin-bottom: 12px;">
                                             <table
                                                style="width: 320px;max-width: 320px;width: 100%;table-layout: fixed;margin: auto;">
                                                <tbody>
                                                   <tr>
                                                      <td style="vertical-align: baseline;width: 20%;"><span style="display: inline-block;
                                                        margin-right: 10px;
                                                        vertical-align: middle;
                                                        width: 45px;">
                                                            <img src="${process.env.WEB_ENDPOINT}/assets/images/calender.png" alt="" style="height: 45px;vertical-align: middle;"></span>
                                                      </td>
                                                      <td>
                                                         <span style="text-align: left;width: 80%;
                                                           font-size: 0.9875em;
                                                           font-weight:500;
                                                           line-height: 21px;
                                                           letter-spacing: 0px;
                                                           color: #1B1B1B;
                                                           opacity: 1;list-style: none;margin: 0;">Prendre rendez-vous en ligne</span>
                                                      </td>
                                                   </tr>
                                                </tbody>
                                             </table>
                                          </div>
                                          <div style="display: inline-block;vertical-align: top; margin-bottom: 12px;">
                                             <table
                                                style="width: 320px;max-width: 320px;width: 100%;table-layout: fixed;margin: auto;">
                                                <tbody>
                                                   <tr>
                                                      <td style="vertical-align: baseline;width: 20%;"><span style="display: inline-block;
                                                        margin-right: 10px;
                                                        vertical-align: middle;
                                                        width: 45px;">
                                                            <img src="${process.env.WEB_ENDPOINT}/assets/images/medical-record.png" alt="" style="height: 45px;vertical-align: middle;"></span>
                                                      </td>
                                                      <td>
                                                         <span style="text-align: left;width: 80%;
                                                           font-size: 0.9875em;
                                                           font-weight:500;
                                                           line-height: 21px;
                                                           letter-spacing: 0px;
                                                           color: #1B1B1B;
                                                           opacity: 1;list-style: none;margin: 0;">Accédez à votre dossier médical</span>
                                                      </td>
                                                   </tr>
                                                </tbody>
                                             </table>
                                          </div>
                                          <div style="display: inline-block;vertical-align: top; margin-bottom: 12px;">
                                             <table
                                                style="width: 320px;max-width: 320px;width: 100%;table-layout: fixed;margin: auto;">
                                                <tbody>
                                                   <tr>
                                                      <td style="vertical-align: baseline;width: 20%;"><span style="display: inline-block;
                                                        margin-right: 10px;
                                                        vertical-align: middle;
                                                        width: 45px;">
                                                            <img src="${process.env.WEB_ENDPOINT}/assets/images/notifications.png" alt="" style="height: 45px;vertical-align: middle;"></span>
                                                      </td>
                                                      <td>
                                                         <span style="text-align: left;width: 80%;
                                                           font-size: 0.9875em;
                                                           font-weight:500;
                                                           line-height: 21px;
                                                           letter-spacing: 0px;
                                                           color: #1B1B1B;
                                                           opacity: 1;list-style: none;margin: 0;">Recevez des mises à jour importantes sur la santé</span>
                                                      </td>
                                                   </tr>
                                                </tbody>
                                             </table>
                                          </div>
                                          <div style="display: inline-block;vertical-align: top; margin-bottom: 12px;">
                                             <table
                                                style="width: 320px;max-width: 320px;width: 100%;table-layout: fixed;margin: auto;">
                                                <tbody>
                                                   <tr>
                                                      <td style="vertical-align: baseline;width: 20%;"><span style="display: inline-block;
                                                        margin-right: 10px;
                                                        vertical-align: middle;
                                                        width: 45px;">
                                                            <img src="${process.env.WEB_ENDPOINT}/assets/images/near-hospitals.png" alt="" style="height: 45px;vertical-align: middle;"></span>
                                                      </td>
                                                      <td>
                                                         <span style="text-align: left;width: 80%;
                                                           font-size: 0.9875em;
                                                           font-weight:500;
                                                           line-height: 21px;
                                                           letter-spacing: 0px;
                                                           color: #1B1B1B;
                                                           opacity: 1;list-style: none;margin: 0;">Trouver des médecins et des hôpitaux à proximité</span>
                                                      </td>
                                                   </tr>
                                                </tbody>
                                             </table>
                                          </div>
                                       </td>
                                       <!-- <td style="vertical-align: top;padding: 0px 0px 15px 0;">
                                             <table >
                                                <tbody>
                                                   <tr>
                                                      <td style="vertical-align: baseline;"><span style="display: inline-block;
                                                         margin-right: 10px;
                                                         vertical-align: middle;
                                                         width: 45px;">
                                                         <img src="${process.env.WEB_ENDPOINT}/assets/images/medical-record.png" alt=""
                                                            style="height: 45px;vertical-align: middle;"></span>
                                                      </td>
                                                      <td>
                                                         <span style="text-align: left;
                                                            font-size: 0.9875em;
                                                            font-weight:500;
                                                            line-height: 21px;
                                                            letter-spacing: 0px;
                                                            color: #1B1B1B;
                                                            opacity: 1;list-style: none;margin: 0;">Accédez à votre dossier médical<span style="
                                                            display: inline-block;
                                                            width: 18px;
                                                            vertical-align: middle;
                                                            "></span> </span>
                                                         </span>
                                                      </td>
                                                   </tr>
                                                </tbody>
                                             </table>
                                          </td> -->
                                    </tr>
                                    <!-- <tr>
                                          <td style="vertical-align: top;padding: 0px 0px 15px 0;">
                                             <table 
                                                >
                                                <tbody>
                                                   <tr>
                                                      <td style="vertical-align: baseline;"><span style="display: inline-block;
                                                         margin-right: 10px;
                                                         vertical-align: middle;
                                                         width: 45px;">
                                                         <img src="${process.env.WEB_ENDPOINT}/assets/images/notifications.png" alt=""
                                                            style="height: 45px;vertical-align: middle;"></span>
                                                      </td>
                                                      <td>
                                                         <span style="text-align: left;
                                                            font-size: 0.9875em;
                                                            font-weight:500;
                                                            line-height: 21px;
                                                            letter-spacing: 0px;
                                                            color: #1B1B1B;
                                                            opacity: 1;list-style: none;margin: 0;">Recevez des mises à jour importantes sur la santé<span style="
                                                            display: inline-block;
                                                            width: 18px;
                                                            vertical-align: middle;
                                                            "></span> </span>
                                                      </td>
                                                   </tr>
                                                </tbody>
                                             </table>
                                          </td>
                                          <td style="vertical-align: top;padding: 0px 0px 15px 0;">
                                             <table >
                                                <tbody>
                                                   <tr>
                                                      <td style="vertical-align: baseline;"><span style="display: inline-block;
                                                         margin-right: 10px;
                                                         vertical-align: middle;
                                                         width: 45px;">
                                                         <img src="${process.env.WEB_ENDPOINT}/assets/images/near-hospitals.png" alt=""
                                                            style="height: 45px;vertical-align: middle;"></span>
                                                      </td>
                                                      <td>
                                                         <span style="text-align: left;
                                                            font-size: 0.9875em;
                                                            font-weight:500;
                                                            line-height: 21px;
                                                            letter-spacing: 0px;
                                                            color: #1B1B1B;
                                                            opacity: 1;list-style: none;margin: 0;">Trouver des médecins et des hôpitaux à proximité<span style="
                                                            display: inline-block;
                                                            width: 18px;
                                                            vertical-align: middle;
                                                            "></span> </span>
                                                         </span>
                                                      </td>
                                                   </tr>
                                                </tbody>
                                             </table>
                                          </td>
                                       </tr> -->
                                 </tbody>
                              </table>
                           </td>
                        </tr>
                        
           ${emailFooter_fr}`
      }
   )

}

// signup arbic
// signup template
exports.signUpTemplate_ar = (requiredData) => {
   return (
      {
         "subject": "لقد قمت بالتسجيل بنجاح",
         "html": `${emailHeader_ar}
      <tr>
              <td>
                 <table style="background-color: #fff;
                       border-radius: 20px;margin-bottom: 42px;margin:0 auto;max-width: 760px;    width: 100%;
                       table-layout: fixed;overflow-x: hidden;" class="inner-table">
                    <tbody>
                       <!--top-section-->
                       <tr>
                          <td
                             style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
                             <div style="text-align: center;position: relative;">
                                <img src="${process.env.WEB_ENDPOINT}/assets/images/registration.png" alt="image" style="width: 16em;position: relative;
                                      z-index: 1;">
                                <div style="padding: 1em">
                                   <p
                                      style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
                                      شكرا للتسجيل 
                                   </p>
                                   <p
                                      style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
                                      أهلاً, ${requiredData.fullName ? requiredData.fullName : requiredData.hospital_name}!
                                   </p>
                                   <p style="font-size:0.9375em;font-weight:normal;
                                         margin: 10px auto 0;color:#787878;">يسعدنا أن نرحب بكم
                                         دوكتومي. لقد تم إنشاء حسابك بنجاح، ونحن سعداء بذلك
                                         أنت كجزء من عائلة الرعاية الصحية لدينا.
                                   </p>
                                </div>
                             </div>
                          </td>
                       </tr>
                       <!--top-section-end-->
                       <tr>
                          <td style="text-align: left;padding:0px;">
                             <h2 style="margin:1em 0 12px;text-align: left;
                                   font-size:1.2em; font-weight: 700; line-height: 34px;
                                   letter-spacing: 0px;
                                   color: #1E232C;
                                   opacity: 1;">
                                   باستخدام حسابك الجديد، يمكنك:
                             </h2>
                             <table style="
                                   background: #FFFFFF 0% 0% no-repeat padding-box;
                                
                                   opacity: 1;
                                   width: 100%;
                                   max-width: 760px;
                                   width: 100%;
                                   table-layout: fixed;
                                   ">
                                <tbody>
                                   <tr>
                                      <td >
                                         <div style="display: inline-block;vertical-align: top; margin-bottom: 12px;">
                                            <table
                                               style="width: 320px;max-width: 320px;width: 100%;table-layout: fixed;margin: auto;">
                                               <tbody>
                                                  <tr>
                                                     <td style="vertical-align: baseline;width: 20%;"><span style="display: inline-block;
                                                       margin-right: 10px;
                                                       vertical-align: middle;
                                                       width: 45px;">
                                                           <img src="${process.env.WEB_ENDPOINT}/assets/images/calender.png" alt="" style="height: 45px;vertical-align: middle;"></span>
                                                     </td>
                                                     <td>
                                                        <span style="text-align: left;width: 80%;
                                                          font-size: 0.9875em;
                                                          font-weight:500;
                                                          line-height: 21px;
                                                          letter-spacing: 0px;
                                                          color: #1B1B1B;
                                                          opacity: 1;list-style: none;margin: 0;">جدولة المواعيد عبر الإنترنت</span>
                                                     </td>
                                                  </tr>
                                               </tbody>
                                            </table>
                                         </div>
                                         <div style="display: inline-block;vertical-align: top; margin-bottom: 12px;">
                                            <table
                                               style="width: 320px;max-width: 320px;width: 100%;table-layout: fixed;margin: auto;">
                                               <tbody>
                                                  <tr>
                                                     <td style="vertical-align: baseline;width: 20%;"><span style="display: inline-block;
                                                       margin-right: 10px;
                                                       vertical-align: middle;
                                                       width: 45px;">
                                                           <img src="${process.env.WEB_ENDPOINT}/assets/images/medical-record.png" alt="" style="height: 45px;vertical-align: middle;"></span>
                                                     </td>
                                                     <td>
                                                        <span style="text-align: left;width: 80%;
                                                          font-size: 0.9875em;
                                                          font-weight:500;
                                                          line-height: 21px;
                                                          letter-spacing: 0px;
                                                          color: #1B1B1B;
                                                          opacity: 1;list-style: none;margin: 0;">الوصول إلى السجلات الطبية الخاصة بك</span>
                                                     </td>
                                                  </tr>
                                               </tbody>
                                            </table>
                                         </div>
                                         <div style="display: inline-block;vertical-align: top; margin-bottom: 12px;">
                                            <table
                                               style="width: 320px;max-width: 320px;width: 100%;table-layout: fixed;margin: auto;">
                                               <tbody>
                                                  <tr>
                                                     <td style="vertical-align: baseline;width: 20%;"><span style="display: inline-block;
                                                       margin-right: 10px;
                                                       vertical-align: middle;
                                                       width: 45px;">
                                                           <img src="${process.env.WEB_ENDPOINT}/assets/images/notifications.png" alt="" style="height: 45px;vertical-align: middle;"></span>
                                                     </td>
                                                     <td>
                                                        <span style="text-align: left;width: 80%;
                                                          font-size: 0.9875em;
                                                          font-weight:500;
                                                          line-height: 21px;
                                                          letter-spacing: 0px;
                                                          color: #1B1B1B;
                                                          opacity: 1;list-style: none;margin: 0;">تلقي التحديثات الصحية الهامة</span>
                                                     </td>
                                                  </tr>
                                               </tbody>
                                            </table>
                                         </div>
                                         <div style="display: inline-block;vertical-align: top; margin-bottom: 12px;">
                                            <table
                                               style="width: 320px;max-width: 320px;width: 100%;table-layout: fixed;margin: auto;">
                                               <tbody>
                                                  <tr>
                                                     <td style="vertical-align: baseline;width: 20%;"><span style="display: inline-block;
                                                       margin-right: 10px;
                                                       vertical-align: middle;
                                                       width: 45px;">
                                                           <img src="${process.env.WEB_ENDPOINT}/assets/images/near-hospitals.png" alt="" style="height: 45px;vertical-align: middle;"></span>
                                                     </td>
                                                     <td>
                                                        <span style="text-align: left;width: 80%;
                                                          font-size: 0.9875em;
                                                          font-weight:500;
                                                          line-height: 21px;
                                                          letter-spacing: 0px;
                                                          color: #1B1B1B;
                                                          opacity: 1;list-style: none;margin: 0;">البحث عن الأطباء والمستشفيات القريبة</span>
                                                     </td>
                                                  </tr>
                                               </tbody>
                                            </table>
                                         </div>
                                      </td>
                                      <!-- <td style="vertical-align: top;padding: 0px 0px 15px 0;">
                                            <table >
                                               <tbody>
                                                  <tr>
                                                     <td style="vertical-align: baseline;"><span style="display: inline-block;
                                                        margin-right: 10px;
                                                        vertical-align: middle;
                                                        width: 45px;">
                                                        <img src="${process.env.WEB_ENDPOINT}/assets/images/medical-record.png" alt=""
                                                           style="height: 45px;vertical-align: middle;"></span>
                                                     </td>
                                                     <td>
                                                        <span style="text-align: left;
                                                           font-size: 0.9875em;
                                                           font-weight:500;
                                                           line-height: 21px;
                                                           letter-spacing: 0px;
                                                           color: #1B1B1B;
                                                           opacity: 1;list-style: none;margin: 0;">الوصول إلى السجلات الطبية الخاصة بك <span style="
                                                           display: inline-block;
                                                           width: 18px;
                                                           vertical-align: middle;
                                                           "></span> </span>
                                                        </span>
                                                     </td>
                                                  </tr>
                                               </tbody>
                                            </table>
                                         </td> -->
                                   </tr>
                                   <!-- <tr>
                                         <td style="vertical-align: top;padding: 0px 0px 15px 0;">
                                            <table 
                                               >
                                               <tbody>
                                                  <tr>
                                                     <td style="vertical-align: baseline;"><span style="display: inline-block;
                                                        margin-right: 10px;
                                                        vertical-align: middle;
                                                        width: 45px;">
                                                        <img src="${process.env.WEB_ENDPOINT}/assets/images/notifications.png" alt=""
                                                           style="height: 45px;vertical-align: middle;"></span>
                                                     </td>
                                                     <td>
                                                        <span style="text-align: left;
                                                           font-size: 0.9875em;
                                                           font-weight:500;
                                                           line-height: 21px;
                                                           letter-spacing: 0px;
                                                           color: #1B1B1B;
                                                           opacity: 1;list-style: none;margin: 0;">تلقي التحديثات الصحية الهامة<span style="
                                                           display: inline-block;
                                                           width: 18px;
                                                           vertical-align: middle;
                                                           "></span> </span>
                                                     </td>
                                                  </tr>
                                               </tbody>
                                            </table>
                                         </td>
                                         <td style="vertical-align: top;padding: 0px 0px 15px 0;">
                                            <table >
                                               <tbody>
                                                  <tr>
                                                     <td style="vertical-align: baseline;"><span style="display: inline-block;
                                                        margin-right: 10px;
                                                        vertical-align: middle;
                                                        width: 45px;">
                                                        <img src="${process.env.WEB_ENDPOINT}/assets/images/near-hospitals.png" alt=""
                                                           style="height: 45px;vertical-align: middle;"></span>
                                                     </td>
                                                     <td>
                                                        <span style="text-align: left;
                                                           font-size: 0.9875em;
                                                           font-weight:500;
                                                           line-height: 21px;
                                                           letter-spacing: 0px;
                                                           color: #1B1B1B;
                                                           opacity: 1;list-style: none;margin: 0;">البحث عن الأطباء والمستشفيات القريبة <span style="
                                                           display: inline-block;
                                                           width: 18px;
                                                           vertical-align: middle;
                                                           "></span> </span>
                                                        </span>
                                                     </td>
                                                  </tr>
                                               </tbody>
                                            </table>
                                         </td>
                                      </tr> -->
                                </tbody>
                             </table>
                          </td>
                       </tr>
                       
          ${emailFooter_ar}`
      }
   )

}



// doctor appoinment accepted template
exports.doctorAppoinmentAcceptedTemplate = (requiredData) => {

   const dateString = requiredData.action.booking_date;
   const date = new Date(dateString);

   const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
   return (

      {
         "subject": 'Appointment accepted',
         "html": `${emailHeader}
        <tr>
        <td
           style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
           <div style="text-align: center;position: relative;">
              <img src="${process.env.WEB_ENDPOINT}/assets/images/appointment-acpted.png" alt="image" style="width: 16em;position: relative;
                    z-index: 1;">
              <div style="padding: 1em">
                 <p
                    style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
                    Appointment accepted
                 </p>
                 <p
                    style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
                    Hi, ${requiredData.patientFullName}!
                 </p>
                 <p style="font-size:0.9375em;font-weight:normal;
                       margin: 10px auto 0;color:#787878;">We are pleased to inform you that your appointment request has been confirmed by 
                       <span style="font-size:0.9375em;font-weight:700;
                       margin: 5px auto 0;color:#787878;display: block;">${requiredData.user_role == "doctor" ? 'Dr.'+ requiredData.doctorFullName : requiredData.doctorFullName}</span>
                 </p>
              </div>
           </div>
        </td>
     </tr>
     <!--top-section-end-->
     <tr>
        <td style="padding:0px;">
           <h2 style="margin:1em 0 12px;text-align: center;
                 font-size:1.2em; font-weight: 700; line-height: 34px;
                 letter-spacing: 0px;
                 color: #1E232C;
                 opacity: 1;">
             Appointment Details :
           </h2>
           <table style="background-color: #F2F6FC;border-radius: 10px;padding: 20px;width: 100%;margin-bottom: 15px; table-layout: fixed;">
              <tbody>
                 <tr>
                    <td>
                       <p style="text-align: left;
                       font-size: 0.9375em;
                   
                       letter-spacing: 0px;
                 margin-bottom: 15px;margin-top: 0;
                       opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
                           display: inline-block;">${requiredData.user_role == "doctor" ? "Doctor" : "Hospital"} :</span>
                         <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                         display: inline-block;">${requiredData.doctorFullName}</span>
                       </p>
                    </td>
                    <td>
                       <p style="text-align: right;
                       font-size: 0.9375em;
                    
                       letter-spacing: 0px;
                       margin-bottom: 15px;margin-top: 0;
                       opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
display: inline-block;">Appointment Date :</span>
                         <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                         display: inline-block;">${formattedDate} </span>
                       </p>
                    </td>
                 </tr>
                 <tr>
                    <td>
                       <p style="text-align: left;
                       font-size: 0.9375em;
                    
                       letter-spacing: 0px;
                       margin:0;
                       opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
display: inline-block;">Appointment Time :</span>
                         <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                         display: inline-block;">${(requiredData.action.slot)}</span>
                       </p>
                    </td>
                    <td>
                       <p style="text-align: right;
                       font-size: 0.9375em;
                    
                       letter-spacing: 0px;
                       margin:0;
                       opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
display: inline-block;">Appointment Type :</span>
                         <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                         display: inline-block;">${requiredData.doctorClinicName}</span>
                       </p>
                    </td>
                 </tr>
              </tbody>
           </table>
           <div style="text-align: center;">
              <a href="${process.env.WEB_ENDPOINT}/patient" style="display: inline-block;
              background: #014CC4;
              padding: 1em 5.5em;
              font-size: 15px;
              font-weight: 500;
              color: #ffffff;
              text-decoration: none;
              border-radius: 7px;text-align: center;margin: 0px 0 15px 0px;
             ">View Appointment</a>
           </div>
           <p style="text-align: center;;
                 font-size: 0.9375em;
                 font-weight: normal;
                 line-height: 21px;
                 letter-spacing: 0px;
                 color: #1B1B1B;
                 opacity: 1;margin: 10px 0 0 0;">We look forward to seeing you at your appointment

           </p>
        </td>
     </tr>
            ${emailFooter}`
      }
   )

}
// doctor appoinment accepted template
exports.doctorAppoinmentAcceptedTemplate_fr = (requiredData) => {

   const dateString = requiredData.action.booking_date;
   const date = new Date(dateString);

   const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
   return (

      {
         "subject": 'Rendez-vous accepté',
         "html": `${emailHeader_fr}
       <tr>
    <td
       style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
       <div style="text-align: center;position: relative;">
          <img src="${process.env.WEB_ENDPOINT}/assets/images/appointment-acpted.png" alt="image" style="width: 16em;position: relative;
                z-index: 1;">
          <div style="padding: 1em">
             <p
                style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
                Rendez-vous accepté
             </p>
             <p
                style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
                Bonjour, ${requiredData.patientFullName}!
             </p>
             <p style="font-size:0.9375em;font-weight:normal;
                   margin: 10px auto 0;color:#787878;">Nous avons le plaisir de vous informer que votre demande de rendez-vous a été confirmée par 
                   <span style="font-size:0.9375em;font-weight:700;
                   margin: 5px auto 0;color:#787878;display: block;">Dr.${requiredData.doctorFullName}</span>
             </p>
          </div>
       </div>
    </td>
</tr>
<!--top-section-end-->
<tr>
    <td style="padding:0px;">
       <h2 style="margin:1em 0 12px;text-align: center;
             font-size:1.2em; font-weight: 700; line-height: 34px;
             letter-spacing: 0px;
             color: #1E232C;
             opacity: 1;">
         Détails du rendez-vous :
       </h2>
       <table style="background-color: #F2F6FC;border-radius: 10px;padding: 20px;width: 100%;margin-bottom: 15px; table-layout: fixed;">
          <tbody>
             <tr>
                <td>
                   <p style="text-align: left;
                   font-size: 0.9375em;
                   letter-spacing: 0px;
                   margin-bottom: 15px;margin-top: 0;
                   opacity: 1;">
                      <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">${requiredData.user_role == "doctor" ? "Médecin" : "Hôpital"} : </span>
                      <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                      display: inline-block;">${requiredData.doctorFullName}</span>
                   </p>
                </td>
                <td>
                   <p style="text-align: right;
                   font-size: 0.9375em;
                   letter-spacing: 0px;
                   margin-bottom: 15px;margin-top: 0;
                   opacity: 1;">
                      <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">Date du rendez-vous :</span>
                      <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                      display: inline-block;">${formattedDate}</span>
                   </p>
                </td>
             </tr>
             <tr>
                <td>
                   <p style="text-align: left;
                   font-size: 0.9375em;
                   letter-spacing: 0px;
                   margin:0;
                   opacity: 1;">
                      <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">Heure du rendez-vous :</span>
                      <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                      display: inline-block;">${(requiredData.action.slot)}</span>
                   </p>
                </td>
                <td>
                   <p style="text-align: right;
                   font-size: 0.9375em;
                   letter-spacing: 0px;
                   margin:0;
                   opacity: 1;">
                      <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">Type de rendez-vous :</span>
                      <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                      display: inline-block;">${requiredData.doctorClinicName}</span>
                   </p>
                </td>
             </tr>
          </tbody>
       </table>
       <div style="text-align: center;">
          <a href="${process.env.WEB_ENDPOINT}/patient" style="display: inline-block;
          background: #014CC4;
          padding: 1em 5.5em;
          font-size: 15px;
          font-weight: 500;
          color: #ffffff;
          text-decoration: none;
          border-radius: 7px;text-align: center;margin: 0px 0 15px 0px;
         ">Voir le rendez-vous</a>
       </div>
       <p style="text-align: center;;
             font-size: 0.9375em;
             font-weight: normal;
             line-height: 21px;
             letter-spacing: 0px;
             color: #1B1B1B;
             opacity: 1;margin: 10px 0 0 0;">
         Nous avons hâte de vous voir lors de votre rendez-vous.
       </p>
    </td>
</tr>

            ${emailFooter_fr}`
      }
   )

}
// doctor appoinment accepted template
exports.doctorAppoinmentAcceptedTemplate_ar = (requiredData) => {

   const dateString = requiredData.action.booking_date;
   const date = new Date(dateString);

   const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
   return (

      {
         "subject": 'تم قبول التعيين',
         "html": `${emailHeader_ar}
        <tr>
    <td
       style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
       <div style="text-align: center;position: relative;">
          <img src="${process.env.WEB_ENDPOINT}/assets/images/appointment-acpted.png" alt="image" style="width: 16em;position: relative;
                z-index: 1;">
          <div style="padding: 1em">
             <p
                style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
                تم قبول الموعد
             </p>
             <p
                style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
                مرحبًا، ${requiredData.patientFullName}!
             </p>
             <p style="font-size:0.9375em;font-weight:normal;
                   margin: 10px auto 0;color:#787878;">يسعدنا إبلاغك بأن طلبك للمقابلة قد تم تأكيده من قبل 
                   <span style="font-size:0.9375em;font-weight:700;
                   margin: 5px auto 0;color:#787878;display: block;" ${requiredData.user_role == "doctor" ? '>د.'+ requiredData.doctorFullName : requiredData.doctorFullName}</span>
             </p>
          </div>
       </div>
    </td>
</tr>
<!--top-section-end-->
<tr>
    <td style="padding:0px;">
       <h2 style="margin:1em 0 12px;text-align: center;
             font-size:1.2em; font-weight: 700; line-height: 34px;
             letter-spacing: 0px;
             color: #1E232C;
             opacity: 1;">
         تفاصيل الموعد :
       </h2>
       <table style="background-color: #F2F6FC;border-radius: 10px;padding: 20px;width: 100%;margin-bottom: 15px; table-layout: fixed;">
          <tbody>
             <tr>
                <td>
                   <p style="text-align: left;
                   font-size: 0.9375em;
                   letter-spacing: 0px;
                   margin-bottom: 15px;margin-top: 0;
                   opacity: 1;">
                      <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">${requiredData.user_role == "doctor" ? "الطبيب" : "مستشفى"} :</span>
                      <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                      display: inline-block;">${requiredData.doctorFullName}</span>
                   </p>
                </td>
                <td>
                   <p style="text-align: right;
                   font-size: 0.9375em;
                   letter-spacing: 0px;
                   margin-bottom: 15px;margin-top: 0;
                   opacity: 1;">
                      <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">تاريخ الموعد :</span>
                      <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                      display: inline-block;">${formattedDate}</span>
                   </p>
                </td>
             </tr>
             <tr>
                <td>
                   <p style="text-align: left;
                   font-size: 0.9375em;
                   letter-spacing: 0px;
                   margin:0;
                   opacity: 1;">
                      <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">وقت الموعد :</span>
                      <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                      display: inline-block;">${(requiredData.action.slot)}</span>
                   </p>
                </td>
                <td>
                   <p style="text-align: right;
                   font-size: 0.9375em;
                   letter-spacing: 0px;
                   margin:0;
                   opacity: 1;">
                      <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">نوع الموعد :</span>
                      <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                      display: inline-block;">${requiredData.doctorClinicName}</span>
                   </p>
                </td>
             </tr>
          </tbody>
       </table>
       <div style="text-align: center;">
          <a href="${process.env.WEB_ENDPOINT}/patient" style="display: inline-block;
          background: #014CC4;
          padding: 1em 5.5em;
          font-size: 15px;
          font-weight: 500;
          color: #ffffff;
          text-decoration: none;
          border-radius: 7px;text-align: center;margin: 0px 0 15px 0px;
         ">عرض الموعد</a>
       </div>
       <p style="text-align: center;;
             font-size: 0.9375em;
             font-weight: normal;
             line-height: 21px;
             letter-spacing: 0px;
             color: #1B1B1B;
             opacity: 1;margin: 10px 0 0 0;">
         نتطلع لرؤيتك في موعدك
       </p>
    </td>
</tr>

            ${emailFooter_ar}`
      }
   )

}

// Accepted rescheduled appointment 
exports.doctorRescheduledAppoinmentAcceptedTemplate = (requiredData) => {

   const dateString = requiredData.action.reschedule_date;
   const date = new Date(dateString);

   const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
   return (

      {
         "subject": 'Accepted rescheduled appointment',
         "html": `${emailHeader}
                        <!--top-section-->
                        <tr>
                           <td
                              style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
                              <div style="text-align: center;position: relative;">
                                 <img src="${process.env.WEB_ENDPOINT}/assets/images/acpted-reschdule-appoint.png" alt="image" style="width: 16em;position: relative;
                                       z-index: 1;">
                                 <div style="padding: 1em">
                                    <p
                                       style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
                                       Accepted reschedule appointment
                                    </p>
                                    <p
                                       style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
                                       Hi, ${requiredData.patientFullName}!
                                    </p>
                                    <p style="font-size:0.9375em;font-weight:normal;
                                          margin: 10px auto 0;color:#787878;">We are pleased to inform you that your
                                       appointment with
                                       <span style="font-size:0.9375em;font-weight:700;
                                          margin: 5px auto 0;color:#787878;">${requiredData.user_role == "doctor" ? 'Dr.'+ requiredData.doctorFullName : requiredData.doctorFullName}</span> has been successfully
                                       rescheduled.
                                    </p>
                                 </div>
                              </div>
                           </td>
                        </tr>
                        <!--top-section-end-->
                        <tr>
                           <td style="padding:0px;">
                              <h2 style="margin:1em 0 12px;text-align: center;
                                    font-size:1.2em; font-weight: 700; line-height: 34px;
                                    letter-spacing: 0px;
                                    color: #1E232C;
                                    opacity: 1;">
                                 Updated Appointment Details :
                              </h2>
                              <table
                                 style="background-color: #F2F6FC;border-radius: 10px;padding: 20px;width: 100%;margin-bottom: 15px; table-layout: fixed;">
                                 <tbody>
                                    <tr>
                                       <td>
                                          <p style="text-align: left;
                                          font-size: 0.9375em;
                                      
                                          letter-spacing: 0px;
                                    margin-bottom: 15px;margin-top: 0;
                                          opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;"> ${requiredData.user_role == "doctor" ? "Doctor" : "Hospital"} :</span>
                                             <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                                            display: inline-block;">${requiredData.user_role == "doctor" ? 'Dr.'+ requiredData.doctorFullName : requiredData.doctorFullName}</span>
                                          </p>
                                       </td>
                                       <td>
                                          <p style="text-align: right;
                                          font-size: 0.9375em;
                                       
                                          letter-spacing: 0px;
                                          margin-bottom: 15px;margin-top: 0;
                                          opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">Appointment Date :</span>
                                             <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                                            display: inline-block;">${formattedDate}</span>
                                          </p>
                                       </td>
                                    </tr>
                                    <tr>
                                       <td>
                                          <p style="text-align: left;
                                          font-size: 0.9375em;
                                       
                                          letter-spacing: 0px;
                                          margin:0;
                                          opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">Appointment Time :</span>
                                             <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                                            display: inline-block;">${(requiredData.action.reschedule_slot)}</span>
                                          </p>
                                       </td>
                                       <td>
                                          <p style="text-align: right;
                                          font-size: 0.9375em;
                                       
                                          letter-spacing: 0px;
                                          margin:0;
                                          opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">Appointment Type :</span>
                                             <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                                            display: inline-block;">${requiredData.doctorClinicName}</span>
                                          </p>
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>

                              <p style="text-align: center;;
                                    font-size: 0.9375em;
                                    font-weight: normal;
                                    line-height: 21px;
                                    letter-spacing: 0px;
                                    color: #1B1B1B;
                                    opacity: 1;margin: 10px 0 0 0;">We look forward to seeing you at your rescheduled
                                 appointment.

                              </p>
                           </td>
                        </tr>
            ${emailFooter}`
      }
   )

}

// Accepted rescheduled appointment french
exports.doctorRescheduledAppoinmentAcceptedTemplate_fr = (requiredData) => {

   const dateString = requiredData.action.reschedule_date;
   const date = new Date(dateString);

   const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
   return (

      {
         "subject": 'Rendez-vous reporté accepté',
         "html": `${emailHeader_fr}
                        <!--top-section-->
                        <tr>
   <td
      style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
      <div style="text-align: center;position: relative;">
         <img src="${process.env.WEB_ENDPOINT}/assets/images/acpted-reschdule-appoint.png" alt="image" style="width: 16em;position: relative;
               z-index: 1;">
         <div style="padding: 1em">
            <p
               style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
               Rendez-vous reprogrammé accepté
            </p>
            <p
               style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
               Bonjour, ${requiredData.patientFullName} !
            </p>
            <p style="font-size:0.9375em;font-weight:normal;
                  margin: 10px auto 0;color:#787878;">Nous avons le plaisir de vous informer que votre
               rendez-vous avec
               <span style="font-size:0.9375em;font-weight:700;
                  margin: 5px auto 0;color:#787878;">${requiredData.user_role == "doctor" ? 'Dr.'+ requiredData.doctorFullName : requiredData.doctorFullName}</span> a été
               reprogrammé avec succès.
            </p>
         </div>
      </div>
   </td>
</tr>
<!--top-section-end-->
<tr>
   <td style="padding:0px;">
      <h2 style="margin:1em 0 12px;text-align: center;
            font-size:1.2em; font-weight: 700; line-height: 34px;
            letter-spacing: 0px;
            color: #1E232C;
            opacity: 1;">
         Détails du rendez-vous mis à jour :
      </h2>
      <table
         style="background-color: #F2F6FC;border-radius: 10px;padding: 20px;width: 100%;margin-bottom: 15px; table-layout: fixed;">
         <tbody>
            <tr>
               <td>
                  <p style="text-align: left;
                  font-size: 0.9375em;
                  letter-spacing: 0px;
                  margin-bottom: 15px;margin-top: 0;
                  opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
display: inline-block;">${requiredData.user_role == "doctor" ? "Médecin" : "Hôpital"} :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                     display: inline-block;">${requiredData.user_role == "doctor" ? 'Dr.'+ requiredData.doctorFullName : requiredData.doctorFullName}</span>
                  </p>
               </td>
               <td>
                  <p style="text-align: right;
                  font-size: 0.9375em;
                  letter-spacing: 0px;
                  margin-bottom: 15px;margin-top: 0;
                  opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
display: inline-block;">Date du rendez-vous :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                     display: inline-block;">${formattedDate}</span>
                  </p>
               </td>
            </tr>
            <tr>
               <td>
                  <p style="text-align: left;
                  font-size: 0.9375em;
                  letter-spacing: 0px;
                  margin:0;
                  opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
display: inline-block;">Heure du rendez-vous :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                     display: inline-block;">${(requiredData.action.reschedule_slot)}</span>
                  </p>
               </td>
               <td>
                  <p style="text-align: right;
                  font-size: 0.9375em;
                  letter-spacing: 0px;
                  margin:0;
                  opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
display: inline-block;">Type de rendez-vous :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                     display: inline-block;">${requiredData.doctorClinicName}</span>
                  </p>
               </td>
            </tr>
         </tbody>
      </table>

      <p style="text-align: center;;
            font-size: 0.9375em;
            font-weight: normal;
            line-height: 21px;
            letter-spacing: 0px;
            color: #1B1B1B;
            opacity: 1;margin: 10px 0 0 0;">Nous avons hâte de vous voir à votre rendez-vous reprogrammé.

      </p>
   </td>
</tr>

            ${emailFooter_fr}`
      }
   )

}

// Accepted rescheduled appointment arabic
exports.doctorRescheduledAppoinmentAcceptedTemplate_ar = (requiredData) => {

   const dateString = requiredData.action.reschedule_date;
   const date = new Date(dateString);

   const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
   return (

      {
         "subject": 'تم قبول الموعد المعاد جدولته',
         "html": `${emailHeader_ar}
                        <!--top-section-->
                      <tr>
   <td style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
      <div style="text-align: center;position: relative;">
         <img src="${process.env.WEB_ENDPOINT}/assets/images/acpted-reschdule-appoint.png" alt="image" style="width: 16em;position: relative; z-index: 1;">
         <div style="padding: 1em">
            <p style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
               تم قبول إعادة جدولة الموعد
            </p>
            <p style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
               مرحباً، ${requiredData.patientFullName}!
            </p>
            <p style="font-size:0.9375em;font-weight:normal;margin: 10px auto 0;color:#787878;">
               يسعدنا أن نعلمك بأنه تم إعادة جدولة موعدك مع
               <span style="font-size:0.9375em;font-weight:700;margin: 5px auto 0;color:#787878;">${requiredData.user_role == "doctor" ? 'الدكتور '+ requiredData.doctorFullName : requiredData.doctorFullName}</span> بنجاح.
            </p>
         </div>
      </div>
   </td>
</tr>
<!-- top-section-end -->
<tr>
   <td style="padding:0px;">
      <h2 style="margin:1em 0 12px;text-align: center;font-size:1.2em; font-weight: 700; line-height: 34px; letter-spacing: 0px; color: #1E232C; opacity: 1;">
         تفاصيل الموعد المحدثة :
      </h2>
      <table style="background-color: #F2F6FC;border-radius: 10px;padding: 20px;width: 100%;margin-bottom: 15px; table-layout: fixed;">
         <tbody>
            <tr>
               <td>
                  <p style="text-align: left; font-size: 0.9375em; letter-spacing: 0px; margin-bottom: 15px;margin-top: 0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">${requiredData.user_role == "doctor" ? "الطبيب" : "مستشفى"} :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${requiredData.user_role == "doctor" ? 'دكتور.'+ requiredData.doctorFullName : requiredData.doctorFullName}</span>
                  </p>
               </td>
               <td>
                  <p style="text-align: right; font-size: 0.9375em; letter-spacing: 0px; margin-bottom: 15px;margin-top: 0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">تاريخ الموعد :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${formattedDate}</span>
                  </p>
               </td>
            </tr>
            <tr>
               <td>
                  <p style="text-align: left; font-size: 0.9375em; letter-spacing: 0px; margin:0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">وقت الموعد :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${(requiredData.action.reschedule_slot)}</span>
                  </p>
               </td>
               <td>
                  <p style="text-align: right; font-size: 0.9375em; letter-spacing: 0px; margin:0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">نوع الموعد :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${requiredData.doctorClinicName}</span>
                  </p>
               </td>
            </tr>
         </tbody>
      </table>
      <p style="text-align: center;font-size: 0.9375em; font-weight: normal; line-height: 21px; letter-spacing: 0px; color: #1B1B1B; opacity: 1;margin: 10px 0 0 0;">
         نحن نتطلع لرؤيتك في موعدك المعاد جدولته.
      </p>
   </td>
</tr>

            ${emailFooter_ar}`
      }
   )

}

//doctor rejected rescheduled appointment
exports.doctorRescheduledAppoinmentRejectedTemplate = (requiredData) => {
   const dateString = requiredData.action.reschedule_date;
   const date = new Date(dateString);

   const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
   return (
      {
         "subject": 'Rejected rescheduled appointment',
         "html": `${emailHeader}
               <!--top-section-->
                        <tr>
                           <td
                              style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
                              <div style="text-align: center;position: relative;">
                                 <img src="${process.env.WEB_ENDPOINT}/assets/images/rejected-reschdule-appoint.png" alt="image" style="width: 16em;position: relative;
                                       z-index: 1;">
                                 <div style="padding: 1em">
                                    <p
                                       style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
                                       Rejected reschedule appointment
                                    </p>
                                    <p
                                       style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
                                       Hi , ${requiredData.patientFullName}!
                                    </p>
                                    <p style="font-size:0.9375em;font-weight:normal;
                                          margin: 10px auto 0;color:#787878;">We regret to inform you that your request to reschedule your appointment with
                                          <span style="font-size:0.9375em;font-weight:700;
                                          margin: 5px auto 0;color:#787878;">${requiredData.user_role == "doctor" ? 'Dr.'+ requiredData.doctorFullName : requiredData.doctorFullName}</span> has been rejected.
                                    </p>
                                    <p style="font-size:0.9375em;font-weight:600;
                                    margin: 10px auto 0;color:#1B1B1B">Reason for Rejection : ${requiredData.action.rejected_reason ? requiredData.action.rejected_reason : "Doctor is out of town"}
                                    
                              </p>
                                 </div>
                              </div>
                           </td>
                        </tr>
                        <!--top-section-end-->
                        <tr>
                           <td style="padding:0px;">
                              <h2 style="margin:1em 0 12px;text-align: center;
                                    font-size:1.2em; font-weight: 700; line-height: 34px;
                                    letter-spacing: 0px;
                                    color: #1E232C;
                                    opacity: 1;">
                                Appointment Details :
                              </h2>
                              <table style="background-color: #F2F6FC;border-radius: 10px;padding: 20px;width: 100%;margin-bottom: 15px; table-layout: fixed;">
                                 <tbody>
                                    <tr>
                                       <td>
                                          <p style="text-align: left;
                                          font-size: 0.9375em;
                                      
                                          letter-spacing: 0px;
                                    margin-bottom: 15px;margin-top: 0;
                                          opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">${requiredData.user_role == "doctor" ? "Doctor" : "Hospital"} :</span>
                                            <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                                            display: inline-block;">${requiredData.doctorFullName}</span>
                                          </p>
                                       </td>
                                       <td>
                                          <p style="text-align: right;
                                          font-size: 0.9375em;
                                       
                                          letter-spacing: 0px;
                                          margin-bottom: 15px;margin-top: 0;
                                          opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">Appointment Date :</span>
                                            <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                                            display: inline-block;">${formattedDate}</span>
                                          </p>
                                       </td>
                                    </tr>
                                    <tr>
                                       <td>
                                          <p style="text-align: left;
                                          font-size: 0.9375em;
                                       
                                          letter-spacing: 0px;
                                          margin:0;
                                          opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">Appointment Time :</span>
                                            <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                                            display: inline-block;">${(requiredData.action.reschedule_slot)}</span>
                                          </p>
                                       </td>
                                       <td>
                                          <p style="text-align: right;
                                          font-size: 0.9375em;
                                       
                                          letter-spacing: 0px;
                                          margin:0;
                                          opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">Appointment Type :</span>
                                            <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                                            display: inline-block;">${requiredData.doctorClinicName}</span>
                                          </p>
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                           
                              <p style="text-align: center;;
                                    font-size: 0.9375em;
                                    font-weight: normal;
                                    line-height: 21px;
                                    letter-spacing: 0px;
                                    color: #1B1B1B;
                                    opacity: 1;margin: 10px 0 0 0;">We apologize for any inconvenience this may have caused and encourage you to contact us to discuss alternative appointment options.

                              </p>
                           </td>
                        </tr>
            ${emailFooter}`
      }
   )

}
//doctor rejected rescheduled appointment
exports.doctorRescheduledAppoinmentRejectedTemplate_fr = (requiredData) => {
   const dateString = requiredData.action.reschedule_date;
   const date = new Date(dateString);

   const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
   return (
      {
         "subject": 'Rendez-vous reporté refusé',
         "html": `${emailHeader_fr}
               <!--top-section-->
                      <tr>
   <td
      style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
      <div style="text-align: center;position: relative;">
         <img src="${process.env.WEB_ENDPOINT}/assets/images/rejected-reschdule-appoint.png" alt="image" style="width: 16em;position: relative;
               z-index: 1;">
         <div style="padding: 1em">
            <p
               style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
               Demande de reprogrammation de rendez-vous rejetée
            </p>
            <p
               style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
               Bonjour, ${requiredData.patientFullName} !
            </p>
            <p style="font-size:0.9375em;font-weight:normal;
                  margin: 10px auto 0;color:#787878;">Nous avons le regret de vous informer que votre demande de reprogrammation
               de rendez-vous avec
               <span style="font-size:0.9375em;font-weight:700;
                  margin: 5px auto 0;color:#787878;">${requiredData.user_role == "doctor" ? 'Dr.'+ requiredData.doctorFullName : requiredData.doctorFullName}</span> a été rejetée.
            </p>
            <p style="font-size:0.9375em;font-weight:600;
                  margin: 10px auto 0;color:#1B1B1B">Raison du rejet : ${requiredData.action.rejected_reason ? requiredData.action.rejected_reason : "Le médecin est en déplacement"}
            </p>
         </div>
      </div>
   </td>
</tr>
<!--top-section-end-->
<tr>
   <td style="padding:0px;">
      <h2 style="margin:1em 0 12px;text-align: center;
            font-size:1.2em; font-weight: 700; line-height: 34px;
            letter-spacing: 0px;
            color: #1E232C;
            opacity: 1;">
         Détails du rendez-vous :
      </h2>
      <table style="background-color: #F2F6FC;border-radius: 10px;padding: 20px;width: 100%;margin-bottom: 15px; table-layout: fixed;">
         <tbody>
            <tr>
               <td>
                  <p style="text-align: left;
                  font-size: 0.9375em;
                  letter-spacing: 0px;
                  margin-bottom: 15px;margin-top: 0;
                  opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
display: inline-block;">${requiredData.user_role == "doctor" ? "Médecin" : "Hôpital"} :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                     display: inline-block;">${requiredData.doctorFullName}</span>
                  </p>
               </td>
               <td>
                  <p style="text-align: right;
                  font-size: 0.9375em;
                  letter-spacing: 0px;
                  margin-bottom: 15px;margin-top: 0;
                  opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
display: inline-block;">Date du rendez-vous :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                     display: inline-block;">${formattedDate}</span>
                  </p>
               </td>
            </tr>
            <tr>
               <td>
                  <p style="text-align: left;
                  font-size: 0.9375em;
                  letter-spacing: 0px;
                  margin:0;
                  opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
display: inline-block;">Heure du rendez-vous :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                     display: inline-block;">${(requiredData.action.reschedule_slot)}</span>
                  </p>
               </td>
               <td>
                  <p style="text-align: right;
                  font-size: 0.9375em;
                  letter-spacing: 0px;
                  margin:0;
                  opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
display: inline-block;">Type de rendez-vous :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                     display: inline-block;">${requiredData.doctorClinicName}</span>
                  </p>
               </td>
            </tr>
         </tbody>
      </table>
   
      <p style="text-align: center;;
            font-size: 0.9375em;
            font-weight: normal;
            line-height: 21px;
            letter-spacing: 0px;
            color: #1B1B1B;
            opacity: 1;margin: 10px 0 0 0;">Nous nous excusons pour la gêne occasionnée et vous encourageons à nous contacter pour discuter des options de rendez-vous alternatives.

      </p>
   </td>
</tr>

            ${emailFooter_fr}`
      }
   )

}
//doctor rejected rescheduled appointment arabic
exports.doctorRescheduledAppoinmentRejectedTemplate_ar = (requiredData) => {
   const dateString = requiredData.action.reschedule_date;
   const date = new Date(dateString);

   const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
   return (
      {
         "subject": 'تم رفض الموعد المعاد جدولته',
         "html": `${emailHeader_ar}
               <!--top-section-->
                     <tr>
   <td style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
      <div style="text-align: center;position: relative;">
         <img src="${process.env.WEB_ENDPOINT}/assets/images/rejected-reschdule-appoint.png" alt="image" style="width: 16em;position: relative; z-index: 1;">
         <div style="padding: 1em">
            <p style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
               تم رفض إعادة جدولة الموعد
            </p>
            <p style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
               مرحباً، ${requiredData.patientFullName}!
            </p>
            <p style="font-size:0.9375em;font-weight:normal; margin: 10px auto 0;color:#787878;">
               نأسف لإبلاغك بأنه تم رفض طلبك لإعادة جدولة الموعد مع
               <span style="font-size:0.9375em;font-weight:700;margin: 5px auto 0;color:#787878;">${requiredData.user_role == "doctor" ? 'الدكتور.'+ requiredData.doctorFullName : requiredData.doctorFullName}</span>.
            </p>
            <p style="font-size:0.9375em;font-weight:600;margin: 10px auto 0;color:#1B1B1B">
               سبب الرفض: ${requiredData.action.rejected_reason ? requiredData.action.rejected_reason : "الدكتور في خارج المدينة"}
            </p>
         </div>
      </div>
   </td>
</tr>
<!-- top-section-end -->
<tr>
   <td style="padding:0px;">
      <h2 style="margin:1em 0 12px;text-align: center; font-size:1.2em; font-weight: 700; line-height: 34px; letter-spacing: 0px; color: #1E232C; opacity: 1;">
         تفاصيل الموعد :
      </h2>
      <table style="background-color: #F2F6FC;border-radius: 10px;padding: 20px;width: 100%;margin-bottom: 15px; table-layout: fixed;">
         <tbody>
            <tr>
               <td>
                  <p style="text-align: left; font-size: 0.9375em; letter-spacing: 0px; margin-bottom: 15px;margin-top: 0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">${requiredData.user_role == "doctor" ? "الطبيب" : "مستشفى"} :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${requiredData.doctorFullName}</span>
                  </p>
               </td>
               <td>
                  <p style="text-align: right; font-size: 0.9375em; letter-spacing: 0px; margin-bottom: 15px;margin-top: 0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">تاريخ الموعد :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${formattedDate}</span>
                  </p>
               </td>
            </tr>
            <tr>
               <td>
                  <p style="text-align: left; font-size: 0.9375em; letter-spacing: 0px; margin:0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">وقت الموعد :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${(requiredData.action.reschedule_slot)}</span>
                  </p>
               </td>
               <td>
                  <p style="text-align: right; font-size: 0.9375em; letter-spacing: 0px; margin:0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">نوع الموعد :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${requiredData.doctorClinicName}</span>
                  </p>
               </td>
            </tr>
         </tbody>
      </table>
      <p style="text-align: center; font-size: 0.9375em; font-weight: normal; line-height: 21px; letter-spacing: 0px; color: #1B1B1B; opacity: 1;margin: 10px 0 0 0;">
         نعتذر عن أي إزعاج قد تسببت به هذه الحالة، ونشجعك على الاتصال بنا لمناقشة خيارات بديلة للموعد.
      </p>
   </td>
</tr>
  
            ${emailFooter_ar}`
      }
   )

}

// doctor appoinment rejected template
exports.doctorAppoinmentRejectedTemplate = (requiredData) => {
   const dateString = requiredData.action.booking_date;
   const date = new Date(dateString);

   const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
   return (
      {
         "subject": 'Your Appoinment have been rejected',
         "html": `${emailHeader}
            <tr>
            <td
               style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
               <div style="text-align: center;position: relative;">
                  <img src="${process.env.WEB_ENDPOINT}/assets/images/appointment-rejected.png" alt="image" style="width: 16em;position: relative;
                        z-index: 1;">
                  <div style="padding: 1em">
                     <p
                        style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
                        Reject appointment
                     </p>
                     <p
                        style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
                        Hi, ${requiredData.patientFullName}
                     </p>
                     <p style="font-size:0.9375em;font-weight:normal;
                           margin: 10px auto 0;color:#787878;">We regret to inform you that your appointment request with
                           <span style="font-size:0.9375em;font-weight:700;
                           margin: 5px auto 0;color:#787878;">${requiredData.user_role == "doctor" ? 'Dr.'+ requiredData.doctorFullName : requiredData.doctorFullName}</span>
                     </p>
                     <p style="font-size:0.9375em;font-weight:600;
                     margin: 10px auto 0;color:#1B1B1B">Reason for Rejection : ${requiredData.action.rejected_reason ? requiredData.action.rejected_reason : "Doctor is out of town"}
               </p>
                  </div>
               </div>
            </td>
         </tr>
         <!--top-section-end-->
         <tr>
            <td style="padding:0px;">
               <h2 style="margin:1em 0 12px;text-align: center;
                     font-size:1.2em; font-weight: 700; line-height: 34px;
                     letter-spacing: 0px;
                     color: #1E232C;
                     opacity: 1;">
                 Appointment Details :
               </h2>
               <table style="background-color: #F2F6FC;border-radius: 10px;padding: 20px;width: 100%;margin-bottom: 15px; table-layout: fixed;">
                  <tbody>
                     <tr>
                        <td>
                           <p style="text-align: left;
                           font-size: 0.9375em;
                       
                           letter-spacing: 0px;
                     margin-bottom: 15px;margin-top: 0;
                           opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
display: inline-block;">${requiredData.user_role == "doctor" ? "Doctor" : "Hospital"} :</span>
                             <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                             display: inline-block;">${requiredData.doctorFullName}</span>
                           </p>
                        </td>
                        <td>
                           <p style="text-align: right;
                           font-size: 0.9375em;
                        
                           letter-spacing: 0px;
                           margin-bottom: 15px;margin-top: 0;
                           opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
display: inline-block;">Appointment Date :</span>
                             <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                             display: inline-block;">${formattedDate}</span>
                           </p>
                        </td>
                     </tr>
                     <tr>
                        <td>
                           <p style="text-align: left;
                           font-size: 0.9375em;
                        
                           letter-spacing: 0px;
                           margin:0;
                           opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
display: inline-block;">Appointment Time :</span>
                             <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                             display: inline-block;">${(requiredData.action.slot)}</span>
                           </p>
                        </td>
                        <td>
                           <p style="text-align: right;
                           font-size: 0.9375em;
                        
                           letter-spacing: 0px;
                           margin:0;
                           opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
display: inline-block;">Appointment Type :</span>
                             <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                             display: inline-block;">${requiredData.doctorClinicName}</span>
                           </p>
                        </td>
                     </tr>
                  </tbody>
               </table>
               <div style="text-align: center;">
                  <a href="${process.env.WEB_ENDPOINT}/patient" style="display: inline-block;
                  background: #014CC4;
                  padding: 1em 5.5em;
                  font-size: 15px;
                  font-weight: 500;
                  color: #ffffff;
                  text-decoration: none;
                  border-radius: 7px;text-align: center;margin: 0px 0 15px 0px;
                 ">View Appointment</a>
               </div>
               <p style="text-align: center;;
                     font-size: 0.9375em;
                     font-weight: normal;
                     line-height: 21px;
                     letter-spacing: 0px;
                     color: #1B1B1B;
                     opacity: 1;margin: 10px 0 0 0;">We apologize for any inconvenience this may have caused and encourage you to reschedule your appointment at your convenience

               </p>
            </td>
         </tr>
            ${emailFooter}`
      }
   )

}
// doctor appoinment rejected template french
exports.doctorAppoinmentRejectedTemplate_fr = (requiredData) => {
   const dateString = requiredData.action.booking_date;
   const date = new Date(dateString);

   const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
   return (
      {
         "subject": 'Votre rendez-vous a été rejeté',
         "html": `${emailHeader_fr}
           <tr>
    <td
       style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
       <div style="text-align: center;position: relative;">
          <img src="${process.env.WEB_ENDPOINT}/assets/images/appointment-rejected.png" alt="image" style="width: 16em;position: relative;
                z-index: 1;">
          <div style="padding: 1em">
             <p
                style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
                Rendez-vous rejeté
             </p>
             <p
                style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
                Bonjour, ${requiredData.patientFullName}
             </p>
             <p style="font-size:0.9375em;font-weight:normal;
                   margin: 10px auto 0;color:#787878;">Nous avons le regret de vous informer que votre demande de rendez-vous avec
                   <span style="font-size:0.9375em;font-weight:700;
                   margin: 5px auto 0;color:#787878;">${requiredData.user_role == "doctor" ? 'Dr.'+ requiredData.doctorFullName : requiredData.doctorFullName}</span>
             </p>
             <p style="font-size:0.9375em;font-weight:600;
             margin: 10px auto 0;color:#1B1B1B">Raison du rejet : ${requiredData.action.rejected_reason ? requiredData.action.rejected_reason : "Le médecin est en déplacement"}
             </p>
          </div>
       </div>
    </td>
</tr>
<!--top-section-end-->
<tr>
    <td style="padding:0px;">
       <h2 style="margin:1em 0 12px;text-align: center;
             font-size:1.2em; font-weight: 700; line-height: 34px;
             letter-spacing: 0px;
             color: #1E232C;
             opacity: 1;">
         Détails du rendez-vous :
       </h2>
       <table style="background-color: #F2F6FC;border-radius: 10px;padding: 20px;width: 100%;margin-bottom: 15px; table-layout: fixed;">
          <tbody>
             <tr>
                <td>
                   <p style="text-align: left;
                   font-size: 0.9375em;
                   letter-spacing: 0px;
                   margin-bottom: 15px;margin-top: 0;
                   opacity: 1;">
                      <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">${requiredData.user_role == "doctor" ? "Médecin" : "Hôpital"} :</span>
                      <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                      display: inline-block;">${requiredData.doctorFullName}</span>
                   </p>
                </td>
                <td>
                   <p style="text-align: right;
                   font-size: 0.9375em;
                   letter-spacing: 0px;
                   margin-bottom: 15px;margin-top: 0;
                   opacity: 1;">
                      <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">Date du rendez-vous :</span>
                      <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                      display: inline-block;">${formattedDate}</span>
                   </p>
                </td>
             </tr>
             <tr>
                <td>
                   <p style="text-align: left;
                   font-size: 0.9375em;
                   letter-spacing: 0px;
                   margin:0;
                   opacity: 1;">
                      <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">Heure du rendez-vous :</span>
                      <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                      display: inline-block;">${(requiredData.action.slot)}</span>
                   </p>
                </td>
                <td>
                   <p style="text-align: right;
                   font-size: 0.9375em;
                   letter-spacing: 0px;
                   margin:0;
                   opacity: 1;">
                      <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">Type de rendez-vous :</span>
                      <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                      display: inline-block;">${requiredData.doctorClinicName}</span>
                   </p>
                </td>
             </tr>
          </tbody>
       </table>
       <div style="text-align: center;">
          <a href="${process.env.WEB_ENDPOINT}/patient" style="display: inline-block;
          background: #014CC4;
          padding: 1em 5.5em;
          font-size: 15px;
          font-weight: 500;
          color: #ffffff;
          text-decoration: none;
          border-radius: 7px;text-align: center;margin: 0px 0 15px 0px;
         ">Voir le rendez-vous</a>
       </div>
       <p style="text-align: center;;
             font-size: 0.9375em;
             font-weight: normal;
             line-height: 21px;
             letter-spacing: 0px;
             color: #1B1B1B;
             opacity: 1;margin: 10px 0 0 0;">
         Nous nous excusons pour tout inconvénient que cela pourrait causer et vous encourageons à reprogrammer votre rendez-vous à votre convenance
       </p>
    </td>
</tr>

            ${emailFooter_fr}`
      }
   )

}
// doctor appoinment rejected template arabic
exports.doctorAppoinmentRejectedTemplate_ar = (requiredData) => {
   const dateString = requiredData.action.booking_date;
   const date = new Date(dateString);

   const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
   return (
      {
         "subject": 'لقد تم رفض موعدك',
         "html": `${emailHeader_ar}
         <tr>
   <td style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
      <div style="text-align: center;position: relative;">
         <img src="${process.env.WEB_ENDPOINT}/assets/images/appointment-rejected.png" alt="image" style="width: 16em;position: relative; z-index: 1;">
         <div style="padding: 1em">
            <p style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
               تم رفض الموعد
            </p>
            <p style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
               مرحباً، ${requiredData.patientFullName}
            </p>
            <p style="font-size:0.9375em;font-weight:normal;margin: 10px auto 0;color:#787878;">
               نأسف لإبلاغك أن طلبك للمواعيد مع <span style="font-size:0.9375em;font-weight:700;margin: 5px auto 0;color:#787878;">د. ${requiredData.user_role == "doctor" ? 'د.'+ requiredData.doctorFullName : requiredData.doctorFullName}</span> تم رفضه
            </p>
            <p style="font-size:0.9375em;font-weight:600;margin: 10px auto 0;color:#1B1B1B">
               سبب الرفض: ${requiredData.action.rejected_reason ? requiredData.action.rejected_reason : "الطبيب خارج المدينة"}
            </p>
         </div>
      </div>
   </td>
</tr>
<!-- top-section-end -->
<tr>
   <td style="padding:0px;">
      <h2 style="margin:1em 0 12px;text-align: center;font-size:1.2em; font-weight: 700; line-height: 34px; letter-spacing: 0px; color: #1E232C; opacity: 1;">
         تفاصيل الموعد :
      </h2>
      <table style="background-color: #F2F6FC;border-radius: 10px;padding: 20px;width: 100%;margin-bottom: 15px; table-layout: fixed;">
         <tbody>
            <tr>
               <td>
                  <p style="text-align: left; font-size: 0.9375em; letter-spacing: 0px; margin-bottom: 15px;margin-top: 0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">الطبيب :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${requiredData.doctorFullName}</span>
                  </p>
               </td>
               <td>
                  <p style="text-align: right; font-size: 0.9375em; letter-spacing: 0px; margin-bottom: 15px;margin-top: 0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">تاريخ الموعد :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${formattedDate}</span>
                  </p>
               </td>
            </tr>
            <tr>
               <td>
                  <p style="text-align: left; font-size: 0.9375em; letter-spacing: 0px; margin:0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">وقت الموعد :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${(requiredData.action.slot)}</span>
                  </p>
               </td>
               <td>
                  <p style="text-align: right; font-size: 0.9375em; letter-spacing: 0px; margin:0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">نوع الموعد :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${requiredData.doctorClinicName}</span>
                  </p>
               </td>
            </tr>
         </tbody>
      </table>
      <div style="text-align: center;">
         <a href="${process.env.WEB_ENDPOINT}/patient" style="display: inline-block; background: #014CC4; padding: 1em 5.5em; font-size: 15px; font-weight: 500; color: #ffffff; text-decoration: none; border-radius: 7px;text-align: center;margin: 0px 0 15px 0px;">
            عرض الموعد
         </a>
      </div>
      <p style="text-align: center;font-size: 0.9375em; font-weight: normal; line-height: 21px; letter-spacing: 0px; color: #1B1B1B; opacity: 1;margin: 10px 0 0 0;">
         نعتذر عن أي إزعاج قد تسببت فيه هذه الحالة ونشجعك على إعادة جدولة موعدك في الوقت الذي يناسبك
      </p>
   </td>
</tr>

            ${emailFooter_ar}`
      }
   )

}



// patient appoinment rejected template
exports.patientAppoinmentRejectedTemplate = (requiredData) => {
   let appointmentDate;
   let appointmentSlot;
   if(requiredData.action.reschedule_date != null){
   const dateStringRe = requiredData.action.reschedule_date;
   const dateRe = new Date(dateStringRe);
   const rescheduleformattedDate = `${String(dateRe.getDate()).padStart(2, '0')}/${String(dateRe.getMonth() + 1).padStart(2, '0')}/${dateRe.getFullYear()}`;
    appointmentDate =  rescheduleformattedDate;
    appointmentSlot = requiredData.action.reschedule_slot;
   }else{
      const dateString = requiredData.action.booking_date;
      const date = new Date(dateString);
   
   
      const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
       appointmentDate =  formattedDate;
       appointmentSlot = requiredData.action.slot;
   }
   return (
      {
         "subject": 'Your Appoinment have been rejected.',
         "html": `${emailHeader}
           <tr>
                           <td
                              style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
                              <div style="text-align: center;position: relative;">
                                 <img src="${process.env.WEB_ENDPOINT}/assets/images/appointment-rejected.png" alt="image" style="width: 16em;position: relative;
                                       z-index: 1;">
                                 <div style="padding: 1em">
                                    <p
                                       style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
                                       Appointment Cancellation
                                    </p>
                                    <p
                                       style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
                                       Dear ${requiredData.user_role == "doctor" ? 'Dr.'+ requiredData.doctorFullName : requiredData.doctorFullName}
                                    </p>
                                    <p style="font-size:0.9375em;font-weight:normal;
                                          margin: 10px auto 0;color:#787878;">We regret to inform you that your appointment with ${requiredData.patientFullName} scheduled for
                                          <span style="font-size:0.9375em;font-weight:700;
                                          margin: 5px auto 0;color:#787878;"> ${appointmentDate} </span>at  <span style="font-size:0.9375em;font-weight:700;
                                          margin: 5px auto 0;color:#787878;"> ${(appointmentSlot)} </span> has been cancelled by the patient.
                                    </p>
                                 </div>
                              </div>
                           </td>
                        </tr>
           ${emailFooter}`
      }
   )

}
// patient appoinment rejected template
exports.patientAppoinmentRejectedTemplate_fr = (requiredData) => {
   let appointmentDate;
   let appointmentSlot;
   if(requiredData.action.reschedule_date != null){
   const dateStringRe = requiredData.action.reschedule_date;
   const dateRe = new Date(dateStringRe);
   const rescheduleformattedDate = `${String(dateRe.getDate()).padStart(2, '0')}/${String(dateRe.getMonth() + 1).padStart(2, '0')}/${dateRe.getFullYear()}`;
    appointmentDate =  rescheduleformattedDate;
    appointmentSlot = requiredData.action.reschedule_slot;
   }else{
      const dateString = requiredData.action.booking_date;
      const date = new Date(dateString);
   
   
      const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
       appointmentDate =  formattedDate;
       appointmentSlot = requiredData.action.slot;
   }
   return (
      {
         "subject": 'Votre rendez-vous a été rejeté',
         "html": `${emailHeader_fr}
        <tr>
   <td style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
      <div style="text-align: center;position: relative;">
         <img src="${process.env.WEB_ENDPOINT}/assets/images/appointment-rejected.png" alt="image" style="width: 16em;position: relative; z-index: 1;">
         <div style="padding: 1em">
            <p style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
               Annulation de rendez-vous
            </p>
            <p style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
               Cher ${requiredData.user_role == "doctor" ? 'Dr.'+ requiredData.doctorFullName : requiredData.doctorFullName}
            </p>
            <p style="font-size:0.9375em;font-weight:normal;margin: 10px auto 0;color:#787878;">
               Nous avons le regret de vous informer que votre rendez-vous avec ${requiredData.patientFullName} prévu pour le
               <span style="font-size:0.9375em;font-weight:700;margin: 5px auto 0;color:#787878;">${appointmentDate}</span> à 
               <span style="font-size:0.9375em;font-weight:700;margin: 5px auto 0;color:#787878;">${(appointmentSlot)}</span> a été annulé par le patient.
            </p>
         </div>
      </div>
   </td>
</tr>

           ${emailFooter_fr}`
      }
   )

}
// patient appoinment rejected template arabic
exports.patientAppoinmentRejectedTemplate_ar = (requiredData) => {
   let appointmentDate;
   let appointmentSlot;
   if(requiredData.action.reschedule_date != null){
   const dateStringRe = requiredData.action.reschedule_date;
   const dateRe = new Date(dateStringRe);
   const rescheduleformattedDate = `${String(dateRe.getDate()).padStart(2, '0')}/${String(dateRe.getMonth() + 1).padStart(2, '0')}/${dateRe.getFullYear()}`;
    appointmentDate =  rescheduleformattedDate;
    appointmentSlot = requiredData.action.reschedule_slot;
   }else{
      const dateString = requiredData.action.booking_date;
      const date = new Date(dateString);
   
   
      const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
       appointmentDate =  formattedDate;
       appointmentSlot = requiredData.action.slot;
   }
   return (
      {
         "subject": 'لقد تم رفض موعدك',
         "html": `${emailHeader_ar}
          <tr>
   <td style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
      <div style="text-align: center;position: relative;">
         <img src="${process.env.WEB_ENDPOINT}/assets/images/appointment-rejected.png" alt="image" style="width: 16em;position: relative; z-index: 1;">
         <div style="padding: 1em">
            <p style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
               إلغاء الموعد
            </p>
            <p style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
                الدكتور ${requiredData.user_role == "doctor" ? 'عزيزي.'+ requiredData.doctorFullName : requiredData.doctorFullName}
            </p>
            <p style="font-size:0.9375em;font-weight:normal; margin: 10px auto 0;color:#787878;">
               نأسف لإبلاغك بأن موعدك مع ${requiredData.patientFullName} المقرر في 
               <span style="font-size:0.9375em;font-weight:700;margin: 5px auto 0;color:#787878;">${appointmentDate}</span>
               في الساعة <span style="font-size:0.9375em;font-weight:700;margin: 5px auto 0;color:#787878;">${(appointmentSlot)}</span> 
               قد تم إلغاؤه من قبل المريض.
            </p>
         </div>
      </div>
   </td>
</tr>

           ${emailFooter_ar}`
      }
   )

}
// new appointment

exports.newAppointmentEmailTemplate = (requiredData) => {
   const dateString = requiredData.action.booking_date;
   const date = new Date(dateString);

   const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
   return (
      {
         "subject": 'New appointment',
         "html": `${emailHeader}
            <tr>
            <td
               style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
               <div style="text-align: center;position: relative;">
                  <img src="${process.env.WEB_ENDPOINT}/assets/images/new-appointment.png" alt="image" style="width: 16em;position: relative;
                        z-index: 1;">
                  <div style="padding: 1em">
                     <p
                        style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
                        New appointment
                     </p>
                     <p
                        style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
                        Dear ${requiredData.user_role == "doctor" ? 'Dr.'+ requiredData.doctorFullName : requiredData.doctorFullName}
                     </p>
                     <p style="font-size:0.9375em;font-weight:normal;
                           margin: 10px auto 0;color:#787878;">You have a new appointment request.
                        Please log in to your account to view and manage your appointments.
                     </p>
                  </div>
               </div>
            </td>
         </tr>
         <!--top-section-end-->
         <tr>
            <td style="padding:0px;">
               <h2 style="margin:1em 0 12px;text-align: center;
                     font-size:1.2em; font-weight: 700; line-height: 34px;
                     letter-spacing: 0px;
                     color: #1E232C;
                     opacity: 1;">
                  To view and confirm this appointment, please click the button below:
               </h2>
               <table style="background-color: #F2F6FC;border-radius: 10px;padding: 20px;width: 100%;margin-bottom: 15px; table-layout: fixed;">
                  <tbody>
                     <tr>
                        <td>
                           <p style="text-align: left;
                           font-size: 0.9375em;
                       
                           letter-spacing: 0px;
                     margin-bottom: 15px;margin-top: 0;
                           opacity: 1;"><span style="color: #8391A1;font-weight: 600; margin-bottom: 4px;
display: inline-block;">Patient Name :</span>
                             <span style="color: #1E232C;font-weight: 700;">${requiredData.patientFullName}</span>
                           </p>
                        </td>
                        <td>
                           <p style="text-align: right;
                           font-size: 0.9375em;
                        
                           letter-spacing: 0px;
                           margin-bottom: 15px;margin-top: 0;
                           opacity: 1;"><span style="color: #8391A1;font-weight: 600;    margin-bottom: 4px;
display: inline-block;">Appointment Date :</span>
                             <span style="color: #1E232C;font-weight: 700;">${formattedDate}</span>
                           </p>
                        </td>
                     </tr>
                     <tr>
                        <td>
                           <p style="text-align: left;
                           font-size: 0.9375em;
                        
                           letter-spacing: 0px;
                           margin:0;
                           opacity: 1;"><span style="color: #8391A1;font-weight: 600;    margin-bottom: 4px;
display: inline-block;">Appointment Time :</span>
                             <span style="color: #1E232C;font-weight: 700;">${(requiredData.action.slot)}</span>
                           </p>
                        </td>
                        <td>
                           <p style="text-align: right;
                           font-size: 0.9375em;
                        
                           letter-spacing: 0px;
                           margin:0;
                           opacity: 1;"><span style="color: #8391A1;font-weight: 600;    margin-bottom: 4px;
display: inline-block;">Appointment Type :</span>
                             <span style="color: #1E232C;font-weight: 700;">${requiredData.doctorClinicName}</span>
                           </p>
                        </td>
                     </tr>
                  </tbody>
               </table>
               <div style="text-align: center;">
                  <a href="${process.env.WEB_ENDPOINT}/doctor" style="display: inline-block;
                  background: #014CC4;
                  padding: 1em 5.5em;
                  font-size: 15px;
                  font-weight: 500;
                  color: #ffffff;
                  text-decoration: none;
                  border-radius: 7px;text-align: center;margin: 0px 0 15px 0px;
                 ">View Appointment</a>
               </div>
               <p style="text-align: center;;
                     font-size: 0.9375em;
                     font-weight: normal;
                     line-height: 21px;
                     letter-spacing: 0px;
                     color: #1B1B1B;
                     opacity: 1;margin: 10px 0 0 0;">Thank you for your attention to this notification

               </p>
            </td>
         </tr>
         ${emailFooter}`
      }
   )
}

// new appointment arabic
exports.newAppointmentEmailTemplate_ar = (requiredData) => {
   const dateString = requiredData.action.booking_date;
   const date = new Date(dateString);

   const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
   return (
      {
         "subject": 'موعد جديد',
         "html": `${emailHeader_ar}
           <tr>
  <td
     style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
     <div style="text-align: center;position: relative;">
        <img src="${process.env.WEB_ENDPOINT}/assets/images/new-appointment.png" alt="image" style="width: 16em;position: relative;
              z-index: 1;">
        <div style="padding: 1em">
           <p
              style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
              موعد جديد
           </p>
           <p
              style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
              ${  requiredData.user_role =='doctor' ? 'عزيزي الدكتور' + requiredData.doctorFullName : requiredData.doctorFullName}
           </p>
           <p style="font-size:0.9375em;font-weight:normal;
                 margin: 10px auto 0;color:#787878;">
              لديك طلب موعد جديد. 
              يرجى تسجيل الدخول إلى حسابك لمراجعة وإدارة مواعيدك.
           </p>
        </div>
     </div>
  </td>
</tr>
<!--top-section-end-->
<tr>
  <td style="padding:0px;">
     <h2 style="margin:1em 0 12px;text-align: center;
           font-size:1.2em; font-weight: 700; line-height: 34px;
           letter-spacing: 0px;
           color: #1E232C;
           opacity: 1;">
        لعرض وتأكيد هذا الموعد، يرجى النقر على الزر أدناه:
     </h2>
     <table style="background-color: #F2F6FC;border-radius: 10px;padding: 20px;width: 100%;margin-bottom: 15px; table-layout: fixed;">
        <tbody>
           <tr>
              <td>
                 <p style="text-align: left;
                 font-size: 0.9375em;
                 letter-spacing: 0px;
                 margin-bottom: 15px;margin-top: 0;
                 opacity: 1;">
                    <span style="color: #8391A1;font-weight: 600; margin-bottom: 4px;
    display: inline-block;">اسم المريض :</span>
                    <span style="color: #1E232C;font-weight: 700;">${requiredData.patientFullName}</span>
                 </p>
              </td>
              <td>
                 <p style="text-align: right;
                 font-size: 0.9375em;
                 letter-spacing: 0px;
                 margin-bottom: 15px;margin-top: 0;
                 opacity: 1;">
                    <span style="color: #8391A1;font-weight: 600;    margin-bottom: 4px;
    display: inline-block;">تاريخ الموعد :</span>
                    <span style="color: #1E232C;font-weight: 700;">${formattedDate}</span>
                 </p>
              </td>
           </tr>
           <tr>
              <td>
                 <p style="text-align: left;
                 font-size: 0.9375em;
                 letter-spacing: 0px;
                 margin:0;
                 opacity: 1;">
                    <span style="color: #8391A1;font-weight: 600;    margin-bottom: 4px;
    display: inline-block;">وقت الموعد :</span>
                    <span style="color: #1E232C;font-weight: 700;">${(requiredData.action.slot)}</span>
                 </p>
              </td>
              <td>
                 <p style="text-align: right;
                 font-size: 0.9375em;
                 letter-spacing: 0px;
                 margin:0;
                 opacity: 1;">
                    <span style="color: #8391A1;font-weight: 600;    margin-bottom: 4px;
    display: inline-block;">نوع الموعد :</span>
                    <span style="color: #1E232C;font-weight: 700;">${requiredData.doctorClinicName}</span>
                 </p>
              </td>
           </tr>
        </tbody>
     </table>
     <div style="text-align: center;">
        <a href="${process.env.WEB_ENDPOINT}/doctor" style="display: inline-block;
        background: #014CC4;
        padding: 1em 5.5em;
        font-size: 15px;
        font-weight: 500;
        color: #ffffff;
        text-decoration: none;
        border-radius: 7px;text-align: center;margin: 0px 0 15px 0px;
       ">عرض الموعد</a>
     </div>
     <p style="text-align: center;;
           font-size: 0.9375em;
           font-weight: normal;
           line-height: 21px;
           letter-spacing: 0px;
           color: #1B1B1B;
           opacity: 1;margin: 10px 0 0 0;">
        شكراً على اهتمامك بهذا الإشعار
     </p>
  </td>
</tr>

         ${emailFooter_ar}`
      }
   )
}

// new appointment french
exports.newAppointmentEmailTemplate_fr = (requiredData) => {
   const dateString = requiredData.action.booking_date;
   const date = new Date(dateString);

   const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
   return (
      {
         "subject": 'Nouveau rendez-vous',
         "html": `${emailHeader_fr}
           <tr>
  <td
     style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
     <div style="text-align: center;position: relative;">
        <img src="${process.env.WEB_ENDPOINT}/assets/images/new-appointment.png" alt="image" style="width: 16em;position: relative;
              z-index: 1;">
        <div style="padding: 1em">
           <p
              style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
              Nouveau rendez-vous
           </p>
           <p
              style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
              Cher ${requiredData.user_role == "doctor" ? 'Dr.'+ requiredData.doctorFullName : requiredData.doctorFullName}
           </p>
           <p style="font-size:0.9375em;font-weight:normal;
                 margin: 10px auto 0;color:#787878;">
              Vous avez une nouvelle demande de rendez-vous. 
              Veuillez vous connecter à votre compte pour voir et gérer vos rendez-vous.
           </p>
        </div>
     </div>
  </td>
</tr>
<!--top-section-end-->
<tr>
  <td style="padding:0px;">
     <h2 style="margin:1em 0 12px;text-align: center;
           font-size:1.2em; font-weight: 700; line-height: 34px;
           letter-spacing: 0px;
           color: #1E232C;
           opacity: 1;">
        Pour voir et confirmer ce rendez-vous, veuillez cliquer sur le bouton ci-dessous :
     </h2>
     <table style="background-color: #F2F6FC;border-radius: 10px;padding: 20px;width: 100%;margin-bottom: 15px; table-layout: fixed;">
        <tbody>
           <tr>
              <td>
                 <p style="text-align: left;
                 font-size: 0.9375em;
                 letter-spacing: 0px;
                 margin-bottom: 15px;margin-top: 0;
                 opacity: 1;">
                    <span style="color: #8391A1;font-weight: 600; margin-bottom: 4px;
    display: inline-block;">Nom du patient :</span>
                    <span style="color: #1E232C;font-weight: 700;">${requiredData.patientFullName}</span>
                 </p>
              </td>
              <td>
                 <p style="text-align: right;
                 font-size: 0.9375em;
                 letter-spacing: 0px;
                 margin-bottom: 15px;margin-top: 0;
                 opacity: 1;">
                    <span style="color: #8391A1;font-weight: 600;    margin-bottom: 4px;
    display: inline-block;">Date du rendez-vous :</span>
                    <span style="color: #1E232C;font-weight: 700;">${formattedDate}</span>
                 </p>
              </td>
           </tr>
           <tr>
              <td>
                 <p style="text-align: left;
                 font-size: 0.9375em;
                 letter-spacing: 0px;
                 margin:0;
                 opacity: 1;">
                    <span style="color: #8391A1;font-weight: 600;    margin-bottom: 4px;
    display: inline-block;">Heure du rendez-vous :</span>
                    <span style="color: #1E232C;font-weight: 700;">${(requiredData.action.slot)}</span>
                 </p>
              </td>
              <td>
                 <p style="text-align: right;
                 font-size: 0.9375em;
                 letter-spacing: 0px;
                 margin:0;
                 opacity: 1;">
                    <span style="color: #8391A1;font-weight: 600;    margin-bottom: 4px;
    display: inline-block;">Type de rendez-vous :</span>
                    <span style="color: #1E232C;font-weight: 700;">${requiredData.doctorClinicName}</span>
                 </p>
              </td>
           </tr>
        </tbody>
     </table>
     <div style="text-align: center;">
        <a href="${process.env.WEB_ENDPOINT}/doctor" style="display: inline-block;
        background: #014CC4;
        padding: 1em 5.5em;
        font-size: 15px;
        font-weight: 500;
        color: #ffffff;
        text-decoration: none;
        border-radius: 7px;text-align: center;margin: 0px 0 15px 0px;
       ">Voir le rendez-vous</a>
     </div>
     <p style="text-align: center;;
           font-size: 0.9375em;
           font-weight: normal;
           line-height: 21px;
           letter-spacing: 0px;
           color: #1B1B1B;
           opacity: 1;margin: 10px 0 0 0;">
        Merci de votre attention à cette notification
     </p>
  </td>
</tr>
         ${emailFooter_fr}`
      }
   )
}

// completed appointment email for patient
exports.completedAppointmentPatientTemplate = (requiredData) => {
   let appointmentDate;
   let appointmentSlot;
   if(requiredData.action.reschedule_date != null){
   const dateStringRe = requiredData.action.reschedule_date;
   const dateRe = new Date(dateStringRe);
   const rescheduleformattedDate = `${String(dateRe.getDate()).padStart(2, '0')}/${String(dateRe.getMonth() + 1).padStart(2, '0')}/${dateRe.getFullYear()}`;
    appointmentDate =  rescheduleformattedDate;
    appointmentSlot = requiredData.action.reschedule_slot;
   }else{
      const dateString = requiredData.action.booking_date;
      const date = new Date(dateString);
   
   
      const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
       appointmentDate =  formattedDate;
       appointmentSlot = requiredData.action.slot;
   }
   return (
      {
         "subject": 'Completed appointment',
         "html": `${emailHeader}
           <tr>
                           <td
                              style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
                              <div style="text-align: center;position: relative;">
                                 <img src="${process.env.WEB_ENDPOINT}/assets/images/appointment-compltd.png" alt="image" style="width: 16em;position: relative;
                                       z-index: 1;">
                                 <div style="padding: 1em">
                                    <p
                                       style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
                                       Completed appointment
                                    </p>
                                    <p
                                       style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
                                       Hi , ${requiredData.patientFullName}
                                    </p>
                                    <p style="font-size:0.9375em;font-weight:normal;
                                          margin: 10px auto 0;color:#787878;">We are pleased to inform you that your appointment with
                                          <span style="font-size:0.9375em;font-weight:700;
                                          margin: 5px auto 0;color:#787878;">${requiredData.user_role == "doctor" ? 'Dr.'+ requiredData.doctorFullName : requiredData.hospital_name}</span> has been successfully completed.
                                    </p>
                                 </div>
                              </div>
                           </td>
                        </tr>
                        <!--top-section-end-->
                        <tr>
                           <td style="padding:0px;">
                              <h2 style="margin:1em 0 12px;text-align: center;
                                    font-size:1.2em; font-weight: 700; line-height: 34px;
                                    letter-spacing: 0px;
                                    color: #1E232C;
                                    opacity: 1;">
                                Appointment Details :
                              </h2>
                              <table style="background-color: #F2F6FC;border-radius: 10px;padding: 20px;width: 100%;margin-bottom: 15px; table-layout: fixed;">
                                 <tbody>
                                    <tr>
                                       <td>
                                          <p style="text-align: left;
                                          font-size: 0.9375em;
                                      
                                          letter-spacing: 0px;
                                    margin-bottom: 15px;margin-top: 0;
                                          opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">${requiredData.user_role == "doctor" ? "Doctor" : "Hospital"} :</span>
                                            <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                                            display: inline-block;">${requiredData.user_role == "doctor" ? 'Dr.'+ requiredData.doctorFullName : requiredData.hospital_name}</span>
                                          </p>
                                       </td>
                                       <td>
                                          <p style="text-align: right;
                                          font-size: 0.9375em;
                                       
                                       letter-spacing: 0px;
                                       margin-bottom: 15px;margin-top: 0;
                                       opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
 display: inline-block;">Appointment Date :</span>
                                         <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                                         display: inline-block;">${appointmentDate}</span>
                                       </p>
                                    </td>
                                 </tr>
                                 <tr>
                                    <td>
                                       <p style="text-align: left;
                                       font-size: 0.9375em;
                                    
                                       letter-spacing: 0px;
                                       margin:0;
                                       opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
 display: inline-block;">Appointment Time :</span>
                                         <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                                         display: inline-block;">${(appointmentSlot)}</span>
                                       </p>
                                    </td>
                                    <td>
                                       <p style="text-align: right;
                                       font-size: 0.9375em;
                                    
                                       letter-spacing: 0px;
                                       margin:0;
                                       opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
 display: inline-block;">Appointment Type :</span>
                                         <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                                         display: inline-block;">${requiredData.doctorClinicName}</span>
                                       </p>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                         
                           <p style="text-align: center;;
                                 font-size: 0.9375em;
                                 font-weight: normal;
                                 line-height: 21px;
                                 letter-spacing: 0px;
                                 color: #1B1B1B;
                                 opacity: 1;margin: 10px 0 0 0;">Thank you for choosing Dr. Hivey. We look forward to seeing you at your next appointment.

                           </p>
                        </td>
                     </tr>
        ${emailFooter}`
      }
   )
}
// completed appointment email for patient
exports.completedAppointmentPatientTemplate_fr = (requiredData) => {
   let appointmentDate;
   let appointmentSlot;
   if(requiredData.action.reschedule_date != null){
   const dateStringRe = requiredData.action.reschedule_date;
   const dateRe = new Date(dateStringRe);
   const rescheduleformattedDate = `${String(dateRe.getDate()).padStart(2, '0')}/${String(dateRe.getMonth() + 1).padStart(2, '0')}/${dateRe.getFullYear()}`;
    appointmentDate =  rescheduleformattedDate;
    appointmentSlot = requiredData.action.reschedule_slot;
   }else{
      const dateString = requiredData.action.booking_date;
      const date = new Date(dateString);
   
   
      const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
       appointmentDate =  formattedDate;
       appointmentSlot = requiredData.action.slot;
   }
   return (
      {
         "subject": 'Rendez-vous terminé',
         "html": `${emailHeader_fr}
       <tr>
   <td style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
      <div style="text-align: center;position: relative;">
         <img src="${process.env.WEB_ENDPOINT}/assets/images/appointment-compltd.png" alt="image" style="width: 16em;position: relative; z-index: 1;">
         <div style="padding: 1em">
            <p style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
               Rendez-vous terminé
            </p>
            <p style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
               Bonjour, ${requiredData.patientFullName}
            </p>
            <p style="font-size:0.9375em;font-weight:normal;margin: 10px auto 0;color:#787878;">
               Nous avons le plaisir de vous informer que votre rendez-vous avec 
               <span style="font-size:0.9375em;font-weight:700;margin: 5px auto 0;color:#787878;">${requiredData.user_role == "doctor" ? 'Dr.'+ requiredData.doctorFullName : requiredData.hospital_name}</span> a été réussi.
            </p>
         </div>
      </div>
   </td>
</tr>
<!--top-section-end-->
<tr>
   <td style="padding:0px;">
      <h2 style="margin:1em 0 12px;text-align: center;font-size:1.2em; font-weight: 700; line-height: 34px; letter-spacing: 0px; color: #1E232C; opacity: 1;">
         Détails du rendez-vous :
      </h2>
      <table style="background-color: #F2F6FC;border-radius: 10px;padding: 20px;width: 100%;margin-bottom: 15px; table-layout: fixed;">
         <tbody>
            <tr>
               <td>
                  <p style="text-align: left;font-size: 0.9375em;letter-spacing: 0px;margin-bottom: 15px;margin-top: 0;opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">${requiredData.user_role == "doctor" ? "Médecin" : "Hôpital"} :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${requiredData.user_role == "doctor" ? 'Dr.'+ requiredData.doctorFullName : requiredData.hospital_name}</span>
                  </p>
               </td>
               <td>
                  <p style="text-align: right;font-size: 0.9375em;letter-spacing: 0px;margin-bottom: 15px;margin-top: 0;opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">Date du rendez-vous :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${appointmentDate}</span>
                  </p>
               </td>
            </tr>
            <tr>
               <td>
                  <p style="text-align: left;font-size: 0.9375em;letter-spacing: 0px;margin:0;opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">Heure du rendez-vous :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${(appointmentSlot)}</span>
                  </p>
               </td>
               <td>
                  <p style="text-align: right;font-size: 0.9375em;letter-spacing: 0px;margin:0;opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">Type de rendez-vous :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${requiredData.doctorClinicName}</span>
                  </p>
               </td>
            </tr>
         </tbody>
      </table>
      <p style="text-align: center;font-size: 0.9375em;font-weight: normal;line-height: 21px;letter-spacing: 0px;color: #1B1B1B;opacity: 1;margin: 10px 0 0 0;">
         Merci d'avoir choisi Dr. Hivey. Nous avons hâte de vous voir lors de votre prochain rendez-vous.
      </p>
   </td>
</tr>

                      
        ${emailFooter_fr}`
      }
   )
}
// completed appointment email for patient
exports.completedAppointmentPatientTemplate_ar = (requiredData) => {
   let appointmentDate;
   let appointmentSlot;
   if(requiredData.action.reschedule_date != null){
   const dateStringRe = requiredData.action.reschedule_date;
   const dateRe = new Date(dateStringRe);
   const rescheduleformattedDate = `${String(dateRe.getDate()).padStart(2, '0')}/${String(dateRe.getMonth() + 1).padStart(2, '0')}/${dateRe.getFullYear()}`;
    appointmentDate =  rescheduleformattedDate;
    appointmentSlot = requiredData.action.reschedule_slot;
   }else{
      const dateString = requiredData.action.booking_date;
      const date = new Date(dateString);
   
   
      const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
       appointmentDate =  formattedDate;
       appointmentSlot = requiredData.action.slot;
   }
   return (
      {
         "subject": 'الموعد المكتمل',
         "html": `${emailHeader_ar}
          <tr>
   <td style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
      <div style="text-align: center;position: relative;">
         <img src="${process.env.WEB_ENDPOINT}/assets/images/appointment-compltd.png" alt="image" style="width: 16em;position: relative; z-index: 1;">
         <div style="padding: 1em">
            <p style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
               الموعد المكتمل
            </p>
            <p style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
               مرحباً، ${requiredData.patientFullName}
            </p>
            <p style="font-size:0.9375em;font-weight:normal; margin: 10px auto 0;color:#787878;">
               يسرنا إبلاغك بأنه قد تم إتمام موعدك مع 
               <span style="font-size:0.9375em;font-weight:700;margin: 5px auto 0;color:#787878;"> ${requiredData.user_role == "doctor" ? 'الدكتور.'+ requiredData.doctorFullName : requiredData.hospital_name}</span> بنجاح.
            </p>
         </div>
      </div>
   </td>
</tr>
<!--top-section-end-->
<tr>
   <td style="padding:0px;">
      <h2 style="margin:1em 0 12px;text-align: center; font-size:1.2em; font-weight: 700; line-height: 34px; letter-spacing: 0px; color: #1E232C; opacity: 1;">
         تفاصيل الموعد:
      </h2>
      <table style="background-color: #F2F6FC;border-radius: 10px;padding: 20px;width: 100%;margin-bottom: 15px; table-layout: fixed;">
         <tbody>
            <tr>
               <td>
                  <p style="text-align: left; font-size: 0.9375em; letter-spacing: 0px; margin-bottom: 15px;margin-top: 0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">${requiredData.user_role == "doctor" ? "الطبيب" : "مستشفى"} :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${requiredData.user_role == "doctor" ? 'الدكتور.'+ requiredData.doctorFullName : requiredData.hospital_name}</span>
                  </p>
               </td>
               <td>
                  <p style="text-align: right; font-size: 0.9375em; letter-spacing: 0px; margin-bottom: 15px;margin-top: 0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">تاريخ الموعد:</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${appointmentDate}</span>
                  </p>
               </td>
            </tr>
            <tr>
               <td>
                  <p style="text-align: left; font-size: 0.9375em; letter-spacing: 0px; margin:0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">وقت الموعد:</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${(appointmentSlot)}</span>
                  </p>
               </td>
               <td>
                  <p style="text-align: right; font-size: 0.9375em; letter-spacing: 0px; margin:0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">نوع الموعد:</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${requiredData.doctorClinicName}</span>
                  </p>
               </td>
            </tr>
         </tbody>
      </table>
      <p style="text-align: center; font-size: 0.9375em; font-weight: normal; line-height: 21px; letter-spacing: 0px; color: #1B1B1B; opacity: 1;margin: 10px 0 0 0;">
         شكراً لاختيارك Dr. Hivey. نتطلع إلى رؤيتك في موعدك التالي.
      </p>
   </td>
</tr>

                      
            
        ${emailFooter_ar}`
      }
   )
}
// completed appointment email for doctor
exports.completedAppointmentDoctorTemplate = (requiredData) => {
   let appointmentDate;
   let appointmentSlot;
   if(requiredData.action.reschedule_date != null){
   const dateStringRe = requiredData.action.reschedule_date;
   const dateRe = new Date(dateStringRe);
   const rescheduleformattedDate = `${String(dateRe.getDate()).padStart(2, '0')}/${String(dateRe.getMonth() + 1).padStart(2, '0')}/${dateRe.getFullYear()}`;
    appointmentDate =  rescheduleformattedDate;
    appointmentSlot = requiredData.action.reschedule_slot;
   }else{
      const dateString = requiredData.action.booking_date;
      const date = new Date(dateString);
   
   
      const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
       appointmentDate =  formattedDate;
       appointmentSlot = requiredData.action.slot;
   }

   return (
      {
         "subject": 'Completed appointment',
         "html": `${emailHeader}
           <tr>
                           <td
                              style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
                              <div style="text-align: center;position: relative;">
                                 <img src="${process.env.WEB_ENDPOINT}/assets/images/appointment-compltd.png" alt="image" style="width: 16em;position: relative;
                                       z-index: 1;">
                                 <div style="padding: 1em">
                                    <p
                                       style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
                                       Completed appointment
                                    </p>
                                    <p
                                       style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
                                       Dear ${requiredData.user_role == "doctor" ? 'Dr.'+ requiredData.doctorFullName : requiredData.hospital_name}
                                    </p>
                                    <p style="font-size:0.9375em;font-weight:normal;
                                          margin: 10px auto 0;color:#787878;">This is to confirm that the appointment with
                                          <span style="font-size:0.9375em;font-weight:700;
                                          margin: 5px auto 0;color:#787878;"> ${requiredData.patientFullName}</span> has been successfully completed.
                                    </p>
                                 </div>
                              </div>
                           </td>
                        </tr>
                        <!--top-section-end-->
                        <tr>
                           <td style="padding:0px;">
                              <h2 style="margin:1em 0 12px;text-align: center;
                                    font-size:1.2em; font-weight: 700; line-height: 34px;
                                    letter-spacing: 0px;
                                    color: #1E232C;
                                    opacity: 1;">
                                Appointment Details :
                              </h2>
                              <table style="background-color: #F2F6FC;border-radius: 10px;padding: 20px;width: 100%;margin-bottom: 15px; table-layout: fixed;">
                                 <tbody>
                                    <tr>
                                       <td>
                                          <p style="text-align: left;
                                          font-size: 0.9375em;
                                      
                                          letter-spacing: 0px;
                                    margin-bottom: 15px;margin-top: 0;
                                          opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">${requiredData.user_role == "doctor" ? "Doctor" : "Hospital"} :</span>
                                            <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                                            display: inline-block;">${requiredData.user_role == "doctor" ? 'Dr.'+ requiredData.doctorFullName : requiredData.hospital_name}</span>
                                          </p>
                                       </td>
                                       <td>
                                          <p style="text-align: right;
                                          font-size: 0.9375em;
                                       
                                          letter-spacing: 0px;
                                          margin-bottom: 15px;margin-top: 0;
                                          opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">Appointment Date :</span>
                                            <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                                            display: inline-block;">${appointmentDate}</span>
                                          </p>
                                       </td>
                                    </tr>
                                    <tr>
                                       <td>
                                          <p style="text-align: left;
                                          font-size: 0.9375em;
                                       
                                          letter-spacing: 0px;
                                          margin:0;
                                          opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">Appointment Time :</span>
                                            <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                                            display: inline-block;">${(appointmentSlot)}</span>
                                          </p>
                                       </td>
                                       <td>
                                          <p style="text-align: right;
                                          font-size: 0.9375em;
                                       
                                          letter-spacing: 0px;
                                          margin:0;
                                          opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">Appointment Type :</span>
                                            <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                                            display: inline-block;">${requiredData.doctorClinicName}</span>
                                          </p>
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                            
                              <p style="text-align: center;;
                                    font-size: 0.9375em;
                                    font-weight: normal;
                                    line-height: 21px;
                                    letter-spacing: 0px;
                                    color: #1B1B1B;
                                    opacity: 1;margin: 10px 0 0 0;">Thank you for your attention to this matter.

                              </p>
                           </td>
                        </tr>
        ${emailFooter}`
      }
   )
}
// completed appointment email for doctor french
exports.completedAppointmentDoctorTemplate_fr = (requiredData) => {
   let appointmentDate;
   let appointmentSlot;
   if(requiredData.action.reschedule_date != null){
   const dateStringRe = requiredData.action.reschedule_date;
   const dateRe = new Date(dateStringRe);
   const rescheduleformattedDate = `${String(dateRe.getDate()).padStart(2, '0')}/${String(dateRe.getMonth() + 1).padStart(2, '0')}/${dateRe.getFullYear()}`;
    appointmentDate =  rescheduleformattedDate;
    appointmentSlot = requiredData.action.reschedule_slot;
   }else{
      const dateString = requiredData.action.booking_date;
      const date = new Date(dateString);
   
   
      const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
       appointmentDate =  formattedDate;
       appointmentSlot = requiredData.action.slot;
   }

   return (
      {
         "subject": 'Rendez-vous terminé',
         "html": `${emailHeader_fr}
         <tr>
   <td style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
      <div style="text-align: center;position: relative;">
         <img src="${process.env.WEB_ENDPOINT}/assets/images/appointment-compltd.png" alt="image" style="width: 16em;position: relative; z-index: 1;">
         <div style="padding: 1em">
            <p style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
               Rendez-vous terminé
            </p>
            <p style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
               Cher ${requiredData.user_role == "doctor" ? 'Dr.'+ requiredData.doctorFullName : requiredData.hospital_name}
            </p>
            <p style="font-size:0.9375em;font-weight:normal;margin: 10px auto 0;color:#787878;">
               Ceci est pour confirmer que le rendez-vous avec 
               <span style="font-size:0.9375em;font-weight:700;margin: 5px auto 0;color:#787878;">${requiredData.patientFullName}</span> a été terminé avec succès.
            </p>
         </div>
      </div>
   </td>
</tr>
<!--top-section-end-->
<tr>
   <td style="padding:0px;">
      <h2 style="margin:1em 0 12px;text-align: center;font-size:1.2em; font-weight: 700; line-height: 34px; letter-spacing: 0px; color: #1E232C; opacity: 1;">
         Détails du rendez-vous :
      </h2>
      <table style="background-color: #F2F6FC;border-radius: 10px;padding: 20px;width: 100%;margin-bottom: 15px; table-layout: fixed;">
         <tbody>
            <tr>
               <td>
                  <p style="text-align: left;font-size: 0.9375em;letter-spacing: 0px;margin-bottom: 15px;margin-top: 0;opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">${requiredData.user_role == "doctor" ? "Médecin" : "Hôpital"} :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${requiredData.user_role == "doctor" ? 'Dr.'+ requiredData.doctorFullName : requiredData.hospital_name}</span>
                  </p>
               </td>
               <td>
                  <p style="text-align: right;font-size: 0.9375em;letter-spacing: 0px;margin-bottom: 15px;margin-top: 0;opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">Date du rendez-vous :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${appointmentDate}</span>
                  </p>
               </td>
            </tr>
            <tr>
               <td>
                  <p style="text-align: left;font-size: 0.9375em;letter-spacing: 0px;margin:0;opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">Heure du rendez-vous :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${(appointmentSlot)}</span>
                  </p>
               </td>
               <td>
                  <p style="text-align: right;font-size: 0.9375em;letter-spacing: 0px;margin:0;opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">Type de rendez-vous :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${requiredData.doctorClinicName}</span>
                  </p>
               </td>
            </tr>
         </tbody>
      </table>
      <p style="text-align: center;font-size: 0.9375em;font-weight: normal;line-height: 21px;letter-spacing: 0px;color: #1B1B1B;opacity: 1;margin: 10px 0 0 0;">
         Merci de votre attention à cette question.
      </p>
   </td>
</tr>

        ${emailFooter_fr}`
      }
   )
}
// completed appointment email for doctor arabic
exports.completedAppointmentDoctorTemplate_ar = (requiredData) => {
   let appointmentDate;
   let appointmentSlot;
   if(requiredData.action.reschedule_date != null){
   const dateStringRe = requiredData.action.reschedule_date;
   const dateRe = new Date(dateStringRe);
   const rescheduleformattedDate = `${String(dateRe.getDate()).padStart(2, '0')}/${String(dateRe.getMonth() + 1).padStart(2, '0')}/${dateRe.getFullYear()}`;
    appointmentDate =  rescheduleformattedDate;
    appointmentSlot = requiredData.action.reschedule_slot;
   }else{
      const dateString = requiredData.action.booking_date;
      const date = new Date(dateString);
   
   
      const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
       appointmentDate =  formattedDate;
       appointmentSlot = requiredData.action.slot;
   }

   return (
      {
         "subject": 'الموعد المكتمل',
         "html": `${emailHeader_ar}
         <tr>
   <td style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
      <div style="text-align: center;position: relative;">
         <img src="${process.env.WEB_ENDPOINT}/assets/images/appointment-compltd.png" alt="image" style="width: 16em;position: relative; z-index: 1;">
         <div style="padding: 1em">
            <p style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
               الموعد المكتمل
            </p>
            <p style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
                الدكتور ${requiredData.user_role == "doctor" ? 'عزيزي.'+ requiredData.doctorFullName : requiredData.hospital_name}
            </p>
            <p style="font-size:0.9375em;font-weight:normal;margin: 10px auto 0;color:#787878;">
               نؤكد لك أن الموعد مع
               <span style="font-size:0.9375em;font-weight:700;margin: 5px auto 0;color:#787878;"> ${requiredData.patientFullName}</span> قد تم بنجاح.
            </p>
         </div>
      </div>
   </td>
</tr>
<!--top-section-end-->
<tr>
   <td style="padding:0px;">
      <h2 style="margin:1em 0 12px;text-align: center; font-size:1.2em; font-weight: 700; line-height: 34px; letter-spacing: 0px; color: #1E232C; opacity: 1;">
         تفاصيل الموعد:
      </h2>
      <table style="background-color: #F2F6FC;border-radius: 10px;padding: 20px;width: 100%;margin-bottom: 15px; table-layout: fixed;">
         <tbody>
            <tr>
               <td>
                  <p style="text-align: left; font-size: 0.9375em; letter-spacing: 0px; margin-bottom: 15px;margin-top: 0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">${requiredData.user_role == "doctor" ? "الطبيب" : "مستشفى"} :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${requiredData.user_role == "doctor" ? 'عزيزي.'+ requiredData.doctorFullName : requiredData.hospital_name}</span>
                  </p>
               </td>
               <td>
                  <p style="text-align: right; font-size: 0.9375em; letter-spacing: 0px; margin-bottom: 15px;margin-top: 0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">تاريخ الموعد:</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${appointmentDate}</span>
                  </p>
               </td>
            </tr>
            <tr>
               <td>
                  <p style="text-align: left; font-size: 0.9375em; letter-spacing: 0px; margin:0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">وقت الموعد:</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${(appointmentSlot)}</span>
                  </p>
               </td>
               <td>
                  <p style="text-align: right; font-size: 0.9375em; letter-spacing: 0px; margin:0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">نوع الموعد:</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${requiredData.doctorClinicName}</span>
                  </p>
               </td>
            </tr>
         </tbody>
      </table>
      <p style="text-align: center; font-size: 0.9375em; font-weight: normal; line-height: 21px; letter-spacing: 0px; color: #1B1B1B; opacity: 1;margin: 10px 0 0 0;">
         شكراً لاهتمامك بهذا الموضوع.
      </p>
   </td>
</tr>

        ${emailFooter_ar}`
      }
   )
}

// patient re-schedule appointment template

exports.patientRescheduleAppointmentTemplate = (requiredData) => {
   const dateString = requiredData.action.booking_date;
   const date = new Date(dateString);

   const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
   // rechedule fromatte date set 
   const dateStringRe = requiredData.action.reschedule_date;
   const dateRe = new Date(dateStringRe);

   const rescheduleformattedDate = `${String(dateRe.getDate()).padStart(2, '0')}/${String(dateRe.getMonth() + 1).padStart(2, '0')}/${dateRe.getFullYear()}`;
   return (
      {
         "subject": 'Patient re-schedule appointment',
         "html": `${emailHeader}
            <tr>
            <td
               style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
               <div style="text-align: center;position: relative;">
                  <img src="${process.env.WEB_ENDPOINT}/assets/images/reschdule-appointment.png" alt="image" style="width: 16em;position: relative;
                        z-index: 1;">
                  <div style="padding: 1em">
                     <p
                        style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
                        Reschedule appointment
                     </p>
                     <p
                        style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
                        Dear ${requiredData.user_role == "doctor" ? 'Dr.'+ requiredData.doctorFullName : requiredData.doctorFullName}
                     </p>
                     <p style="font-size:0.9375em;font-weight:normal;
                           margin: 10px auto 0;color:#787878;">A patient has requested to reschedule their appointment with you.
                     </p>
                
                  </div>
               </div>
            </td>
         </tr>
         <!--top-section-end-->
         <tr>
            <td style="padding:0px;">
               <h2 style="margin:1em 0 12px;text-align: center;
                     font-size:1.2em; font-weight: 700; line-height: 34px;
                     letter-spacing: 0px;
                     color: #1E232C;
                     opacity: 1;">
                Please review the details below:
               </h2>
               <table style="background-color: #F2F6FC;border-radius: 10px;padding: 20px;width: 100%;margin-bottom: 15px; table-layout: fixed;">
                  <tbody>
                     <tr>
                        <td>
                           <p style="text-align: left;
                           font-size: 0.9375em;
                       
                           letter-spacing: 0px;
                      margin-bottom: 15px;margin-top: 0;
                           opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
display: inline-block;">Patient Name :</span>
                             <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                             display: inline-block;">${requiredData.patientFullName}</span>
                           </p>
                        </td>
                        <td>
                           <p style="text-align: right;
                           font-size: 0.9375em;
                        
                           letter-spacing: 0px;
                           margin-bottom: 15px;margin-top: 0;
                           opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
display: inline-block;">Original Appointment Date :</span>
                             <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                             display: inline-block;">${formattedDate}</span>
                           </p>
                        </td>
                     </tr>
                     <tr>
                        <td>
                           <p style="text-align: left;
                           font-size: 0.9375em;
                        
                           letter-spacing: 0px;
                           margin-bottom: 15px;margin-top: 0;
                           opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
display: inline-block;">Original Appointment Time :</span>
                             <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                             display: inline-block;">${(requiredData.action.slot)}</span>
                           </p>
                        </td>
                        <td>
                           <p style="text-align: right;
                           font-size: 0.9375em;
                        
                           letter-spacing: 0px;
                           margin-bottom: 15px;margin-top: 0;
                           opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
display: inline-block;">Preferred Appointment Date :</span>
                             <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                             display: inline-block;">${rescheduleformattedDate}</span>
                           </p>
                        </td>
                     </tr>
                     <tr>
                        <td>
                           <p style="text-align: left;
                           font-size: 0.9375em;
                        
                           letter-spacing: 0px;
                           margin:0;
                           opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
display: inline-block;">Preferred Appointment Time :</span>
                             <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                             display: inline-block;">${(requiredData.action.reschedule_slot)}</span>
                           </p>
                        </td>
                        <td>
                           <p style="text-align: right;
                           font-size: 0.9375em;
                        
                           letter-spacing: 0px;
                           margin:0;
                           opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
display: inline-block;">Appointment Type :</span>
                             <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                             display: inline-block;">${requiredData.doctorClinicName}</span>
                           </p>
                        </td>
                     </tr>
                  </tbody>
               </table>
               <p style="text-align: center;;
               font-size: 0.9375em;
               font-weight: normal;
               line-height: 21px;
               letter-spacing: 0px;
               color: #1B1B1B;
               opacity: 1;margin: 20px 0;">To approve or reject this rescheduling request, please log in to your account.

         </p>
               <div style="text-align: center;">
                  <a href="${process.env.WEB_ENDPOINT}/doctor" style="display: inline-block;
                  background: #014CC4;
                  padding: 1em 5.5em;
                  font-size: 15px;
                  font-weight: 500;
                  color: #ffffff;
                  text-decoration: none;
                  border-radius: 7px;text-align: center;margin: 0px 0 15px 0px;
                 ">View Reschedule Appointment</a>
               </div>
            
            </td>
         </tr>
         ${emailFooter}`
      }
   )
}
// patient re-schedule appointment template french

exports.patientRescheduleAppointmentTemplate_fr = (requiredData) => {
   const dateString = requiredData.action.booking_date;
   const date = new Date(dateString);

   const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
   // rechedule fromatte date set 
   const dateStringRe = requiredData.action.reschedule_date;
   const dateRe = new Date(dateStringRe);

   const rescheduleformattedDate = `${String(dateRe.getDate()).padStart(2, '0')}/${String(dateRe.getMonth() + 1).padStart(2, '0')}/${dateRe.getFullYear()}`;
   return (
      {
         "subject": 'Reprogrammer le rendez-vous du patient',
         "html": `${emailHeader_fr}
         <tr>
    <td
       style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
       <div style="text-align: center;position: relative;">
          <img src="${process.env.WEB_ENDPOINT}/assets/images/reschdule-appointment.png" alt="image" style="width: 16em;position: relative;
                z-index: 1;">
          <div style="padding: 1em">
             <p
                style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
                Reprogrammer le rendez-vous
             </p>
             <p
                style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
                Cher ${requiredData.user_role == "doctor" ? 'Dr.'+ requiredData.doctorFullName : requiredData.doctorFullName}
             </p>
             <p style="font-size:0.9375em;font-weight:normal;
                   margin: 10px auto 0;color:#787878;">Un patient a demandé de reprogrammer son rendez-vous avec vous.
             </p>
          </div>
       </div>
    </td>
</tr>
<!--top-section-end-->
<tr>
    <td style="padding:0px;">
       <h2 style="margin:1em 0 12px;text-align: center;
             font-size:1.2em; font-weight: 700; line-height: 34px;
             letter-spacing: 0px;
             color: #1E232C;
             opacity: 1;">
         Veuillez examiner les détails ci-dessous :
       </h2>
       <table style="background-color: #F2F6FC;border-radius: 10px;padding: 20px;width: 100%;margin-bottom: 15px; table-layout: fixed;">
          <tbody>
             <tr>
                <td>
                   <p style="text-align: left;
                   font-size: 0.9375em;
                   letter-spacing: 0px;
                   margin-bottom: 15px;margin-top: 0;
                   opacity: 1;">
                      <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">Nom du patient :</span>
                      <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                      display: inline-block;">${requiredData.patientFullName}</span>
                   </p>
                </td>
                <td>
                   <p style="text-align: right;
                   font-size: 0.9375em;
                   letter-spacing: 0px;
                   margin-bottom: 15px;margin-top: 0;
                   opacity: 1;">
                      <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">Date du rendez-vous original :</span>
                      <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                      display: inline-block;">${formattedDate}</span>
                   </p>
                </td>
             </tr>
             <tr>
                <td>
                   <p style="text-align: left;
                   font-size: 0.9375em;
                   letter-spacing: 0px;
                   margin-bottom: 15px;margin-top: 0;
                   opacity: 1;">
                      <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">Heure du rendez-vous original :</span>
                      <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                      display: inline-block;">${(requiredData.action.slot)}</span>
                   </p>
                </td>
                <td>
                   <p style="text-align: right;
                   font-size: 0.9375em;
                   letter-spacing: 0px;
                   margin-bottom: 15px;margin-top: 0;
                   opacity: 1;">
                      <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">Date du rendez-vous préféré :</span>
                      <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                      display: inline-block;">${rescheduleformattedDate}</span>
                   </p>
                </td>
             </tr>
             <tr>
                <td>
                   <p style="text-align: left;
                   font-size: 0.9375em;
                   letter-spacing: 0px;
                   margin:0;
                   opacity: 1;">
                      <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">Heure du rendez-vous préféré :</span>
                      <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                      display: inline-block;">${(requiredData.action.reschedule_slot)}</span>
                   </p>
                </td>
                <td>
                   <p style="text-align: right;
                   font-size: 0.9375em;
                   letter-spacing: 0px;
                   margin:0;
                   opacity: 1;">
                      <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">Type de rendez-vous :</span>
                      <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                      display: inline-block;">${requiredData.doctorClinicName}</span>
                   </p>
                </td>
             </tr>
          </tbody>
       </table>
       <p style="text-align: center;;
       font-size: 0.9375em;
       font-weight: normal;
       line-height: 21px;
       letter-spacing: 0px;
       color: #1B1B1B;
       opacity: 1;margin: 20px 0;">Pour approuver ou rejeter cette demande de reprogrammation, veuillez vous connecter à votre compte.

     </p>
       <div style="text-align: center;">
          <a href="${process.env.WEB_ENDPOINT}/doctor" style="display: inline-block;
          background: #014CC4;
          padding: 1em 5.5em;
          font-size: 15px;
          font-weight: 500;
          color: #ffffff;
          text-decoration: none;
          border-radius: 7px;text-align: center;margin: 0px 0 15px 0px;
         ">Voir le rendez-vous reprogrammé</a>
       </div>
    </td>
</tr>

         ${emailFooter_fr}`
      }
   )
}
// patient re-schedule appointment template arabic

exports.patientRescheduleAppointmentTemplate_ar = (requiredData) => {
   const dateString = requiredData.action.booking_date;
   const date = new Date(dateString);

   const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
   // rechedule fromatte date set 
   const dateStringRe = requiredData.action.reschedule_date;
   const dateRe = new Date(dateStringRe);

   const rescheduleformattedDate = `${String(dateRe.getDate()).padStart(2, '0')}/${String(dateRe.getMonth() + 1).padStart(2, '0')}/${dateRe.getFullYear()}`;
   return (
      {
         "subject": 'إعادة جدولة موعد المريض',
         "html": `${emailHeader_ar}
          <tr>
   <td style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
      <div style="text-align: center;position: relative;">
         <img src="${process.env.WEB_ENDPOINT}/assets/images/reschdule-appointment.png" alt="image" style="width: 16em;position: relative; z-index: 1;">
         <div style="padding: 1em">
            <p style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
               إعادة جدولة الموعد
            </p>
            <p style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
                الدكتور ${requiredData.user_role == "doctor" ? 'عزيزي.'+ requiredData.doctorFullName : requiredData.doctorFullName}
            </p>
            <p style="font-size:0.9375em;font-weight:normal;margin: 10px auto 0;color:#787878;">
               طلب مريض إعادة جدولة موعده معك.
            </p>
         </div>
      </div>
   </td>
</tr>
<!-- top-section-end -->
<tr>
   <td style="padding:0px;">
      <h2 style="margin:1em 0 12px;text-align: center;font-size:1.2em; font-weight: 700; line-height: 34px; letter-spacing: 0px; color: #1E232C; opacity: 1;">
         يرجى مراجعة التفاصيل أدناه:
      </h2>
      <table style="background-color: #F2F6FC;border-radius: 10px;padding: 20px;width: 100%;margin-bottom: 15px; table-layout: fixed;">
         <tbody>
            <tr>
               <td>
                  <p style="text-align: left; font-size: 0.9375em; letter-spacing: 0px; margin-bottom: 15px;margin-top: 0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">اسم المريض :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${requiredData.patientFullName}</span>
                  </p>
               </td>
               <td>
                  <p style="text-align: right; font-size: 0.9375em; letter-spacing: 0px; margin-bottom: 15px;margin-top: 0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">تاريخ الموعد الأصلي :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${formattedDate}</span>
                  </p>
               </td>
            </tr>
            <tr>
               <td>
                  <p style="text-align: left; font-size: 0.9375em; letter-spacing: 0px; margin-bottom: 15px;margin-top: 0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">وقت الموعد الأصلي :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${(requiredData.action.slot)}</span>
                  </p>
               </td>
               <td>
                  <p style="text-align: right; font-size: 0.9375em; letter-spacing: 0px; margin-bottom: 15px;margin-top: 0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">تاريخ الموعد المفضل :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${rescheduleformattedDate}</span>
                  </p>
               </td>
            </tr>
            <tr>
               <td>
                  <p style="text-align: left; font-size: 0.9375em; letter-spacing: 0px; margin:0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">وقت الموعد المفضل :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${(requiredData.action.reschedule_slot)}</span>
                  </p>
               </td>
               <td>
                  <p style="text-align: right; font-size: 0.9375em; letter-spacing: 0px; margin:0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">نوع الموعد :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${requiredData.doctorClinicName}</span>
                  </p>
               </td>
            </tr>
         </tbody>
      </table>
      <p style="text-align: center;font-size: 0.9375em; font-weight: normal; line-height: 21px; letter-spacing: 0px; color: #1B1B1B; opacity: 1;margin: 20px 0;">
         للموافقة أو رفض طلب إعادة الجدولة هذا، يرجى تسجيل الدخول إلى حسابك.
      </p>
      <div style="text-align: center;">
         <a href="${process.env.WEB_ENDPOINT}/doctor" style="display: inline-block; background: #014CC4; padding: 1em 5.5em; font-size: 15px; font-weight: 500; color: #ffffff; text-decoration: none; border-radius: 7px;text-align: center;margin: 0px 0 15px 0px;">
            عرض الموعد المعاد جدولته
         </a>
      </div>
   </td>
</tr>

         ${emailFooter_ar}`
      }
   )
}

// doctor re-schedule appointment template
exports.doctorRescheduleAppointmentTemplate = (requiredData) => {
   const dateString = requiredData.action.booking_date;
   const date = new Date(dateString);

   const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
   // rechedule fromatte date set 
   const dateStringRe = requiredData.action.reschedule_date;
   const dateRe = new Date(dateStringRe);

   const rescheduleformattedDate = `${String(dateRe.getDate()).padStart(2, '0')}/${String(dateRe.getMonth() + 1).padStart(2, '0')}/${dateRe.getFullYear()}`;
   return (
      {
         "subject": 'Doctor re-schedule appointment.',
         "html": `${emailHeader}
           <tr>
                           <td
                              style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
                              <div style="text-align: center;position: relative;">
                                 <img src="${process.env.WEB_ENDPOINT}/assets/images/reschdule-appointment.png" alt="image" style="width: 16em;position: relative;
                                       z-index: 1;">
                                 <div style="padding: 1em">
                                    <p
                                       style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
                                       Appointment Rescheduled
                                    </p>
                                    <p
                                       style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
                                       Hi , ${requiredData.patientFullName}
                                    </p>
                                    <p style="font-size:0.9375em;font-weight:normal;
                                          margin: 10px auto 0;color:#787878;">We are pleased to inform you that your appointment with
                                          <span style="font-size:0.9375em;font-weight:700;
                                          margin: 5px auto 0;color:#787878;">${requiredData.user_role == "doctor" ? 'Dr.'+ requiredData.doctorFullName : requiredData.doctorFullName}</span> has been successfully rescheduled.
                                    </p>
                                 </div>
                              </div>
                           </td>
                        </tr>
                        <!--top-section-end-->
                        <tr>
                           <td style="padding:0px;">
                              <h2 style="margin:1em 0 12px;text-align: center;
                                    font-size:1.2em; font-weight: 700; line-height: 34px;
                                    letter-spacing: 0px;
                                    color: #1E232C;
                                    opacity: 1;">
                               Updated Appointment Details :
                              </h2>
                              <table style="background-color: #F2F6FC;border-radius: 10px;padding: 20px;width: 100%;margin-bottom: 15px; table-layout: fixed;">
                                 <tbody>
                                    <tr>
                                       <td>
                                          <p style="text-align: left;
                                          font-size: 0.9375em;
                                      
                                          letter-spacing: 0px;
                                    margin-bottom: 15px;margin-top: 0;
                                          opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
                                             display: inline-block;">${requiredData.user_role == 'doctor' ? 'Doctor' : 'Hospital'} :</span>
                                            <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                                            display: inline-block;">${requiredData.doctorFullName}</span>
                                          </p>
                                       </td>
                                       <td>
                                          <p style="text-align: right;
                                          font-size: 0.9375em;
                                       
                                          letter-spacing: 0px;
                                          margin-bottom: 15px;margin-top: 0;
                                          opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">Appointment Date :</span>
                                            <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                                            display: inline-block;">${rescheduleformattedDate}</span>
                                          </p>
                                       </td>
                                    </tr>
                                    <tr>
                                       <td>
                                          <p style="text-align: left;
                                          font-size: 0.9375em;
                                       
                                          letter-spacing: 0px;
                                          margin:0;
                                          opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">Appointment Time :</span>
                                            <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                                            display: inline-block;">${(requiredData.reschedule_slot)}</span>
                                          </p>
                                       </td>
                                       <td>
                                          <p style="text-align: right;
                                          font-size: 0.9375em;
                                       
                                          letter-spacing: 0px;
                                          margin:0;
                                          opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
    display: inline-block;">Appointment Type :</span>
                                            <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                                            display: inline-block;">${requiredData.doctorClinicName}</span>
                                          </p>
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                           
                              <p style="text-align: center;;
                                    font-size: 0.9375em;
                                    font-weight: normal;
                                    line-height: 21px;
                                    letter-spacing: 0px;
                                    color: #1B1B1B;
                                    opacity: 1;margin: 10px 0 0 0;">Thank you for your understanding and cooperation.

                              </p>
                           </td>
                        </tr>
        ${emailFooter}`
      }
   )
}

// doctor re-schedule appointment template french
exports.doctorRescheduleAppointmentTemplate_fr = (requiredData) => {
   const dateString = requiredData.action.booking_date;
   const date = new Date(dateString);

   const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
   // rechedule fromatte date set 
   const dateStringRe = requiredData.action.reschedule_date;
   const dateRe = new Date(dateStringRe);

   const rescheduleformattedDate = `${String(dateRe.getDate()).padStart(2, '0')}/${String(dateRe.getMonth() + 1).padStart(2, '0')}/${dateRe.getFullYear()}`;
   return (
      {
         "subject": 'Le médecin reprogramme son rendez-vous',
         "html": `${emailHeader_fr}
         <tr>
   <td style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
      <div style="text-align: center;position: relative;">
         <img src="${process.env.WEB_ENDPOINT}/assets/images/reschdule-appointment.png" alt="image" style="width: 16em;position: relative; z-index: 1;">
         <div style="padding: 1em">
            <p style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
               Rendez-vous reprogrammé
            </p>
            <p style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
               Bonjour, ${requiredData.patientFullName}
            </p>
            <p style="font-size:0.9375em;font-weight:normal;margin: 10px auto 0;color:#787878;">
               Nous avons le plaisir de vous informer que votre rendez-vous avec <span style="font-size:0.9375em;font-weight:700;margin: 5px auto 0;color:#787878;">${requiredData.user_role == "doctor" ? 'Dr.'+ requiredData.doctorFullName : requiredData.doctorFullName}</span> a été reprogrammé avec succès.
            </p>
         </div>
      </div>
   </td>
</tr>
<!--top-section-end-->
<tr>
   <td style="padding:0px;">
      <h2 style="margin:1em 0 12px;text-align: center;font-size:1.2em; font-weight: 700; line-height: 34px; letter-spacing: 0px; color: #1E232C; opacity: 1;">
         Détails du rendez-vous mis à jour :
      </h2>
      <table style="background-color: #F2F6FC;border-radius: 10px;padding: 20px;width: 100%;margin-bottom: 15px; table-layout: fixed;">
         <tbody>
            <tr>
               <td>
                  <p style="text-align: left;font-size: 0.9375em;letter-spacing: 0px;margin-bottom: 15px;margin-top: 0;opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">${requiredData.user_role == "doctor" ? "Médecin" : "Hôpital"} :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${requiredData.doctorFullName}</span>
                  </p>
               </td>
               <td>
                  <p style="text-align: right;font-size: 0.9375em;letter-spacing: 0px;margin-bottom: 15px;margin-top: 0;opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">Date du rendez-vous :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${rescheduleformattedDate}</span>
                  </p>
               </td>
            </tr>
            <tr>
               <td>
                  <p style="text-align: left;font-size: 0.9375em;letter-spacing: 0px;margin:0;opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">Heure du rendez-vous :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${requiredData.reschedule_slot}</span>
                  </p>
               </td>
               <td>
                  <p style="text-align: right;font-size: 0.9375em;letter-spacing: 0px;margin:0;opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">Type de rendez-vous :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${requiredData.doctorClinicName}</span>
                  </p>
               </td>
            </tr>
         </tbody>
      </table>
      <p style="text-align: center;font-size: 0.9375em;font-weight: normal;line-height: 21px;letter-spacing: 0px;color: #1B1B1B;opacity: 1;margin: 10px 0 0 0;">
         Merci de votre compréhension et de votre coopération.
      </p>
   </td>
</tr>

        ${emailFooter_fr}`
      }
   )
}

// doctor re-schedule appointment template arabic
exports.doctorRescheduleAppointmentTemplate_ar = (requiredData) => {
   const dateString = requiredData.action.booking_date;
   const date = new Date(dateString);

   const formattedDate = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
   // rechedule fromatte date set 
   const dateStringRe = requiredData.action.reschedule_date;
   const dateRe = new Date(dateStringRe);

   const rescheduleformattedDate = `${String(dateRe.getDate()).padStart(2, '0')}/${String(dateRe.getMonth() + 1).padStart(2, '0')}/${dateRe.getFullYear()}`;
   return (
      {
         "subject": 'إعادة جدولة موعد الطبيب',
         "html": `${emailHeader_ar}
          <tr>
   <td style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
      <div style="text-align: center;position: relative;">
         <img src="${process.env.WEB_ENDPOINT}/assets/images/reschdule-appointment.png" alt="image" style="width: 16em;position: relative; z-index: 1;">
         <div style="padding: 1em">
            <p style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
               تم إعادة جدولة الموعد
            </p>
            <p style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
               مرحباً، ${requiredData.patientFullName}
            </p>
            <p style="font-size:0.9375em;font-weight:normal; margin: 10px auto 0;color:#787878;">
               يسعدنا أن نعلمك بأنه تم إعادة جدولة موعدك مع
               <span style="font-size:0.9375em;font-weight:700;margin: 5px auto 0;color:#787878;">${requiredData.user_role == "doctor" ? 'الدكتور.'+ requiredData.doctorFullName : requiredData.doctorFullName}</span>.
            </p>
         </div>
      </div>
   </td>
</tr>
<!-- top-section-end -->
<tr>
   <td style="padding:0px;">
      <h2 style="margin:1em 0 12px;text-align: center; font-size:1.2em; font-weight: 700; line-height: 34px; letter-spacing: 0px; color: #1E232C; opacity: 1;">
         تفاصيل الموعد المُحدّثة :
      </h2>
      <table style="background-color: #F2F6FC;border-radius: 10px;padding: 20px;width: 100%;margin-bottom: 15px; table-layout: fixed;">
         <tbody>
            <tr>
               <td>
                  <p style="text-align: left; font-size: 0.9375em; letter-spacing: 0px; margin-bottom: 15px;margin-top: 0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">${requiredData.user_role == "doctor" ? "الطبيب" : "مستشفى"} :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${requiredData.doctorFullName}</span>
                  </p>
               </td>
               <td>
                  <p style="text-align: right; font-size: 0.9375em; letter-spacing: 0px; margin-bottom: 15px;margin-top: 0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">تاريخ الموعد :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${rescheduleformattedDate}</span>
                  </p>
               </td>
            </tr>
            <tr>
               <td>
                  <p style="text-align: left; font-size: 0.9375em; letter-spacing: 0px; margin:0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">وقت الموعد :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${(requiredData.reschedule_slot)}</span>
                  </p>
               </td>
               <td>
                  <p style="text-align: right; font-size: 0.9375em; letter-spacing: 0px; margin:0; opacity: 1;">
                     <span style="color: #8391A1;font-weight: 600;margin-bottom: 4px; display: inline-block;">نوع الموعد :</span>
                     <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px; display: inline-block;">${requiredData.doctorClinicName}</span>
                  </p>
               </td>
            </tr>
         </tbody>
      </table>
      <p style="text-align: center; font-size: 0.9375em; font-weight: normal; line-height: 21px; letter-spacing: 0px; color: #1B1B1B; opacity: 1;margin: 10px 0 0 0;">
         شكراً لتفهمك وتعاونك.
      </p>
   </td>
</tr>

        ${emailFooter_ar}`
      }
   )
}
// contact us
exports.contactUsTemplate = (requiredData) => {
   return (
      {
         "subject": 'Contact us',
         "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}/assets/images/msg.png" alt="logo">
                         <h4 style=" font-size:18px;font-weight:600;margin: 10px 0 0 0;color:#111;">Hello ${requiredData.fullName}! Thanks for contacting us, we will reach out to you as soon as possible.</h4>
                     
                     </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}">Visit us</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}`
      }
   )
}


exports.RegisteredByAdmin = (requiredData) => 
{
   return (
      {
         "subject": "You've successfully registered",
         "html": `${emailHeader}
         <tr>
         <td>
             <div class="mm">
     
                 <tr>
               <td>
                  <table style="background-color: #fff;border: 1px solid #CFCFCF;padding: 1.25em;
                        border-radius: 20px;margin-bottom: 42px;margin:0 auto;max-width: 760px;    width: 100%;
                        table-layout: fixed;overflow-x: hidden;" class="inner-table">
                     <tbody>
                        <!--top-section-->
                        <tr>
                           <td
                              style="text-align: center;background-color: #F2F6FC;border-radius: 20px;position: relative;padding: 1rem;">
                              <div style="text-align: center;position: relative;">
                                 <img src="${process.env.WEB_ENDPOINT}/assets/images/registration.png" alt="image" style="width: 16em;position: relative;
                                       z-index: 1;">
                                 <div style="padding: 1em">
                                    <p
                                       style="font-size:1.5em;font-weight:700;margin:10px 0 5px 0;color:#1E232C;padding-top: 0px;">
                                       Account Created!
                                    </p>
                                    <p
                                       style="font-size:1.2em;font-weight:700;margin: 0px 0 0 0;color:#014CC4;padding-top: 0px;">
                                       Hi , ${requiredData?.first_name} ${requiredData?.last_name}
                                    </p>
                                    <p style="font-size:0.9375em;font-weight:normal;
                                          margin: 10px auto 0;color:#787878;">Your account has been successfully created! You can now access your account using the details below:
                                    </p>
                                 </div>
                              </div>
                           </td>
                        </tr>
                        <!--top-section-end-->
                        <tr>
                           <td style="padding:0px;">
                              <h2 style="margin:1em 0 12px;text-align: center;
                                    font-size:1.2em; font-weight: 700; line-height: 34px;
                                    letter-spacing: 0px;
                                    color: #1E232C;
                                    opacity: 1;">
                               Login Details
                              </h2>
                              <table style="background-color: #F2F6FC;border-radius: 10px;padding: 20px;width: 100%;margin-bottom: 15px; table-layout: fixed;">
                                 <tbody>
                                 <tr> <td >
                                    <table class="" style="  margin-left: auto;
  margin-right: auto;">
                                       <tr>
                                          <td>
                                             <p style="text-align: left;
                                             font-size: 0.9375em;
                                          
                                             letter-spacing: 0px;
                                             margin:0;
                                             opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
                                           display: inline-block;">Login URL :</span>
                                          
                                             </p>
                                          </td>
                                          <td>
                                             <p style="
                                             font-size: 0.9375em;
                                          
                                             letter-spacing: 0px;
                                             margin:0;
                                             opacity: 1;">
                                               <span style="color: #014CC4;font-weight: 700;margin-bottom: 4px;
                                               display: inline-block;">${process.env.WEB_ENDPOINT}</span>
                                             </p>
                                          </td>
                                       </tr>
                                       <tr>
                                          <td>
                                             <p style="text-align: left;
                                             font-size: 0.9375em;
                                          
                                             letter-spacing: 0px;
                                             margin:0;
                                             opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
       display: inline-block;">Username :</span>
                                          
                                             </p>
                                          </td>
                                          <td>
                                             <p style="
                                             font-size: 0.9375em;
                                          
                                             letter-spacing: 0px;
                                             margin:0;
                                             opacity: 1;">
                                               <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                                               display: inline-block;">${requiredData?.first_name} ${requiredData?.last_name}</span>
                                             </p>
                                          </td>
                                       </tr>
                                       <tr>
                                          <td>
                                             <p style="text-align: left;
                                             font-size: 0.9375em;
                                          
                                             letter-spacing: 0px;
                                             margin:0;
                                             opacity: 1;"><span style="color: #8391A1;font-weight: 600;margin-bottom: 4px;
       display: inline-block;">Password :</span>
                                          
                                             </p>
                                          </td>
                                          <td>
                                             <p style="
                                             font-size: 0.9375em;
                                          
                                             letter-spacing: 0px;
                                             margin:0;
                                             opacity: 1;">
                                               <span style="color: #1E232C;font-weight: 700;margin-bottom: 4px;
                                               display: inline-block;">${requiredData.password}</span>
                                             </p>
                                          </td>
                                       </tr>
                                    </table>
                                 </td></tr>
                                  
                                 </tbody>
                              </table>
                           
                              <p style="text-align: center;;
                                    font-size: 0.9375em;
                                    font-weight: normal;
                                    line-height: 21px;
                                    letter-spacing: 0px;
                                    color: #1B1B1B;
                                    opacity: 1;margin: 10px 0 0 0;">If you have any questions or encounter any issues, feel free to contact our support team.
                              </p>
                           </td>
                        </tr>
                         
         </div>
         </td>
     </tr>
         ${emailFooter}`
      }
   )
}

function convertToAmPmRange(timeRange: string): string {
   const times = timeRange.split(' - ');
   
   const formatTime = (time: string) => {
     const [hour, minute] = time.split(':').map(Number);
     const date = new Date();
     date.setHours(hour, minute);
     return date.toLocaleTimeString('en-US', {
       hour: '2-digit',
       minute: '2-digit',
       hour12: true,
     });
   };
 
   return times.map(formatTime).join(times.length === 2 ? ' - ' : '');
 }
