<?php
/**
 * Block pattern setup file.
 *
 * @package    Zooey
 * @copyright  WebMan Design, Oliver Juhas
 *
 * @since    1.0.0
 * @version  2.0.6
 */

namespace WebManDesign\Zooey\Content;

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

// Add block pattern setup args.
Block_Pattern::add_pattern_args( __FILE__, array(
	'title'    => _x( 'Columns of features with large letters instead of icons', 'Block pattern title.', 'zooey' ),
	'keywords' => array(
		esc_html_x( 'call to action', 'keyword', 'zooey' ),
		esc_html_x( 'buttons', 'keyword', 'zooey' ),
	),
) );

// Block pattern content:

ob_start(); ?>

	<!-- wp:column {"width":"33.33%","style":{"spacing":{"blockGap":"var:preset|spacing|s"}}} -->
	<div class="wp-block-column" style="flex-basis:33.33%">

		<!-- wp:paragraph {"style":{"typography":{"lineHeight":"1","fontStyle":"normal","fontWeight":"700"},"elements":{"link":{"color":{"text":"var:preset|color|secondary"}}}},"fontSize":"mega"} -->
		<p class="has-link-color has-mega-font-size" style="font-style:normal;font-weight:700;line-height:1">[LETTER]</p>
		<!-- /wp:paragraph -->

		<!-- wp:heading {"level":3,"style":{"typography":{"textTransform":"uppercase"},"spacing":{"margin":{"top":"var:preset|spacing|s"}}},"fontSize":"m"} -->
		<h3 class="wp-block-heading has-m-font-size" style="margin-top:var(--wp--preset--spacing--s);text-transform:uppercase"><?php Demo::The_text( 'title/s' ); ?></h2>
		<!-- /wp:heading -->

		<!-- wp:paragraph {"style":{"typography":{"lineHeight":1.4}},"fontSize":"l"} -->
		<p class="has-l-font-size" style="line-height:1.4"><?php Demo::The_text( '75' ); ?></p>
		<!-- /wp:paragraph -->

		<!-- wp:paragraph {"style":{"spacing":{"margin":{"top":"0"}},"typography":{"textDecoration":"none"}},"fontSize":"big"} -->
		<p class="has-big-font-size" style="margin-top:0;text-decoration:none"><a href="#0"><span class="screen-reader-text"><?php Demo::The_text( 'change' ); ?> </span><span aria-hidden="true" class="is-aria-hidden">→</span></a></p>
		<!-- /wp:paragraph -->

	</div>
	<!-- /wp:column -->

<?php $item = ob_get_clean(); ?>

<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"var:preset|spacing|content","bottom":"var:preset|spacing|content"},"margin":{"top":"0"},"blockGap":{"top":"var:preset|spacing|l","left":"var:preset|spacing|l"}}},"backgroundColor":"base-alt","layout":{"type":"constrained"}} -->
<div class="wp-block-group alignfull has-base-alt-background-color has-background" style="margin-top:0;padding-top:var(--wp--preset--spacing--content);padding-bottom:var(--wp--preset--spacing--content)">

	<!-- wp:columns {"align":"wide","style":{"spacing":{"blockGap":{"top":"var:preset|spacing|l","left":"var:preset|spacing|l"}}}} -->
	<div class="wp-block-columns alignwide">

		<!-- wp:column {"width":"33.33%","style":{"spacing":{"padding":{"top":"var:preset|spacing|l","bottom":"var:preset|spacing|l","left":"var:preset|spacing|l","right":"var:preset|spacing|l"}},"border":{"radius":"var:preset|border-radius|s"}},"backgroundColor":"primary"} -->
		<div class="wp-block-column has-primary-background-color has-background" style="border-radius:var(--wp--preset--border-radius--s);padding-top:var(--wp--preset--spacing--l);padding-right:var(--wp--preset--spacing--l);padding-bottom:var(--wp--preset--spacing--l);padding-left:var(--wp--preset--spacing--l);flex-basis:33.33%">

			<!-- wp:heading -->
			<h2 class="wp-block-heading"><?php Demo::The_text( 'title/xs' ); ?></h2>
			<!-- /wp:heading -->

			<!-- wp:paragraph {"fontSize":"s"} -->
			<p class="has-s-font-size"><?php Demo::The_text( '120' ); ?></p>
			<!-- /wp:paragraph -->

		</div>
		<!-- /wp:column -->

		<?php

		foreach ( array( 'A', 'B' ) as $letter ) :
			echo str_replace( '[LETTER]', $letter, $item );
		endforeach;

		?>

	</div>
	<!-- /wp:columns -->

	<!-- wp:columns {"align":"wide","style":{"spacing":{"blockGap":{"top":"var:preset|spacing|l","left":"var:preset|spacing|l"}}}} -->
	<div class="wp-block-columns alignwide">

		<?php

		foreach ( array( 'C', 'D', 'E' ) as $letter ) :
			echo str_replace( '[LETTER]', $letter, $item );
		endforeach;

		?>

	</div>
	<!-- /wp:columns -->

</div>
<!-- /wp:group -->
