<?php

if (!defined('ABSPATH')) {
  wp_die(esc_html__('Do not open this file directly.', 'ucla-wordpress-plugin'));
}

/**
 * Enqueues the block assets for the frontend
 */
function ucla_wordpress_enqueue_motion_assets()
{
  wp_enqueue_script(
    'ucla-wordpress-motion-js',
    plugin_dir_url(__DIR__) . 'ucla-motion.js',
    array(),
    null,
    true
);
  wp_localize_script(
		'ucla-wordpress-motion-js',
		'uclaMotionData',
		array(
			'unsupportedBlocks' => include __DIR__ . '/inc/unsupported-blocks.php',
    )
	);
}
add_action('enqueue_block_editor_assets', 'ucla_wordpress_enqueue_motion_assets');