const LOGO_URL = 'https://api.aircamp.ph/logo/new-logo.png';
const FRONT_END_RESET_PASSWORD_URL = 'https://api.aircamp.ph/reset-password';
const FRONT_END_BASE_URL = 'https://aircamp.ph';
const REBOOK_URL = '/booking';

exports.resetPasswordEmailTemplate = (userName, token) => {
  return `
    <!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Password Reset</title>
  </head>
  <body
    style="
      font-family: Arial, Helvetica, sans-serif, sans-serif;
      margin: 0;
      padding: 20px;
    "
  >
    <div
      style="
        display: flex;
      "
    >
      <div style="margin:auto">
        <div>
          <img
            src="${LOGO_URL}"
            style="height: 60px"
          />
        </div>
        <p style="margin-left: 50px">Dear ${userName},</p>
        <p style="margin-left: 50px; margin-top: 40px; margin-bottom: 40px">
          We've received a request to reset your password. <br />To confirm and
          create a new password, please click the link below:
        </p>
        <a
          href="${FRONT_END_RESET_PASSWORD_URL + '/?token=' + token}"
          style="
            margin-left: 50px;
            text-decoration: none;
            color: white;
            font-weight: bold;
            background-color: #20653d;
            padding: 10px 20px;
            border-radius: 50px;
          "
          >Reset Password</a
        >
        <p style="margin-left: 50px; margin-top: 40px">
          If you did not request a password reset, please ignore this email<br/> or
          contact our support team for assistance.
        </p>
        <p style="margin-left: 50px; margin-top: 40px">
          Best Regards,<br />Aircamp Team
        </p>
      </div>
    </div>
  </body>
</html>`;
};

exports.verifyEmailTemplate = (otp, username) => {
  return `
    <!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Email Verification</title>
  </head>
  <body
    style="
      font-family: Arial, Helvetica, sans-serif;
      margin: 0;
      padding: 20px;
    "
  >
    <div
      style="
        display: flex;
      "
    >
<div style="margin: auto; max-width: 40em;font-size: 1.2em">
        <div style="display: flex">
					<img src="${LOGO_URL}" style="height: 60px; width: 80px; object-fit: cover" />
					<p style="font-size: 1.5em; font-weight: bold; color: #2a3f33">AIRCAMP</p>
				</div>
        <p style="margin-left: 50px">Dear ${username},</p>
        <p style="margin-left: 50px; margin-top: 40px; margin-bottom: 40px">
          Thank you for registering with us! To verify your email address, please use the following One-Time Password (OTP):
        </p>
        <div
          style="
            margin-left: 50px;
            font-size: 24px;
            font-weight: bold;
            background-color: #f3f3f3;
            padding: 10px;
            display: inline-block;
            border-radius: 5px;
          "
        >
          ${otp}
        </div>
        <p style="margin-left: 50px; margin-top: 40px">
          If you did not request this verification, please ignore this email.<br/> The OTP will expire in 10 minutes.
        </p>
        <p style="margin-left: 50px; margin-top: 40px">
          Best Regards,<br />Aircamp Team
        </p>
      </div>
    </div>
  </body>
</html>`;
};

