<?php

use EDPW\Core\Helpers\Plugin;
use WLCT\App\Router;

defined( 'ABSPATH' ) || exit;
if ( Plugin::isActive( 'wp-loyalty-rules/wp-loyalty-rules.php' ) || Plugin::isActive( 'wployalty/wp-loyalty-rules-lite.php' ) ) {
	defined( 'WLCT_PLUGIN_NAME' ) or define( 'WLCT_PLUGIN_NAME',  'WPLoyalty' );
	defined( 'WLCT_PLUGIN_SLUG' ) or define( 'WLCT_PLUGIN_SLUG', 'wlct-loyalty-compatibility' );
	defined( 'WLCT_PLUGIN_URL' ) or define( 'WLCT_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
	defined( 'WLCT_PLUGIN_FILE' ) or define( 'WLCT_PLUGIN_FILE', __FILE__ );
	defined( 'WLCT_PLUGIN_DIR' ) or define( 'WLCT_PLUGIN_DIR', str_replace( '\\', '/', __DIR__ ) );
	defined( 'WLCT_PLUGIN_PREFIX' ) or define( 'WLCT_PLUGIN_PREFIX', 'wlc' );
	defined( 'WLCT_PLUGIN_PATH' ) or define( 'WLCT_PLUGIN_PATH', __DIR__ . '/' );
	if ( class_exists( Router::class ) ) {
		Router::init();
	}
}
