<?php
/**
 * Order Delivered Email
 * Sent to customer when order is delivered
 */

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

class GGM_Commerce_Email_Order_Delivered extends GGM_Commerce_Email_Template {

    /**
     * Constructor
     */
    public function __construct() {
        $this->id             = 'order_delivered';
        $this->title          = __( 'Order Delivered', 'ggm-commerce' );
        $this->description    = __( 'Sent to customer when their order has been delivered.', 'ggm-commerce' );
        $this->recipient_type = 'customer';
    }

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

    /**
     * Get default heading
     *
     * @return string
     */
    public function get_default_heading() {
        return __( 'Your order has arrived!', '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 delivered to:</p>

<div class="address-box" style="margin: 24px 0;">
    <p>{shipping_address}</p>
</div>

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

{order_items_table}

<p style="margin-top: 32px;">We hope you enjoy your purchase! If you have any questions or concerns about your order, please don\'t hesitate to contact us.</p>

<p>We\'d love to hear your feedback. Consider leaving a review for the products you purchased.</p>

<p>Thank you for shopping with us!</p>
';
    }
}