exports.hostRegistrationEmailTemplate = (userName) => {
  return `<!doctype html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Host Application Received</title>
	</head>
	<body style="font-family: Arial, Helvetica, sans-serif; margin: 0; padding: 20px;font-size:1.2em;">
		<div style="display: flex">
			<div style="margin: auto; width: 30em">
				<div style="display: flex">
					<img src="https://aircamp.ph/logo/new-logo.jpg" style="height: 60px; width: 80px; object-fit: cover" />
					<p style="font-size: 1.5em; font-weight: bold; color: #2a3f33">AIRCAMP</p>
				</div>
				<p style="margin-left: 50px; margin-top: 20px; margin-bottom: 20px; font-weight: 600; font-size: 1.1em">
					Thank you, ${userName}! 🎉
				</p>
				<p style="margin-left: 50px; margin-top: 20px">
					We've received your application to become a host on **Aircamp**! 🌿🏕️ Our team is currently reviewing your
					submission.
				</p>
				<p style="margin-left: 50px; margin-top: 20px">
					What happens next?
					<br />
					<span style="padding-left: 20px; height: max-content; display: block">
						✅ Our team will review your details.<br />
						✅ We may reach out if we need additional information.<br />
						✅ Once approved, you'll be able to start hosting guests!
					</span>
				</p>
				<p style="margin-left: 50px; margin-top: 20px">
					We appreciate your patience during this process. You'll receive another email as soon as your application is
					reviewed.
				</p>
				<p style="margin-left: 50px; margin-top: 20px">
					In the meantime, feel free to explore how hosting works and get ready for your first guests!
				</p>

				<p style="margin-left: 50px; margin-top: 20px">
					If you have any questions, feel free to contact our support team.
				</p>
				<p style="margin-left: 50px; margin-top: 20px; font-weight: 600">
					Thank you for choosing Aircamp!<br />Aircamp Team
				</p>
			</div>
		</div>
	</body>
</html>
`;
};

exports.approvedListingEmailTemplate = (userName, data) => {
  return `<!doctype html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Approved Listing</title>
	</head>
	<body style="font-family: Arial, Helvetica, sans-serif, sans-serif; margin: 0; padding: 20px;font-size:1.2em;">
		<div style="display: flex">
			<div style="margin: auto; width: 30em">
				<div style="display: flex">
					<img src="${LOGO_URL}" style="height: 60px; width: 80px; object-fit: cover" />
					<p style="font-size: 1.5em; font-weight: bold; color: #2a3f33">AIRCAMP</p>
				</div>
				<p style="margin-left: 50px; margin-top: 20px; margin-bottom: 20px; font-weight: 600; font-size: 1.2em">
					Congratulations, ${userName}! Your Place is Now Live on Aircamp! 🎉
				</p>
				<p style="margin-left: 50px; margin-top: 20px">
					We're excited to inform you that your listing has been successfully approved and is now available for
					bookings.
				</p>

				<div style="margin: 25px 50px; border: 1px solid #ddd; border-radius: 10px; overflow: hidden">
					<div style="position: relative">
						<img
							src="${data.image}"
							style="width: 100%; height: 200px; border-bottom: 1px solid #ddd"
						/>
					</div>
					<div style="padding: 10px">
						<p style="margin: 5px 0; font-size: 0.9em; color: gray">${data.location}</p>
						<p style="margin: 5px 0; font-weight: bold; font-size: 1.2em">${data.title}</p>
						<p style="margin: 5px 0; font-size: 0.9em">${data.description}</p>
						<p style="margin: 5px 0; font-size: 1.1em; font-weight: bold">₱ ${data.price} / Per Night</p>
					</div>
				</div>
				<p style="margin-left: 50px; margin-top: 20px">
					Your listing is now visible to campers looking for their next adventure. To attract more bookings, make sure
					to update your availability and respond to inquiries promptly.
				</p>
				<p style="margin-left: 50px; margin-top: 20px">
					You can manage your listing, update details, and track your bookings in your dashboard.
				</p>

				<p style="margin-left: 50px; margin-top: 20px">If you have any questions, our support team is here to help.</p>
				<p style="margin-left: 50px; margin-top: 20px; font-weight: 600">Happy Hosting!<br />Aircamp Team</p>
			</div>
		</div>
	</body>
</html>
`;
};

