<?php
$prefix = 'evbButton';
$id = wp_unique_id( "$prefix-" );

extract( $attributes ?? [] );

if( 'content' === $modal['type'] && $modal['content'] ) {
	$blocks = parse_blocks( $modal['content'] );
	$bContent = '';

	foreach ( $blocks as $block ) {
		$bContent.= render_block( $block );
	}

	$attributes['modal']['content'] = $bContent;
}

if( isset( $advanced['animation']['type'] ) && !empty( $advanced['animation']['type'] ) ) {
	wp_enqueue_style( 'aos' );
	wp_enqueue_script( 'aos' );
}
?>
<div
	<?php echo wp_kses_data( get_block_wrapper_attributes() ); ?>
	id='<?php echo esc_attr( $id ); ?>'
	data-attributes='<?php echo esc_attr( wp_json_encode( $attributes ) ); ?>'
	data-wusul='<?php echo esc_attr( evpbWusul() ); ?>'
></div>