<?php

// ENQUEUE STYLESHEETS
function blockster_styles() {

	wp_enqueue_style( 'blockster-styles', get_theme_file_uri( '/style.css' ), array(), wp_get_theme( 'blockster' )->get( 'Version' ) );

}
add_action( 'wp_enqueue_scripts', 'blockster_styles' );


// ADD EDITOR STYLES
function blockster_editor_styles() {

	add_editor_style( get_theme_file_uri( '/style.css' ) );

}
add_action( 'admin_init', 'blockster_editor_styles' );


// REGISTER BLOCK PATTERNS
function blockster_block_patterns() {
	register_block_pattern_category(
    	'blockster-patterns',
	    array( 
	    	'label' => __( 'BLOCKSTER', 'blockster' )
	    )
	);
}
add_action( 'init', 'blockster_block_patterns' );


// REGISTER BLOCK STYLES
function blockster_register_block_styles() {
	wp_register_style('blockster-block-styles', get_theme_file_uri( '/style.css' ), false);
	register_block_style(
		'core/group',
		array(
			'name' => 'shadow-light',
			'label' => __('Shadow (Light)', 'blockster')
		)
	);
	register_block_style(
		'core/group',
		array(
			'name' => 'three-col-per-row-max',
			'label' => __('Grid 3', 'blockster')
		)
	);
	register_block_style(
		'core/group',
		array(
			'name' => 'four-col-per-row-max',
			'label' => __('Grid 4', 'blockster')
		)
	);
	register_block_style(
		'core/image',
		array(
			'name' => 'shadow-light',
			'label' => __('Shadow (Light)', 'blockster')
		)
	);
	register_block_style(
		'core/site-logo',
		array(
			'name' => 'splat',
			'label' => __('Splat', 'blockster')
		)
	);
}
add_action( 'init', 'blockster_register_block_styles' );