exports.modifiedBookingEmailTemplate = (data) => {
  return `<!doctype html>
<html>
  <head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <title>Booking Confirmation</title>
  </head>
  <body style="font-family: Arial, sans-serif; margin: 0; padding: 0">
  <table
    width="100%"
    border="0"
    cellspacing="0"
    cellpadding="0"
    align="center"
    style="max-width: 600px; margin: auto; padding: 20px"
  >
    <tr>
    <td align="left">
      <div style="display: flex">
      <img src="${LOGO_URL}" style="height: 40px; width: 40px; object-fit: cover" />
      <p style="font-weight: bold; color: #2a3f33">AIRCAMP</p>
      </div>
    </td>
    </tr>
    <tr>
    <td style="font-size: 16px; color: #333; padding-left: 40px">
      <p style="margin-bottom: 20px">Dear ${data.user_name},</p>
      <p style="margin-bottom: 20px">
      We are pleased to confirm that your booking has been successfully modified. Below are the updated details:
      </p>
      <ul style="padding-left: 20px; margin-bottom: 20px">
      ${
        data?.added
          ? data?.added
              ?.map(
                (item) =>
                  `<li style="color: #20653d">Added: <span style="font-weight: bold">${item}</span></li>`,
              )
              .join('')
          : ''
      }
      ${
        data?.changed
          ? data?.changed
              ?.map(
                (item) =>
                  `<li style="color: #e4980a">Changed: <span style="font-weight: bold">${item}</span></li>`,
              )
              .join('')
          : ''
      }
      ${
        data?.removed
          ? data?.removed
              ?.map(
                (item) =>
                  `<li style="color: #ec0800">Removed: <span style="font-weight: bold">${item}</span></li>`,
              )
              .join('')
          : ''
      }
      </ul>
      ${
        data.remaining_balance
          ? `<p style="margin-bottom: 20px">
          In addition to the modified booking, you still have a remaining balance of ₱${data.remaining_balance}.
        </p>`
          : ''
      }
					<p style="margin-bottom: 20px">
						As per our refund policy, the refund will be processed within 7-14 business days. You will receive an email
						notification once the refund has been processed.
					</p>
					<p style="margin-bottom: 20px">Thank you for choosing our camp.</p>
					<p style="margin-bottom: 20px">
						Best regards,<br />
						Aircamp Team
					</p>
					<p style="margin-bottom: 20px">
						If you have any questions or concerns regarding your cancellation or refund, please do not hesitate to
						contact us.
					</p>
					<p style="margin-bottom: 20px">
						Email - support@aircamp.ph<br />
						Phone - +63 917-1120-237
					</p>
    </td>
    </tr>
  </table>
  </body>
</html>
`;
};

exports.cancelledBookingEmailTemplate = (data) => {
  return `<!doctype html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>Booking Cancellation Confirmation</title>
	</head>
	<body style="font-family: Arial, sans-serif; margin: 0; padding: 0">
		<table
			width="100%"
			border="0"
			cellspacing="0"
			cellpadding="0"
			align="center"
			style="max-width: 600px; margin: auto; padding: 20px"
		>
			<tr>
				<td align="left">
					<div style="display: flex">
						<img src="${LOGO_URL}" style="height: 40px; width: 40px; object-fit: cover" />
						<p style="font-weight: bold; color: #2a3f33">AIRCAMP</p>
					</div>
				</td>
			</tr>
			<tr>
				<td style="font-size: 16px; color: #333; padding-left: 40px">
					<p style="margin-bottom: 20px">Dear ${data.user_name},</p>
					<p style="margin-bottom: 20px">
						We acknowledge receipt of your request to cancel your booking with us. After verifying the details, we are
						writing to confirm that your booking has been successfully cancelled.
					</p>
					<p style="margin-bottom: 20px">
						A separate email with refund details will be sent to you within the next 7-14 business days.
					</p>
					<p style="margin-bottom: 20px">
						If you have the intention to rebook, click this link:
						<a
							href="${FRONT_END_BASE_URL}${REBOOK_URL}/${data.listing_id}"
							style="color: blue; text-decoration: none"
							>${FRONT_END_BASE_URL}${REBOOK_URL}/${data.listing_id}</a
						>
					</p>
					<p style="margin-bottom: 20px">
						We appreciate your understanding and hope to have the opportunity to serve you better in the future. If you
						have any feedback or suggestions, please feel free to share them with us.
					</p>
					<p style="margin-bottom: 20px">Thank you for choosing our camp.</p>
					<p style="margin-bottom: 20px">
						Best regards,<br />
						Aircamp Team
					</p>
					<p style="margin-bottom: 20px">
						If you have any questions or concerns regarding your cancellation or refund, please do not hesitate to
						contact us.
					</p>
					<p style="margin-bottom: 20px">
						Email - support@aircamp.ph<br />
						Phone - +63 917-1120-237
					</p>
				</td>
			</tr>
		</table>
	</body>
</html>
`;
};

