<?php
namespace SabaiApps\Directories\Component\Membership\NotificationEvent;

use SabaiApps\Directories\Component\Payment\NotificationEvent\PlanExpiringNotificationEvent as PlanExpiringNotificationEventBase;

class PlanExpiringNotificationEvent extends PlanExpiringNotificationEventBase {

	protected function _notificationEntityEventInfo() {
		$info            = parent::_notificationEntityEventInfo();
		$info['label']   = _x( 'Membership plan expiring', 'notification event', 'directories-pro' );
		$info['weight'] += 10;
		return $info;
	}

	protected function _getDefaultNotificationLabel() {
		return __( 'Your membership plan is about to expire', 'directories-pro' );
	}

	protected function _getDefaultNotificationBody() {
		return array(
			sprintf( __( 'Your membership plan on our site will expire in %1$s day(s).', 'directories-pro' ), '%payment_expire_days%' ),
			__( 'You can renew your membership from the dashboard page on our site.', 'directories-pro' ) . PHP_EOL . '%dashboard_url%',
		);
	}

	protected function _getDefaultNotificationRecipients() {
		return array(
			'event' => array( 'user' ),
		);
	}
}
