import * as React from "react"
import { render } from "@react-email/render"

import AutomationEmail, { type AutomationEmailProps } from "../emails/automation-email"
import SimpleNotificationEmail, { type SimpleNotificationEmailProps } from "../emails/simple-notification-email"
import InviteEmail, { type InviteEmailProps } from "../emails/invite-email"
import PasswordResetEmail, { type PasswordResetEmailProps } from "../emails/password-reset-email"
import NewLoginEmail, { type NewLoginEmailProps } from "../emails/new-login-email"
import SlaWarningEmail, { type SlaWarningEmailProps } from "../emails/sla-warning-email"
import SlaBreachedEmail, { type SlaBreachedEmailProps } from "../emails/sla-breached-email"
import TicketCreatedEmail, { type TicketCreatedEmailProps } from "../emails/ticket-created-email"
import TicketResolvedEmail, { type TicketResolvedEmailProps } from "../emails/ticket-resolved-email"
import TicketAssignedEmail, { type TicketAssignedEmailProps } from "../emails/ticket-assigned-email"
import TicketStatusEmail, { type TicketStatusEmailProps } from "../emails/ticket-status-email"
import TicketCommentEmail, { type TicketCommentEmailProps } from "../emails/ticket-comment-email"

export type {
  AutomationEmailProps,
  SimpleNotificationEmailProps,
  InviteEmailProps,
  PasswordResetEmailProps,
  NewLoginEmailProps,
  SlaWarningEmailProps,
  SlaBreachedEmailProps,
  TicketCreatedEmailProps,
  TicketResolvedEmailProps,
  TicketAssignedEmailProps,
  TicketStatusEmailProps,
  TicketCommentEmailProps,
}

export async function renderAutomationEmailHtml(props: AutomationEmailProps) {
  return render(<AutomationEmail {...props} />, { pretty: false })
}

export async function renderSimpleNotificationEmailHtml(props: SimpleNotificationEmailProps) {
  return render(<SimpleNotificationEmail {...props} />, { pretty: false })
}

export async function renderInviteEmailHtml(props: InviteEmailProps) {
  return render(<InviteEmail {...props} />, { pretty: false })
}

export async function renderPasswordResetEmailHtml(props: PasswordResetEmailProps) {
  return render(<PasswordResetEmail {...props} />, { pretty: false })
}

export async function renderNewLoginEmailHtml(props: NewLoginEmailProps) {
  return render(<NewLoginEmail {...props} />, { pretty: false })
}

export async function renderSlaWarningEmailHtml(props: SlaWarningEmailProps) {
  return render(<SlaWarningEmail {...props} />, { pretty: false })
}

export async function renderSlaBreachedEmailHtml(props: SlaBreachedEmailProps) {
  return render(<SlaBreachedEmail {...props} />, { pretty: false })
}

export async function renderTicketCreatedEmailHtml(props: TicketCreatedEmailProps) {
  return render(<TicketCreatedEmail {...props} />, { pretty: false })
}

export async function renderTicketResolvedEmailHtml(props: TicketResolvedEmailProps) {
  return render(<TicketResolvedEmail {...props} />, { pretty: false })
}

export async function renderTicketAssignedEmailHtml(props: TicketAssignedEmailProps) {
  return render(<TicketAssignedEmail {...props} />, { pretty: false })
}

export async function renderTicketStatusEmailHtml(props: TicketStatusEmailProps) {
  return render(<TicketStatusEmail {...props} />, { pretty: false })
}

export async function renderTicketCommentEmailHtml(props: TicketCommentEmailProps) {
  return render(<TicketCommentEmail {...props} />, { pretty: false })
}