exports.rebookingEmailTemplate = (data) => {
  return `<!DOCTYPE >
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>Booking Confirmation</title>
	</head>
	<body style="font-family: Arial, sans-serif; margin: 0; padding: 0">
		<table
			align="center"
			border="0"
			cellpadding="0"
			cellspacing="0"
			width="600"
			style="border-collapse: collapse; margin: 20px auto"
		>
			<tr>
				<td align="center" style="padding: 40px 0 30px 0">
					<div style="display: flex">
						<img src="${LOGO_URL}" style="height: 40px; width: 40px; object-fit: cover" />
						<p style="font-weight: bold; color: #2a3f33">AIRCAMP</p>
					</div>
				</td>
			</tr>
			<tr>
				<td style="padding: 0 30px 30px 30px">
					<p style="font-size: 16px; line-height: 24px; margin: 0">Dear ${data.user_name},</p>
					<p style="font-size: 16px; line-height: 24px; margin-top: 20px">
						We are pleased to confirm that your rebooking request has been successfully processed. Your new booking
						details are as follows:
					</p>
					<ul style="font-size: 16px; line-height: 24px; padding-left: 20px; margin-top: 20px">
						<li>New Booking Dates: <strong>${data.new_booking_date}</strong></li>
						<li>Camp Type: <strong>${data.listing_type}</strong></li>
						<li>New Booking Reference Number: <strong>${data.reference_no}</strong></li>
					</ul>
				</td>
			</tr>
			<tr>
				<td style="padding: 20px 30px">
					<a
						href="#"
						style="
							background-color: #20653d;
							color: white;
							text-decoration: none;
							padding: 15px 25px;
							border-radius: 5em;
							font-size: 16px;
							font-weight: bold;
						"
						>View my bookings</a
					>
				</td>
			</tr>
			<tr>
				<td style="padding: 30px 30px 20px 30px">
					<p style="font-size: 16px; line-height: 24px; margin: 0">Thank you for choosing to rebook with us.</p>
					<p style="font-size: 16px; line-height: 24px; margin-top: 10px">
						We look forward to welcoming you on your new arrival date.
					</p>
				</td>
			</tr>
			<tr>
				<td style="padding: 0 30px 30px 30px">
					<p style="font-size: 16px; line-height: 24px; margin: 0">
						Best regards,<br />
						Aircamp Team
					</p>
				</td>
			</tr>
			<tr>
				<td style="padding: 20px 30px 40px 30px; border-top: 1px solid #e0e0e0">
					<p style="font-size: 14px; line-height: 20px; margin: 0">
						If you have any questions or concerns regarding your cancellation or refund, please do not hesitate to
						contact us.
					</p>
					<p style="font-size: 14px; line-height: 20px; margin-top: 10px">
						Email -
						<a href="mailto:support@aircamp.ph" style="color: #007bff; text-decoration: none">support@aircamp.ph</a
						><br />
						Phone - +63 917-1120-237
					</p>
				</td>
			</tr>
		</table>
	</body>
</html>
`;
};

