<?php

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

defined( 'ABSPATH' ) || exit;

if ( Plugin::isActive( 'woocommerce-bookings/woocommerce-bookings.php' ) ) {
	defined( 'EBCT_PLUGIN_NAME' ) or define( 'EBCT_PLUGIN_NAME', 'WooCommerce Bookings' );
	defined( 'EBCT_PLUGIN_SLUG' ) or define( 'EBCT_PLUGIN_SLUG', 'ebct-booking-compatibility' );
	defined( 'EBCT_PLUGIN_URL' ) or define( 'EBCT_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
	defined( 'EBCT_PLUGIN_FILE' ) or define( 'EBCT_PLUGIN_FILE', __FILE__ );
	defined( 'EBCT_PLUGIN_DIR' ) or define( 'EBCT_PLUGIN_DIR', str_replace( '\\', '/', __DIR__ ) );
	defined( 'EBCT_PLUGIN_PREFIX' ) or define( 'EBCT_PLUGIN_PREFIX', 'ebc' );
	defined( 'EBCT_PLUGIN_PATH' ) or define( 'EBCT_PLUGIN_PATH', __DIR__ . '/' );
	if ( class_exists( Router::class ) ) {
		Router::init();
	}
}
