<?php
/**
 * Register
 *
 * @package brahma
 * @since 1.0.0
 */

namespace Brahma;

/**
 * Register Patterns
 */
function brahma_register_block_patterns() {
	register_block_pattern(
		'brahma/marketing-button',
		array(
			'title'       => __( 'Marketing Button', 'brahma' ),
			'description' => __( 'Call to action button designed to drive user engagement and conversions, perfect for promotions, lead generation, and e-commerce.', 'brahma' ),
			'content'     => '<!-- wp:buttons -->
<div class="wp-block-buttons"><!-- wp:button {"gradient":"blush-bordeaux","style":{"border":{"radius":"16px"},"spacing":{"padding":{"left":"var:preset|spacing|80","right":"var:preset|spacing|80","top":"var:preset|spacing|50","bottom":"var:preset|spacing|50"}}},"fontSize":"24"} -->
<div class="wp-block-button has-custom-font-size has-24-font-size"><a class="wp-block-button__link has-blush-bordeaux-gradient-background has-background wp-element-button" href="#" style="border-radius:16px;padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--80);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--80)">' . __( '30% Off - Buy Now', 'brahma' ) . '</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->',
			'categories'  => array( 'call-to-action' ),
		)
	);

	// You can register more patterns here.
}
add_action( 'init', BRAHMA_NS . 'brahma_register_block_patterns' );

/**
 * Register Categories
 */
function brahma_register_block_pattern_categories() {
	if ( function_exists( 'register_block_pattern_category' ) ) {
		register_block_pattern_category(
			'brahma_pages',
			array( 'label' => __( '1. Pages', 'brahma' ) )
		);
	}
}
add_action( 'init', BRAHMA_NS . 'brahma_register_block_pattern_categories' );