exports.bookingEmailTemplate = (data) => {
  return `<!DOCTYPE >
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>Booking Confirmation</title>
	</head>
	<body style="font-family: Arial, sans-serif; margin: 0; padding: 0;font-size:1.2em">
		<table
			align="center"
			border="0"
			cellpadding="0"
			cellspacing="0"
			width="600"
			style="border-collapse: collapse; margin: 20px auto"
		>
			<tr>
				<td align="center" style="padding: 40px 0 30px 0">
					<div style="display: flex">
						<img src="${LOGO_URL}" style="height: 40px; width: 40px; object-fit: cover" />
						<p style="font-weight: bold; color: #2a3f33">AIRCAMP</p>
					</div>
				</td>
			</tr>
			<tr>
				<td style="padding: 0 30px 30px 30px">
					<div class="container">
						<p>Dear Mary Jane,</p>
						<p>Thank you for booking Camp Number One through Aircamp! We're excited to have you join us.</p>

						<h3>Booking Details</h3>
						<div class="booking-details">
							<ul>
								<li><span class="important">Booking Type:</span> <strong>${data.listing_type}</strong> Camping Site</li>
								<li><span class="important">Campsite:</span> <strong>${data.listing_name}</strong></li>
								${
                  data.listing_type === 'Public'
                    ? `<li>
											<span class="important">Slot:</span> <strong>${data.spot_name}</strong>
										</li>`
                    : ''
                }
								<li><span class="important">Dates:</span> <strong>${data.check_in} | ${data.check_in_time} to ${data.check_out} | ${data.check_out_time}</strong></li>
								<li><span class="important">Number of Guests:</span> <strong>${data.pax}</strong></li>
								<li><span class="important">Inclusions:</span> <strong>${data.inclusions}</strong></li>
							</ul>
						</div>

						<p>To confirm your booking, please review and respond to this email.</p>
						<p>If you have any questions or need further assistance, feel free to reach out.</p>

						<p>
							Best regards,<br />
							Aircamp Team
						</p>

						<div class="footer">
							<p>
								If you have any questions or concerns regarding your cancellation or refund, please do not hesitate to
								contact us.
							</p>
							<p>
								Email –
								<a href="mailto:support@aircamp.ph" style="color: #007bff; text-decoration: underline"
									>support@aircamp.ph</a
								>
							</p>
							<p>Phone – +63 917-1120-237</p>
						</div>
					</div>
				</td>
			</tr>
		</table>
	</body>
</html>
`;
};

exports.inviteHostManagerTemplate = (data) => {
  return `
<body
	style="
		width: 100% !important;
		-webkit-text-size-adjust: none;
		margin: 0;
		padding: 0;
		line-height: 1.6;
		font-family: Arial, sans-serif;
		margin: 0;
		padding: 0;
		font-size: 1.2em;
	"
>
	<table width="100%" cellpadding="0" cellspacing="0" border="0" style="max-width: 600px; margin: auto; padding: 20px">
		<tr>
			<td align="center" style="padding: 40px 0 30px 0">
				<div style="display: flex">
					<img src="${LOGO_URL}" style="height: 40px; width: 40px; object-fit: cover" />
					<p style="font-weight: bold; color: #2a3f33; margin: 0; margin-top: 15px; margin-left: 2px">AIRCAMP</p>
				</div>
			</td>
		</tr>
		<tr>
			<td align="center">
				<table width="600" cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse">
					<tr>
								<td align="center" style="background-color: #f8f9fa; padding: 20px 0; height: 200px">
									<img
										src="https://api.aircamp.ph/logo/email-frame1.png"
										alt="AIRCAMP Logo"
										class="logo"
										style="
									height: 100%;
									width: 100%;
									margin-bottom: 0;
									height: 200px;
									object-fit: cover;
									height: auto;
									border: 0;
									outline: none;
									text-decoration: none;
									-ms-interpolation-mode: bicubic;
									display: block;
								"
									/>
								</td>
							</tr>
					<tr>
						<td>
							<p style=" margin-bottom: 20px; color: #20653d; font-weight: bold">
								You're Invited to Manage Hosting
							</p>
							<p style="margin-bottom: 20px;">
								You've been invited by <strong>${data.host_name}</strong> to manage their hosting account.
							</p>
							<p style="margin-bottom: 20px;">
								<strong>Details:</strong>
							</p>
							<ul style="margin-bottom: 20px;">
								<li>
									Account Name:
									<strong> ${data.name} </strong>
								</li>
								<li>
									Role:
									<strong> ${data.access} </strong>
								</li>
								<li>
									Email:
									<strong> ${data.email} </strong>
								</li>
							</ul>
							<p style="margin-bottom: 20px">
								<strong>What to do next:</strong>
							</p>
							<ul>
								<li>Accept Invitation: Click this link: ${data.link}</li>
							</ul>
							<p style="margin-bottom: 20px;">
								Best regards,<br />
								Host: Mary Jane Cruz
							</p>
						</td>
					</tr>
					<tr>
						<td>
							If you have any questions or concerns regarding your cancellation or refund, please do not hesitate to
							contact us.<br /><br />
							Email:
							<a href="mailto:support@aircamp.ph" style="color: #3498db; text-decoration: underline"
								>support@aircamp.ph</a
							><br />
							Phone: +63 917-1120-237
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</body>
`;
};

