<?php
/**
 * Subscription Cancelled Admin Email
 * Sent to admin when a subscription is cancelled.
 *
 * @package GGM_Commerce
 */

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

class GGM_Commerce_Email_Subscription_Cancelled_Admin extends GGM_Commerce_Email_Subscription_Template {

	public function __construct() {
		$this->id             = 'subscription_cancelled_admin';
		$this->title          = __( 'Subscription Cancelled (Admin)', 'ggm-commerce' );
		$this->description    = __( 'Sent to admin when a subscription is cancelled.', 'ggm-commerce' );
		$this->recipient_type = 'admin';
	}

	public function get_default_subject() {
		return __( '[{site_name}] Subscription #{subscription_number} cancelled', 'ggm-commerce' );
	}

	public function get_default_heading() {
		return __( 'Subscription Cancelled', 'ggm-commerce' );
	}

	public function get_default_content() {
		return '
<p>Subscription #{subscription_number} has been cancelled.</p>

<div class="address-box" style="margin: 24px 0; background: #fee2e2; border-left: 4px solid #dc2626;">
	<h4 style="color: #991b1b;">Cancellation Details</h4>
	<p><strong>Subscription:</strong> #{subscription_number}<br>
	<strong>Customer:</strong> {customer_name} ({customer_email})<br>
	<strong>Product:</strong> {subscription_product}<br>
	<strong>Billing Cycle:</strong> {subscription_cycle}<br>
	<strong>Reason:</strong> {cancellation_reason}</p>
</div>

<p style="margin-top: 32px; text-align: center;">
	<a href="{site_url}/wp-admin/admin.php?page=ggm-commerce-settings&tab=subscriptions&subscription_id={subscription_number}" class="button">View Subscription</a>
</p>
';
	}
}
