<?php
/**
 * Genolve Toolkit Image Block Extension
 * Add genolve button to toolbar to open genolve editor.
if ( ! defined( 'CUSTOM_ATTRIBUTES_PATH' ) ) {
    define( 'CUSTOM_ATTRIBUTES_PATH', plugin_dir_path( __FILE__ ) );
}
if ( ! defined( 'CUSTOM_ATTRIBUTES_URL' ) ) {
    define( 'CUSTOM_ATTRIBUTES_URL', plugin_dir_url( __FILE__ ) );
} */

if( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

function custom_attributes_editor_scripts() {
	/*	*/
	wp_register_script(
			'genolve-toolkit-bimage',
			plugins_url( 'index.js', __FILE__ ),
			 [ 'wp-blocks', 'wp-dom', 'wp-dom-ready', 'wp-edit-post' ],
			filemtime( plugin_dir_path( __FILE__ ) . 'index.js' )
		);
	
   /*
	  wp_register_script(
        'custom-attributes',
        CUSTOM_ATTRIBUTES_URL . 'build/index.js',
        [ 'wp-blocks', 'wp-dom', 'wp-dom-ready', 'wp-edit-post' ],
        filemtime( CUSTOM_ATTRIBUTES_PATH . 'build/index.js' )
    );
		*/
    wp_enqueue_script( 'genolve-toolkit-bimage' );
}
add_action( 'enqueue_block_editor_assets', 'custom_attributes_editor_scripts' );

?>