exports.requestModificationTemplate = ({ booking_no, user_name }) => {
  return `	<body
			style="
		width: 100% !important;
		-webkit-text-size-adjust: none;
		margin: 0;
		padding: 0;
		line-height: 1.6;
		font-family: Arial, sans-serif;
		margin: 0;
		padding: 0;
		font-size: 1.2em;
	"
		>
			<table
				width="100%"
				cellpadding="0"
				cellspacing="0"
				border="0"
				style="max-width: 700px; margin: auto; padding: 20px"
			>
				<tr>
					<td align="center" style="padding: 40px 0 30px 0">
						<div style="display: flex">
							<img src="${LOGO_URL}" style="height: 30px; width: 30px; object-fit: cover" />
							<p style="font-weight: bold; color: #2a3f33; margin: 0; margin-top: 15px; margin-left: 2px">AIRCAMP</p>
						</div>
					</td>
				</tr>
				<tr>
					<td align="center">
						<table width="600" cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse">
							<tr>
								<td align="center" style="background-color: #f8f9fa; padding: 20px 0; height: 200px">
									<img
										src="https://api.aircamp.ph/logo/email-frame1.png"
										alt="AIRCAMP Logo"
										class="logo"
										style="
									height: 100%;
									width: 100%;
									margin-bottom: 0;
									height: 200px;
									object-fit: cover;
									height: auto;
									border: 0;
									outline: none;
									text-decoration: none;
									-ms-interpolation-mode: bicubic;
									display: block;
								"
									/>
								</td>
							</tr>
							<tr>
								<td>
									<p style="padding-top: 2.5em; margin-bottom: 20px; color: #20653d; font-weight: bold; font-size: 1.5em">
										Request of Booking Modification
									</p>
								</td>
							</tr>
							<tr>
								<td>
									<p style="margin-bottom: 20px">Hi ${user_name},</p>
								</td>
							</tr>
							<tr>
								<td>
									I'd like to request a modification to your booking Reservation ID: ${booking_no}. <br />
									The changes I'd like to make are ["add/remove [number] guests"]. Could you please let me know if this
									is feasible?
								</td>
							</tr>
							<tr>
								<td style="text-align: center">
									<button
										style="
									padding: 0.5em 1em;
									background-color: #20653d;
									color: white;
									border-radius: 0.25em;
									font-size: 1.2em;
									margin-top: 2em;
								"
									>
										<a style="text-decoration: none; color: white" href="https://aircamp.ph/reservations">
											View Booking
										</a>
									</button>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</body>`;
};

