<?php
/**
 * Plugin Name: LolaCore for Bricks
 * Plugin URI:  https://lolacore.com/lolacore-for-bricks/
 * Description: Lola runs your Bricks design system, pages, templates, and components from chat. She uses the classes you already have and previews every change.
 * Version:     1.1.0
 * Author:      Fran Barbero
 * Author URI:  https://profiles.wordpress.org/vanguardhive/
 * License:     GPL-2.0-or-later
 * Text Domain: lolacore-for-bricks
 * Domain Path: /languages
 * Requires at least: 7.0
 * Requires PHP: 8.1
 * Requires Plugins: lolacore
 * Requires LolaCore: 2.7.0
 *
 * @package LolaCoreForBricks
 */

declare(strict_types=1);

if (!defined('ABSPATH')) {
    exit;
}

if (file_exists(__DIR__ . '/vendor/autoload.php')) {
    require_once __DIR__ . '/vendor/autoload.php';
}

define('LOLACORE_FOR_BRICKS_VERSION', '1.1.0');
define('LOLACORE_FOR_BRICKS_FILE', __FILE__);
define('LOLACORE_FOR_BRICKS_PATH', plugin_dir_path(__FILE__));
define('LOLACORE_FOR_BRICKS_URL', plugin_dir_url(__FILE__));

register_activation_hook(__FILE__, static function (): void {
    if (class_exists(\LolaCoreForBricks\Activation::class)) {
        \LolaCoreForBricks\Activation::activate();
    }
});

add_action('init', static function (): void {
    if (class_exists(\LolaCoreForBricks\Bootstrap::class)) {
        (new \LolaCoreForBricks\Bootstrap())->init();
    }
}, 5);
