<?php
/**
 * Demo block presets — remove this file after testing.
 *
 * Registers sample presets for core/group to demonstrate the
 * brandy_register_block_preset() API.
 *
 * @package Brandy\BlockSettings\BlockPresets
 */

add_action( 'init', function () {
	if ( ! function_exists( 'brandy_register_block_preset' ) ) {
		return;
	}

	// Preset 1: Dark centered hero section
	brandy_register_block_preset(
		'core/group',
		array(
			'name'        => 'demo-dark-hero',
			'title'       => 'Dark Hero',
			'description' => 'Full-width dark background with centered text',
			'content'     => '<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"80px","bottom":"80px","left":"40px","right":"40px"}},"color":{"background":"#1a1a2e","text":"#ffffff"}},"layout":{"type":"constrained","contentSize":"800px"}} -->
<div class="wp-block-group alignfull has-text-color has-background" style="color:#ffffff;background-color:#1a1a2e;padding-top:80px;padding-right:40px;padding-bottom:80px;padding-left:40px"><!-- wp:heading {"textAlign":"center","style":{"typography":{"fontSize":"48px","fontWeight":"700"}}} -->
<h2 class="wp-block-heading has-text-align-center" style="font-size:48px;font-weight:700">Build Something Great</h2>
<!-- /wp:heading -->

<!-- wp:paragraph {"align":"center","style":{"typography":{"fontSize":"18px"},"color":{"text":"#b0b0b0"}}} -->
<p class="has-text-align-center has-text-color" style="color:#b0b0b0;font-size:18px">A modern dark hero section with clean typography and focused layout.</p>
<!-- /wp:paragraph -->

<!-- wp:buttons {"style":{"spacing":{"margin":{"top":"var:preset|spacing|30"}}},"layout":{"type":"flex","justifyContent":"center"}} -->
<div class="wp-block-buttons" style="margin-top:var(--wp--preset--spacing--30)"><!-- wp:button {"style":{"color":{"background":"#e94560","text":"#ffffff"},"border":{"radius":"4px"},"hoverBackgroundColor":"#cd3c54"}} -->
<div class="wp-block-button"><a class="wp-block-button__link has-text-color has-background wp-element-button" style="border-radius:4px;color:#ffffff;background-color:#e94560">Get Started</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons --></div>
<!-- /wp:group -->',
		)
	);

	// Preset 2: Light minimal section
	brandy_register_block_preset(
		'core/group',
		array(
			'name'        => 'demo-light-minimal',
			'title'       => 'Light Minimal',
			'description' => 'Clean white section with left-aligned text',
			'content'     => '<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"60px","bottom":"60px","left":"40px","right":"40px"}},"color":{"background":"#ffffff"}},"layout":{"type":"constrained","contentSize":"900px"}} -->
<div class="wp-block-group alignfull has-background" style="background-color:#ffffff;padding-top:60px;padding-right:40px;padding-bottom:60px;padding-left:40px">
<!-- wp:heading {"style":{"typography":{"fontSize":"36px","fontWeight":"600"}}} -->
<h2 class="wp-block-heading" style="font-size:36px;font-weight:600">Simple &amp; Clean</h2>
<!-- /wp:heading -->
<!-- wp:paragraph {"style":{"typography":{"fontSize":"16px","lineHeight":"1.8"},"color":{"text":"#555555"}}} -->
<p class="has-text-color" style="color:#555555;font-size:16px;line-height:1.8">A minimal layout that puts your content front and center. No distractions, just clean design.</p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:group -->',
		)
	);

	// Preset 3: Gradient CTA section
	brandy_register_block_preset(
		'core/group',
		array(
			'name'        => 'demo-gradient-cta',
			'title'       => 'Gradient CTA',
			'description' => 'Eye-catching gradient with call-to-action',
			'content'     => '<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"80px","bottom":"80px","left":"40px","right":"40px"}},"color":{"gradient":"linear-gradient(135deg, #667eea 0%, #764ba2 100%)","text":"#ffffff"}},"layout":{"type":"constrained","contentSize":"700px"}} -->
<div class="wp-block-group alignfull has-text-color has-background" style="color:#ffffff;background:linear-gradient(135deg, #667eea 0%, #764ba2 100%);padding-top:80px;padding-right:40px;padding-bottom:80px;padding-left:40px"><!-- wp:heading {"textAlign":"center","style":{"typography":{"fontSize":"40px","fontWeight":"700"}}} -->
<h2 class="wp-block-heading has-text-align-center" style="font-size:40px;font-weight:700">Ready to Start?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph {"align":"center","style":{"typography":{"fontSize":"18px"},"color":{"text":"#e0e0ff"}}} -->
<p class="has-text-align-center has-text-color" style="color:#e0e0ff;font-size:18px">Join thousands of users who trust our platform for their business.</p>
<!-- /wp:paragraph -->

<!-- wp:buttons {"style":{"spacing":{"blockGap":"16px","margin":{"top":"var:preset|spacing|20"}}},"layout":{"type":"flex","justifyContent":"center","orientation":"horizontal"}} -->
<div class="wp-block-buttons" style="margin-top:var(--wp--preset--spacing--20)"><!-- wp:button {"style":{"color":{"background":"#ffffff","text":"#764ba2"},"border":{"radius":"30px"}}} -->
<div class="wp-block-button"><a class="wp-block-button__link has-text-color has-background wp-element-button" style="border-radius:30px;color:#764ba2;background-color:#ffffff">Sign Up Free</a></div>
<!-- /wp:button -->

<!-- wp:button {"className":"is-style-outline","style":{"color":{"text":"#ffffff"},"border":{"radius":"30px"}}} -->
<div class="wp-block-button is-style-outline"><a class="wp-block-button__link has-text-color wp-element-button" style="border-radius:30px;color:#ffffff">Learn More</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons --></div>
<!-- /wp:group -->',
		)
	);
} );
