<?php
/**
 * Email Templates for HealthLink Notifications
 * Centralized templates for appointment confirmations, registration, etc.
 */

class EmailTemplates {
    
    public static function appointmentConfirmation($patient_name, $doctor_name, $date, $time, $appointment_id) {
        return [
            'subject' => 'Appointment Confirmation - HealthLink',
            'body' => "
Dear {$patient_name},

Your appointment has been confirmed!

**Appointment Details:**
- Doctor: {$doctor_name}
- Date: {$date}
- Time: {$time}
- Appointment ID: {$appointment_id}

Please arrive 10 minutes early. If you need to reschedule or cancel, please contact us as soon as possible.

Best regards,
HealthLink Team
"
        ];
    }

    public static function appointmentReminder($patient_name, $doctor_name, $date, $time, $appointment_id) {
        return [
            'subject' => 'Appointment Reminder - HealthLink',
            'body' => "
Dear {$patient_name},

This is a reminder about your upcoming appointment.

**Appointment Details:**
- Doctor: {$doctor_name}
- Date: {$date}
- Time: {$time}
- Appointment ID: {$appointment_id}

Please confirm your attendance or reschedule if needed.

Best regards,
HealthLink Team
"
        ];
    }

    public static function registrationConfirmation($name, $health_id) {
        return [
            'subject' => 'Welcome to HealthLink - Registration Confirmed',
            'body' => "
Dear {$name},

Welcome to HealthLink! Your registration has been completed successfully.

**Your Health ID:** {$health_id}

You can now login and book appointments with our qualified doctors. Visit us at: " . SITE_URL . "

If you have any questions, please contact our support team.

Best regards,
HealthLink Team
"
        ];
    }

    public static function doctorApprovalConfirmation($doctor_name, $license_number) {
        return [
            'subject' => 'Doctor Account Approved - HealthLink',
            'body' => "
Dear Dr. {$doctor_name},

Congratulations! Your doctor account has been approved by our admin team.

**License Number:** {$license_number}

You can now login and start accepting patient appointments. Visit us at: " . SITE_URL . "

Best regards,
HealthLink Admin Team
"
        ];
    }

    public static function paymentConfirmation($patient_name, $amount, $payment_id, $appointment_id) {
        return [
            'subject' => 'Payment Confirmation - HealthLink',
            'body' => "
Dear {$patient_name},

Your payment has been received successfully!

**Payment Details:**
- Amount: PKR {$amount}
- Payment ID: {$payment_id}
- Appointment ID: {$appointment_id}

Thank you for using HealthLink.

Best regards,
HealthLink Payments Team
"
        ];
    }

    public static function consultationUpdate($patient_name, $doctor_name, $status, $notes = '') {
        $notes_text = $notes ? "\n\n**Doctor Notes:**\n{$notes}" : '';
        return [
            'subject' => 'Consultation Update - HealthLink',
            'body' => "
Dear {$patient_name},

Your consultation with Dr. {$doctor_name} has been updated.

**Status:** {$status}{$notes_text}

Please login to your HealthLink account for more details.

Best regards,
HealthLink Medical Team
"
        ];
    }

    public static function supportTicketResponse($name, $ticket_id, $response, $status) {
        return [
            'subject' => "Support Ticket #{$ticket_id} Update - HealthLink",
            'body' => "
Dear {$name},

Your support ticket has been updated.

**Ticket ID:** {$ticket_id}
**Status:** {$status}

**Response:**
{$response}

If you have any further questions, reply to this ticket.

Best regards,
HealthLink Support Team
"
        ];
    }
}
?>
