/**
 * Demo Booking Email Service
 *
 * High-level functions for sending demo booking related emails.
 */

import { sendEmail } from '../core';
import {
  createDemoBookingReceivedEmail,
  createDemoReminderEmail,
} from '../templates/demo-templates';
import { createDemoConfirmationEmail } from '../templates';

/**
 * Send demo booking received notification
 */
export async function sendDemoBookingReceivedEmail(
  email: string,
  name: string,
  date: string,
  time: string,
  duration: string,
  language: 'ar' | 'en',
  meetingLink?: string
): Promise<boolean> {
  const template = createDemoBookingReceivedEmail(name, date, time, duration, language, meetingLink);
  return sendEmail(email, template);
}

/**
 * Send Demo Confirmation Email (when admin confirms the booking)
 */

/**
 * Send demo confirmation email
 */
export async function sendDemoConfirmationEmail(
  email: string,
  name: string,
  date: string,
  time: string,
  duration: string,
  language: 'ar' | 'en'
): Promise<boolean> {
  const template = createDemoConfirmationEmail(name, date, time, duration, language);
  return sendEmail(email, template);
}

/**
 * Demo Reminder Email Template (24 hours before appointment)
 */

/**
 * Send demo reminder email
 */
export async function sendDemoReminderEmail(
  email: string,
  name: string,
  date: string,
  time: string,
  duration: string,
  meetingLink: string,
  language: 'ar' | 'en'
): Promise<boolean> {
  const template = createDemoReminderEmail(name, date, time, duration, meetingLink, language);
  return sendEmail(email, template);
}

/**
 * Job Application Confirmation Email Template
 */
