import Handlebars from "handlebars"; // Translations for Order Created emails const translations = { en: { subject: "Order {{orderNumber}} Confirmed", title: "Order Confirmed", greeting: "Dear {{customerName}},", body: "Thank you for your order! We have received it and it is now being processed.", orderLabel: "Order:", dateLabel: "Date:", statusLabel: "Status:", itemsLabel: "Items", subtotalLabel: "Subtotal:", shippingLabel: "Shipping:", taxLabel: "Tax:", totalLabel: "Total:", shippingAddressLabel: "Shipping Address", phoneLabel: "Phone:", phoneNotProvided: "Not provided", viewOrderButton: "View Order", thankYou: "Thank you!", companyName: "ManoonOils", footerText: "support@manoonoils.com" }, sr: { subject: "Porudžbina {{orderNumber}} Potvrđena", title: "Porudžbina Potvrđena", greeting: "Poštovani {{customerName}},", body: "Hvala vam na porudžbini! Primili smo je i sada je obrađujemo.", orderLabel: "Porudžbina:", dateLabel: "Datum:", statusLabel: "Status:", itemsLabel: "Artikli", subtotalLabel: "Međuzbir:", shippingLabel: "Dostava:", taxLabel: "Porez:", totalLabel: "Ukupno:", shippingAddressLabel: "Adresa za Dostavu", phoneLabel: "Telefon:", phoneNotProvided: "Nije navedeno", viewOrderButton: "Pogledaj Porudžbinu", thankYou: "Hvala vam!", companyName: "ManoonOils", footerText: "support@manoonoils.com" }, de: { subject: "Bestellung {{orderNumber}} Bestätigt", title: "Bestellung Bestätigt", greeting: "Sehr geehrte/r {{customerName}},", body: "Vielen Dank für Ihre Bestellung! Wir haben sie erhalten und bearbeiten sie jetzt.", orderLabel: "Bestellung:", dateLabel: "Datum:", statusLabel: "Status:", itemsLabel: "Artikel", subtotalLabel: "Zwischensumme:", shippingLabel: "Versand:", taxLabel: "Steuer:", totalLabel: "Gesamt:", shippingAddressLabel: "Lieferadresse", phoneLabel: "Telefon:", phoneNotProvided: "Nicht angegeben", viewOrderButton: "Bestellung Ansehen", thankYou: "Vielen Dank!", companyName: "ManoonOils", footerText: "support@manoonoils.com" }, fr: { subject: "Commande {{orderNumber}} Confirmée", title: "Commande Confirmée", greeting: "Cher/Chère {{customerName}},", body: "Merci pour votre commande! Nous l'avons reçue et elle est en cours de traitement.", orderLabel: "Commande:", dateLabel: "Date:", statusLabel: "Statut:", itemsLabel: "Articles", subtotalLabel: "Sous-total:", shippingLabel: "Livraison:", taxLabel: "Taxe:", totalLabel: "Total:", shippingAddressLabel: "Adresse de Livraison", phoneLabel: "Téléphone:", phoneNotProvided: "Non fourni", viewOrderButton: "Voir la Commande", thankYou: "Merci!", companyName: "ManoonOils", footerText: "support@manoonoils.com" } }; // Customer email template const customerEmailTemplate = `
{{greeting}}
{{body}}
{{orderLabel}} {{orderNumber}}
{{dateLabel}} {{orderDate}}
{{statusLabel}} {{orderStatus}}
{{itemsLabel}}
{{quantity}}x {{name}} - {{price}}
{{/each}}{{subtotalLabel}} {{subtotal}}
{{shippingLabel}} {{shipping}}
{{taxLabel}} {{tax}}
{{totalLabel}} {{total}}
{{shippingAddressLabel}}
{{shippingAddress}}
{{phoneLabel}} {{#if phone}}{{phone}}{{else}}{{phoneNotProvided}}{{/if}}
{{footerText}}
{{thankYou}}
{{companyName}}
{{dateLabel}} {{orderDate}}
{{statusLabel}} {{orderStatus}}
{{paymentLabel}} {{paymentMethod}}
{{nameLabel}} {{customerName}}
{{emailLabel}} {{customerEmail}}
{{phoneLabel}} {{#if phone}}{{phone}}{{else}}{{phoneNotProvided}}{{/if}}
{{itemsLabel}}
{{quantity}}x {{name}} - {{price}}
{{/each}}{{subtotalLabel}} {{subtotal}}
{{shippingLabel}} {{shipping}}
{{taxLabel}} {{tax}}
{{totalLabel}} {{total}}
{{shippingAddressLabel}}
{{shippingAddress}}