<?php
/**
 * List of WooCommerce SMS Notifications
 *
 * @package miniorange-sms-order-notification-otp-verification/notifications/wcsmsnotification/helper
 */

namespace WCSMSOTP\Notifications\WcSMSNotification\Helper;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
use WCSMSOTP\Notifications\WcSMSNotification\Helper\Notifications\WooCommerceAdminOrderstatusNotification;
use WCSMSOTP\Notifications\WcSMSNotification\Helper\Notifications\WooCommerceCutomerNoteNotification;
use WCSMSOTP\Notifications\WcSMSNotification\Helper\Notifications\WooCommerceNewCustomerNotification;
use WCSMSOTP\Notifications\WcSMSNotification\Helper\Notifications\WooCommerceOrderCancelledNotification;
use WCSMSOTP\Notifications\WcSMSNotification\Helper\Notifications\WooCommerceOrderCompletedNotification;
use WCSMSOTP\Notifications\WcSMSNotification\Helper\Notifications\WooCommerceOrderFailedNotification;
use WCSMSOTP\Notifications\WcSMSNotification\Helper\Notifications\WooCommerceOrderOnHoldNotification;
use WCSMSOTP\Notifications\WcSMSNotification\Helper\Notifications\WooCommerceOrderPendingNotification;
use WCSMSOTP\Notifications\WcSMSNotification\Helper\Notifications\WooCommerceOrderProcessingNotification;
use WCSMSOTP\Notifications\WcSMSNotification\Helper\Notifications\WooCommerceOrderRefundedNotification;
use WCSMSOTP\Traits\Instance;

/**
 * This class is used to list down all the WooCommerce Notifications and initialize
 * each of the Notification classes so that it's accessible plugin wide. This
 * class is basically used to handle all the specific WooCommerce Notification classes.
 */
