<?php
/**
 * New Subscription Admin Email
 * Sent to admin when a new subscription is created.
 *
 * @package GGM_Commerce
 */

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

class GGM_Commerce_Email_Subscription_New_Admin extends GGM_Commerce_Email_Subscription_Template {

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

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

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

	public function get_default_content() {
		return '
<p>A new subscription has been created by {customer_name} ({customer_email}).</p>

<div class="address-box" style="margin: 24px 0; background: #d1fae5; border-left: 4px solid #059669;">
	<h4 style="color: #065f46;">Subscription Summary</h4>
	<p><strong>Subscription:</strong> #{subscription_number}<br>
	<strong>Product:</strong> {subscription_product}<br>
	<strong>Billing Cycle:</strong> {subscription_cycle}<br>
	<strong>Payment Method:</strong> {subscription_payment_method}<br>
	<strong>Start Date:</strong> {subscription_start_date}</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>
';
	}
}