exports.modificationResponseTemplate = ({ booking_no, user_name, status }) => {
  return `	<body
			style="
		width: 100% !important;
		-webkit-text-size-adjust: none;
		margin: 0;
		padding: 0;
		line-height: 1.6;
		font-family: Arial, sans-serif;
		font-size: 1.2em;
	"
		>
			<table
				width="100%"
				cellpadding="0"
				cellspacing="0"
				border="0"
				style="max-width: 700px; margin: auto; padding: 20px"
			>
				<tr>
					<td align="center" style="padding: 40px 0 30px 0">
						<div style="display: flex">
							<img src="${LOGO_URL}" style="height: 30px; width: 30px; object-fit: cover" />
							<p style="font-weight: bold; color: #2a3f33; margin: 0; margin-top: 15px; margin-left: 2px">AIRCAMP</p>
						</div>
					</td>
				</tr>
				<tr>
					<td align="center">
						<table width="600" cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse">
							<tr>
								<td align="center" style="background-color: #f8f9fa; padding: 20px 0; height: 200px">
									<img
										src="https://api.aircamp.ph/logo/email-frame1.png"
										alt="AIRCAMP Logo"
										class="logo"
										style="
									width: 100%;
									height: auto;
									object-fit: cover;
									border: 0;
									outline: none;
									text-decoration: none;
									display: block;
								"
									/>
								</td>
							</tr>
							<tr>
								<td>
									<p style="padding-top: 2.5em; margin-bottom: 20px; color: #20653d; font-weight: bold; font-size: 1.5em">
										Modification Request ${status === 'accepted' ? 'Accepted' : 'Declined'}
									</p>
								</td>
							</tr>
							<tr>
								<td>
									<p style="margin-bottom: 20px">Hi Host,</p>
								</td>
							</tr>
							<tr>
								<td>
									<p style="margin-bottom: 20px">
										User <strong>${user_name}</strong> has <strong>${status}</strong> the modification request for Reservation ID:
										<strong>${booking_no}</strong>.
									</p>
									<p>You can view the updated booking details through the link below:</p>
								</td>
							</tr>
							<tr>
								<td style="text-align: center">
									<a
										href="https://aircamp.ph/reservations"
										style="
											display: inline-block;
											padding: 0.5em 1em;
											background-color: #20653d;
											color: white;
											border-radius: 0.25em;
											font-size: 1.2em;
											margin-top: 2em;
											text-decoration: none;
										"
									>
										View Booking
									</a>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</body>`;
};

exports.approvedListingTemplate = ({ host_name, name, description }) => {
  return `<body
	style="
		width: 100% !important;
		-webkit-text-size-adjust: none;
		margin: 0;
		padding: 0;
		line-height: 1.6;
		font-family: Arial, sans-serif;
		font-size: 1.2em;
	"
>
	<table width="100%" cellpadding="0" cellspacing="0" border="0" style="max-width: 700px; margin: auto; padding: 20px">
		<tr>
			<td align="center" style="padding: 40px 0 30px 0">
				<div style="display: flex">
					<img src="${LOGO_URL}" style="height: 40px; width: 40px; object-fit: cover" />
					<p style="font-weight: bold; color: #2a3f33; margin: 0; margin-top: 15px; margin-left: 2px">AIRCAMP</p>
				</div>
			</td>
		</tr>
		<tr>
			<td align="center">
				<table width="600" cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse">
					<tr>
						<td align="center" style="background-color: #f8f9fa; padding: 20px 0; height: 200px">
							<img
								src="https://api.aircamp.ph/logo/email-frame1.png"
								alt="AIRCAMP Logo"
								class="logo"
								style="
									height: 100%;
									width: 100%;
									margin-bottom: 0;
									height: 200px;
									object-fit: cover;
									height: auto;
									border: 0;
									outline: none;
									text-decoration: none;
									-ms-interpolation-mode: bicubic;
									display: block;
								"
							/>
						</td>
					</tr>
					<tr>
						<td>
							<p style="padding-top: 2.5em; margin-bottom: 20px; color: #20653d; font-weight: bold; font-size: 1.5em">
								Your Listing Has Been Approved!
							</p>
						</td>
					</tr>
					<tr>
						<td>
							<p style="margin-bottom: 20px">Hi ${host_name},</p>
						</td>
					</tr>
					<tr>
						<td>
							<p style="margin-bottom: 20px">
								Congratulations! Your host listing has been successfully verified and is now live on Aircamp.
							</p>
							<p><strong>Listing Description:</strong><br /></p>
							<p style="margin-bottom: 20px">${name}</p>
							<p>${description}</p>
						</td>
					</tr>
					<tr>
						<td style="text-align: center">
							<a
								href="https://aircamp.ph/host/listings"
								style="
									display: inline-block;
									padding: 0.5em 1em;
									background-color: #20653d;
									color: white;
									border-radius: 0.25em;
									font-size: 1.2em;
									margin-top: 2em;
									text-decoration: none;
								"
							>
								Go to Dashboard
							</a>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</body>
`;
};

