<?php
class Admin {
	/**
	 * Admin class construct
	 */
	public function __construct() {
		add_filter( 'admin_body_class', [ $this, 'body_class' ] );
		new admin\Menu();

		// Load Demo Importer.
		require_once FORUMAX_PATH . 'includes/admin/Demo_Importer.php';
	}
	
	/**
	 * Add body class to admin pages.
	 *
	 * @param string $classes Body classes.
	 * @return string
	 */
	public function body_class( $classes ) {
		// if current page is ?page=forumax in admin.
		if ( isset( $_GET['page'] ) && 'forumax' === $_GET['page'] ) {
			$classes .= ' bbpc-forum-ui';
		}

		// if has no pro plan.
		if ( forumax_is_premium() !== true ) {
			$classes .= ' bbpc-no-pro';
		}
		
		// if has no promax plan.
		if ( forumax_is_promax() !== true ) {
			$classes .= ' bbpc-no-promax';
		}

		if ( class_exists( 'BBPC_GEO_ROLES' ) ) {
			$classes .= ' bbpc-geo-roles';
		}
		
		return $classes;
	}
}
