<?php // phpcs:ignore WordPress.Files.FileName

if ( ! defined( 'YITH_COG_VERSION' ) ) {
	exit( 'Direct access forbidden.' );
}

/**
 * Class YITH_COG_Premium
 *
 * @class      YITH_COG_Premium
 * @package    Yithemes
 * @since      Version 1.0.0
 * @author     YITH <plugins@yithemes.com>
 */

if ( ! class_exists( 'YITH_COG_Premium' ) ) {
	/**
	 * Class YITH_COG_Premium
	 *
	 */
	class YITH_COG_Premium extends YITH_COG {

		/**
		 * Plugin version
		 *
		 * @var string
		 */
		public $version = YITH_COG_VERSION;

		/**
		 * Contain the instance of the class.
		 *
		 * @var YITH_COG_Premium
		 */
		protected static $instance = null;

		/**
		 * Contain the instance of the Admin class.
		 *
		 * @var YITH_COG_Admin_Premium
		 */
		public $admin = null;

		/**
		 * Contain the instance of the Frontend class.
		 *
		 * @var YITH_COG_Admin_Premium
		 */
		public $frontend = null;


		/**
		 * Constructor
		 */
		public function __construct() {

			add_filter( 'yith_cog_require_class', array( $this, 'load_premium_classes' ) );

			parent::__construct();
		}


		/**
		 * Load premium classes
		 *
		 * @param array $require Required files to load.
		 *
		 * @return array
		 */
		public function load_premium_classes( $require ) {

			$frontend = array();
			$common   = array();
			$admin    = array(
				'includes/admin/class.yith-cog-admin-premium.php',
			);

			$require['frontend'] = array_merge( $require['frontend'], $frontend );
			$require['admin']    = array_merge( $require['admin'], $admin );
			$require['common']   = array_merge( $require['common'], $common );

			return $require;
		}

	}
}