if ( ! class_exists( 'WooCommerceNotificationsList' ) ) {
	/**
	 * WooCommerceNotificationsList class
	 */
	class WooCommerceNotificationsList {

		/** Global Variable
				 *
				 * @var instance - initiates the instance of the file.
				 */
		use Instance;

		/**
		 * New Customer Notification Class
		 *
		 * @var WooCommerceNewCustomerNotification
		 */
		public $wc_new_customer_notif;

		/**
		 * Customer Note Notification Class
		 *
		 * @var WooCommerceCutomerNoteNotification
		 */
		public $wc_customer_note_notif;

		/**
		 * Admin Order Status Notification Class
		 *
		 * @var WooCommerceAdminOrderstatusNotification
		 */
		public $wc_admin_order_status_notif;

		/**
		 * Order on Hold Notification Class
		 *
		 * @var WooCommerceOrderOnHoldNotification
		 */
		public $wc_order_on_hold_notif;

		/**
		 * Order is processing Notification Class
		 *
		 * @var WooCommerceOrderProcessingNotification
		 */
		public $wc_order_processing_notif;

		/**
		 * Order Completed Notification Class
		 *
		 * @var WooCommerceOrderCompletedNotification
		 */
		public $wc_order_completed_notif;

		/**
		 * Order refunded Notification Class
		 *
		 * @var WooCommerceOrderRefundedNotification
		 */
		public $wc_order_refunded_notif;

		/**
		 * Order Cancelled Notification Class
		 *
		 * @var WooCommerceOrderCancelledNotification
		 */
		public $wc_order_cancelled_notif;

		/**
		 * Order Failed Notification Class
		 *
		 * @var WooCommerceOrderFailedNotification
		 */
		public $wc_order_failed_notif;

		/**
		 * Order Pending Notification Class
		 *
		 * @var WooCommerceOrderPendingNotification
		 */
		public $wc_order_pending_notif;

		/** Declare Default variables */
		protected function __construct() {
			$this->wc_new_customer_notif       = WooCommerceNewCustomerNotification::getInstance();
			$this->wc_customer_note_notif      = WooCommerceCutomerNoteNotification::getInstance();
			$this->wc_admin_order_status_notif = WooCommerceAdminOrderstatusNotification::getInstance();
			$this->wc_order_on_hold_notif      = WooCommerceOrderOnHoldNotification::getInstance();
			$this->wc_order_processing_notif   = WooCommerceOrderProcessingNotification::getInstance();
			$this->wc_order_completed_notif    = WooCommerceOrderCompletedNotification::getInstance();
			$this->wc_order_refunded_notif     = WooCommerceOrderRefundedNotification::getInstance();
			$this->wc_order_cancelled_notif    = WooCommerceOrderCancelledNotification::getInstance();
			$this->wc_order_failed_notif       = WooCommerceOrderFailedNotification::getInstance();
			$this->wc_order_pending_notif      = WooCommerceOrderPendingNotification::getInstance();
		}


		/**
		 * Getter function of the $wc_new_customer_notif. Returns the instance
		 * of the WooCommerceNewCustomerNotification class.
		 *
		 * @return WooCommerceNewCustomerNotification|null The notification instance or null if not set.
		 */
		public function get_wc_new_customer_notif() {
			return isset( $this->wc_new_customer_notif ) && is_object( $this->wc_new_customer_notif ) ? $this->wc_new_customer_notif : null;
		}


		/**
		 * Getter function of the $wc_customer_note_notif. Returns the instance
		 * of the WooCommerceCutomerNoteNotification class.
		 *
		 * @return WooCommerceCutomerNoteNotification|null The notification instance or null if not set.
		 */
		public function get_wc_customer_note_notif() {
			return isset( $this->wc_customer_note_notif ) && is_object( $this->wc_customer_note_notif ) ? $this->wc_customer_note_notif : null;
		}


		/**
		 * Getter function of the $wc_admin_order_status_notif. Returns the instance
		 * of the WooCommerceAdminOrderstatusNotification class.
		 *
		 * @return WooCommerceAdminOrderstatusNotification|null The notification instance or null if not set.
		 */
		public function get_wc_admin_order_status_notif() {
			return isset( $this->wc_admin_order_status_notif ) && is_object( $this->wc_admin_order_status_notif ) ? $this->wc_admin_order_status_notif : null;
		}

		/**
		 * Getter function of the $wc_order_on_hold_notif. Returns the instance
		 * of the WooCommerceOrderOnHoldNotification class.
		 *
		 * @return WooCommerceOrderOnHoldNotification|null The notification instance or null if not set.
		 */
		public function get_wc_order_on_hold_notif() {
			return isset( $this->wc_order_on_hold_notif ) && is_object( $this->wc_order_on_hold_notif ) ? $this->wc_order_on_hold_notif : null;
		}

		/**
		 * Getter function of the $wc_order_processing_notif. Returns the instance
		 * of the WooCommerceOrderProcessingNotification class.
		 *
		 * @return WooCommerceOrderProcessingNotification|null The notification instance or null if not set.
		 */
		public function get_wc_order_processing_notif() {
			return isset( $this->wc_order_processing_notif ) && is_object( $this->wc_order_processing_notif ) ? $this->wc_order_processing_notif : null;
		}


		/**
		 * Getter function of the $wc_order_completed_notif. Returns the instance
		 * of the WooCommerceOrderCompletedNotification class.
		 *
		 * @return WooCommerceOrderCompletedNotification|null The notification instance or null if not set.
		 */
		public function get_wc_order_completed_notif() {
			return isset( $this->wc_order_completed_notif ) && is_object( $this->wc_order_completed_notif ) ? $this->wc_order_completed_notif : null;
		}

		/**
		 * Getter function of the $wc_order_refunded_notif. Returns the instance
		 * of the WooCommerceOrderRefundedNotification class.
		 *
		 * @return WooCommerceOrderRefundedNotification|null The notification instance or null if not set.
		 */
		public function get_wc_order_refunded_notif() {
			return isset( $this->wc_order_refunded_notif ) && is_object( $this->wc_order_refunded_notif ) ? $this->wc_order_refunded_notif : null;
		}

		/**
		 * Getter function of the $wc_order_cancelled_notif. Returns the instance
		 * of the WooCommerceOrderCancelledNotification class.
		 *
		 * @return WooCommerceOrderCancelledNotification|null The notification instance or null if not set.
		 */
		public function get_wc_order_cancelled_notif() {
			return isset( $this->wc_order_cancelled_notif ) && is_object( $this->wc_order_cancelled_notif ) ? $this->wc_order_cancelled_notif : null;
		}

		/**
		 * Getter function of the $wc_order_failed_notif. Returns the instance
		 * of the WooCommerceOrderFailedNotification class.
		 *
		 * @return WooCommerceOrderFailedNotification|null The notification instance or null if not set.
		 */
		public function get_wc_order_failed_notif() {
			return isset( $this->wc_order_failed_notif ) && is_object( $this->wc_order_failed_notif ) ? $this->wc_order_failed_notif : null;
		}

		/**
		 * Getter function of the $wc_order_pending_notif. Returns the instance
		 * of the WooCommerceOrderPendingNotification class.
		 *
		 * @return WooCommerceOrderPendingNotification|null The notification instance or null if not set.
		 */
		public function get_wc_order_pending_notif() {
			return isset( $this->wc_order_pending_notif ) && is_object( $this->wc_order_pending_notif ) ? $this->wc_order_pending_notif : null;
		}
	}
}
