<?php

/**
 * Fired during plugin activation
 *
 * @link       https://flothemes.com/
 * @since      1.0.0
 *
 * @package    Flo_Flex_Builder
 * @subpackage Flo_Flex_Builder/includes
 */

/**
 * Fired during plugin activation.
 *
 * This class defines all code necessary to run during the plugin's activation.
 *
 * @since      1.0.0
 * @package    Flo_Flex_Builder
 * @subpackage Flo_Flex_Builder/includes
 * @author     Flothemes <alexb@flothemes.com>
 */
class Flo_Flex_Builder_Activator {
	public static function activate() {
		$requirements = flex_meets_requirements();
		if ( is_wp_error($requirements) ) {
			die( $requirements->get_error_message() );
		} else {
			$allowed_themes = ["mono", "june", "faro", "elise", "lyra", "velvet", "verso", "cotton", "nessa", "nomade", "zephyr", "ember"];
			$theme = flex_get_theme();
			if(in_array($theme, $allowed_themes)) {
				Flo_Flex_Builder_Update::handle_theme_update();
			}
		}
	}
}
