<?php
/**
 * Order Completed Email
 * Sent to customer when order is marked as completed
 */

if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

class GGM_Commerce_Email_Order_Completed extends GGM_Commerce_Email_Template {

    /**
     * Constructor
     */
    public function __construct() {
        $this->id             = 'order_completed';
        $this->title          = __( 'Order Completed', 'ggm-commerce' );
        $this->description    = __( 'Sent to customer when their order is marked as completed.', 'ggm-commerce' );
        $this->recipient_type = 'customer';
    }

    /**
     * Get default subject
     *
     * @return string
     */
    public function get_default_subject() {
        return __( 'Your order #{order_number} is complete', 'ggm-commerce' );
    }

    /**
     * Get default heading
     *
     * @return string
     */
    public function get_default_heading() {
        return __( 'Your order is complete!', 'ggm-commerce' );
    }

    /**
     * Get default content
     *
     * @return string
     */
    public function get_default_content() {
        return '
<p>Hi {customer_first_name},</p>

<p>Your order #{order_number} has been completed. Thank you for your purchase!</p>

<h3 style="margin: 24px 0 16px 0; font-size: 18px; color: #1f2937;">Order Details</h3>

<p><strong>Order Number:</strong> #{order_number}<br>
<strong>Order Date:</strong> {order_date}<br>
<strong>Order Total:</strong> {order_total}</p>

{order_items_table}

<p style="margin-top: 32px;">If you have any questions about your order, please contact us at {business_email}.</p>

<p>Thank you for shopping with us. We hope to see you again soon!</p>
';
    }
}
