<?php

/**
 * Block Builder module bootstrap.
 *
 * @package LolaCore\BlockBuilder
 * @license GPL-2.0-or-later
 */

declare(strict_types=1);

namespace LolaCore\BlockBuilder;

use LolaCore\BlockBuilder\Admin\AdminAssets;
use LolaCore\BlockBuilder\Admin\BlockBuilderAjax;
use LolaCore\BlockBuilder\Admin\BlockEditScreen;
use LolaCore\BlockBuilder\Admin\LibraryColumns;
use LolaCore\BlockBuilder\Playground\BlockPlaygroundBlueprintController;
use LolaCore\BlockBuilder\PostType\BlockPostType;
use LolaCore\BlockBuilder\Registry\BlockRegistry;

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

/**
 * Wires the Block Builder CPT and related hooks into WordPress.
 */
class BlockBuilderBootstrap {

	public function register(): void {
		$post_type = new BlockPostType();
		$post_type->register();

		$registry = new BlockRegistry();
		$registry->register();

		$library = new LibraryColumns();
		$library->register();

		$edit_screen = new BlockEditScreen();
		$edit_screen->register();

		$ajax = new BlockBuilderAjax();
		$ajax->register();

		$assets = new AdminAssets();
		$assets->register();

		$playground = new BlockPlaygroundBlueprintController();
		$playground->register();
	}
}
