<?php
/**
 * Theme patterns
 *
 * @package Kenta Breeze
 */

if ( ! function_exists( 'kenta_breeze_block_patterns_init' ) ) {
	/**
	 * Init block patterns
	 */
	function kenta_breeze_block_patterns_init() {
		// register custom pattern category
		if ( function_exists( 'register_block_pattern_category' ) ) {
			register_block_pattern_category( 'kenta-breeze', array(
				'label' => __( 'Kenta Breeze', 'kenta-breeze' )
			) );
		}

		// register custom patterns
		if ( function_exists( 'register_block_pattern' ) ) {
			register_block_pattern(
				'kenta-breeze/hero',
				array(
					'title'      => __( 'Big Hero', 'kenta-breeze' ),
					'content'    => kenta_breeze_pattern_markup( 'hero' ),
					'categories' => array( 'kenta-breeze', 'featured', 'header', 'banner' )
				)
			);

			register_block_pattern(
				'kenta-breeze/full-width-text-media',
				array(
					'title'      => __( 'Full Width Text-Media', 'kenta-breeze' ),
					'content'    => kenta_breeze_pattern_markup( 'full-width-text-media' ),
					'categories' => array( 'kenta-breeze', 'featured', 'columns', 'call-to-action' )
				)
			);

			register_block_pattern(
				'kenta-breeze/full-width-media-text',
				array(
					'title'      => __( 'Full Width Media-Text', 'kenta-breeze' ),
					'content'    => kenta_breeze_pattern_markup( 'full-width-media-text' ),
					'categories' => array( 'kenta-breeze', 'featured', 'columns', 'call-to-action' )
				)
			);

			register_block_pattern(
				'kenta-breeze/recent-works',
				array(
					'title'      => __( 'Recent Works', 'kenta-breeze' ),
					'content'    => kenta_breeze_pattern_markup( 'recent-works' ),
					'categories' => array( 'kenta-breeze', 'featured', 'columns' )
				)
			);

			register_block_pattern(
				'kenta-breeze/introduce',
				array(
					'title'      => __( 'Introduce', 'kenta-breeze' ),
					'content'    => kenta_breeze_pattern_markup( 'introduce' ),
					'categories' => array( 'kenta-breeze', 'featured', 'columns', 'text' )
				)
			);

			register_block_pattern(
				'kenta-breeze/reviews',
				array(
					'title'      => __( 'Reviews', 'kenta-breeze' ),
					'content'    => kenta_breeze_pattern_markup( 'reviews' ),
					'categories' => array( 'kenta-breeze', 'featured', 'columns', 'text' )
				)
			);

			register_block_pattern(
				'kenta-breeze/frequent-asked-questions',
				array(
					'title'      => __( 'Frequent Asked Questions', 'kenta-breeze' ),
					'content'    => kenta_breeze_pattern_markup( 'frequent-asked-questions' ),
					'categories' => array( 'kenta-breeze', 'featured', 'text' )
				)
			);

			register_block_pattern(
				'kenta-breeze/contact-me',
				array(
					'title'      => __( 'Contact Me', 'kenta-breeze' ),
					'content'    => kenta_breeze_pattern_markup( 'contact-me' ),
					'categories' => array( 'kenta-breeze', 'featured', 'text', 'columns' )
				)
			);
		}
	}
}
add_action( 'init', 'kenta_breeze_block_patterns_init' );