exports.declinedListingTemplate = ({ host_name, name, description }) => {
  return `<body
		style="
			width: 100% !important;
			-webkit-text-size-adjust: none;
			margin: 0;
			padding: 0;
			line-height: 1.6;
			font-family: Arial, sans-serif;
			font-size: 1.2em;
		"
	>
		<table width="100%" cellpadding="0" cellspacing="0" border="0" style="max-width: 700px; margin: auto; padding: 20px">
			<tr>
				<td align="center" style="padding: 40px 0 30px 0">
					<div style="display: flex">
						<img src="${LOGO_URL}" style="height: 40px; width: 40px; object-fit: cover" />
						<p style="font-weight: bold; color: #2a3f33; margin: 0; margin-top: 15px; margin-left: 2px">AIRCAMP</p>
					</div>
				</td>
			</tr>
			<tr>
				<td align="center">
					<table width="600" cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse">
						<tr>
							<td align="center" style="background-color: #fff0f0; padding: 20px 0; height: 200px">
								<img
									src="https://api.aircamp.ph/logo/email-frame1.png"
									alt="AIRCAMP Logo"
									class="logo"
									style="
										height: 100%;
										width: 100%;
										margin-bottom: 0;
										height: 200px;
										object-fit: cover;
										height: auto;
										border: 0;
										outline: none;
										text-decoration: none;
										-ms-interpolation-mode: bicubic;
										display: block;
									"
								/>
							</td>
						</tr>
						<tr>
							<td>
								<p style="padding-top: 2.5em; margin-bottom: 20px; color: #c0392b; font-weight: bold; font-size: 1.5em">
									Your Listing Could Not Be Approved
								</p>
							</td>
						</tr>
						<tr>
							<td>
								<p style="margin-bottom: 20px">Hi ${host_name},</p>
							</td>
						</tr>
						<tr>
							<td>
								<p style="margin-bottom: 20px">
									We appreciate your interest in hosting with Aircamp. Unfortunately, after reviewing your listing, we are unable to approve it at this time.
								</p>
								<p><strong>Listing Name:</strong><br /></p>
								<p style="margin-bottom: 10px">${name}</p>
								<p><strong>Description Submitted:</strong></p>
								<p style="margin-bottom: 20px">${description}</p>
								<p>
									If you believe this was a mistake or would like to make changes and resubmit, please review our guidelines and update your listing accordingly.
								</p>
							</td>
						</tr>
						<tr>
							<td style="text-align: center">
								<a
									href="https://aircamp.ph/host/listings"
									style="
										display: inline-block;
										padding: 0.5em 1em;
										background-color: #c0392b;
										color: white;
										border-radius: 0.25em;
										font-size: 1.2em;
										margin-top: 2em;
										text-decoration: none;
									"
								>
									Review and Edit Listing
								</a>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</body>`;
};
