<?php
/**
 * Block styles.
 *
 * @package optimize
 * @since 1.0.0
 */

/**
 * Register block styles
 *
 * @since 1.0.0
 *
 * @return void
 */
function optimize_register_block_styles() {

	register_block_style(
		'core/template-part',
		array(
			'name'         => 'optimize-template-styleone',
			'label'        => __( 'Sticky', 'optimize' ),'inline_style' => '.is-style-optimize-template-styleone {
					    position: sticky;
   						 z-index: 10;
				}',
		)
	);

	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/button',
		array(
			'name'  => 'optimize-flat-button',
			'label' => __( 'Flat button', 'optimize' ),
		)
	);
	register_block_style(
		'core/button',
		array(
			'name'         => 'optimize-button-styleround',
			'label'        => __( 'Round Button', 'optimize' ),
		)
	);
	register_block_style(
		'core/button',
		array(
			'name'         => 'optimize-button-styleone',
			'label'        => __( 'Style 1', 'optimize' ),
			'inline_style' => '.is-style-optimize-button-styleone {
					border: none;
					text-align: center;
					outline: none;
					overflow: hidden;
					position: relative;
					box-shadow: 0 5px 15px rgba(0,0,0,0.20);
				}',
		)
	);
	register_block_style(
		'core/button',
		array(
			'name'         => 'optimize-button-styletwo',
			'label'        => __( 'Style 2', 'optimize' ),
		)
	);
	
	register_block_style(
		'core/button',
		array(
			'name'         => 'optimize-button-stylethree',
			'label'        => __( 'Style 3', 'optimize' ),
		)
	);
	
	register_block_style(
		'core/button',
		array(
			'name'         => 'optimize-button-styleten',
			'label'        => __( 'Style Jelly', 'optimize' ),
		)
	);
	
	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/list',
		array(
			'name'  => 'optimize-list-underline',
			'label' => __( 'Underlined list items', 'optimize' ),
		)
	);
	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/list',
		array(
			'name'  => 'optimize-list-plane',
			'label' => __( 'Plane list items', 'optimize' ),
			'is_default'   => false,
		)
	);
	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/list',
		array(
			'name'  => 'optimize-list-left-border',
			'label' => __( 'Left Border list items', 'optimize' ),
			'is_default'   => false,
		)
	);
	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/list',
		array(
			'name'  => 'optimize-list-check',
			'label' => __( 'Check icon list items', 'optimize' ),
			'is_default'   => false,
		)
	);
	register_block_style( 
		'core/heading', 
		array(
			'name'         => 'optimize-title-underline', // Unique slug for your custom style
			'label'        => __( 'Underlined Title', 'optimize' ), // Display name of the style in the block editor
			'inline_style' => '.is-style-optimize-title-underline {					
					border-bottom: 2px solid #ccc;
				}',
		)
	);
	register_block_style( 
		'core/heading', 
		array(
			'name'         => 'optimize-title-gradient',
			'label'        => __( 'Gradient Title', 'optimize' ), 
			
		)
	);

		register_block_style(
			'core/post-title',
			array(
				'name'         => 'optimize-title-styleone',
				'label'        => __( 'Style 1', 'optimize' ),
				'inline_style' => '.is-style-optimize-title-styleone {
						background: #4CAF50;
						box-shadow: 2px 3px 1px 2px #333;
					}',
			)
		);



	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/image',
		array(
			'name'  => 'optimize-image-styleone',
			'label' => __( '3d Effect', 'optimize' ),
		)
	);
	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/image',
		array(
			'name'  => 'optimize-image-styletwo',
			'label' => __( 'Golden Shadow', 'optimize' ),
		)
	);
	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/gallery',
		array(
			'name'  => 'optimize-gallery-styleone',
			'label' => __( 'Style 1', 'optimize' ),
		)
	);
	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/gallery',
		array(
			'name'  => 'optimize-gallery-styletwo',
			'label' => __( 'Style 2', 'optimize' ),
		)
	);
	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/group',
		array(
			'name'  => 'optimize-box-shadow',
			'label' => __( 'Box shadow', 'optimize' ),
		)
	);
	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/group',
		array(
			'name'  => 'optimize-box-shadowone',
			'label' => __( 'Shadow 1', 'optimize' ),
		)
	);
	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/group',
		array(
			'name'  => 'optimize-box-shadowtwo',
			'label' => __( 'Shadow 2', 'optimize' ),
		)
	);
	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/group',
		array(
			'name'  => 'optimize-box-shadowthree',
			'label' => __( 'Shadow 3', 'optimize' ),
		)
	);
	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/group',
		array(
			'name'  => 'optimize-box-shadowfour',
			'label' => __( 'Shadow 4', 'optimize' ),
		)
	);
	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/group',
		array(
			'name'  => 'optimize-box-shadowfive',
			'label' => __( 'Shadow 5', 'optimize' ),
		)
	);
	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/group',
		array(
			'name'  => 'optimize-box-shadowsix',
			'label' => __( 'Shadow 6', 'optimize' ),
		)
	);
	

	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/column',
		array(
			'name'  => 'optimize-box-shadow',
			'label' => __( 'Box shadow', 'optimize' ),
		)
	);
	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/column',
		array(
			'name'  => 'optimize-box-shadowone',
			'label' => __( 'Shadow 1', 'optimize' ),
		)
	);
	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/column',
		array(
			'name'  => 'optimize-box-shadowtwo',
			'label' => __( 'Shadow 2', 'optimize' ),
		)
	);
	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/column',
		array(
			'name'  => 'optimize-box-shadowthree',
			'label' => __( 'Shadow 3', 'optimize' ),
		)
	);
	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/column',
		array(
			'name'  => 'optimize-box-shadowfour',
			'label' => __( 'Shadow 4', 'optimize' ),
		)
	);
	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/column',
		array(
			'name'  => 'optimize-box-shadowfive',
			'label' => __( 'Shadow 5', 'optimize' ),
		)
	);
	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/column',
		array(
			'name'  => 'optimize-box-shadowsix',
			'label' => __( 'Shadow 6', 'optimize' ),
		)
	);
	

	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/columns',
		array(
			'name'  => 'optimize-box-shadow',
			'label' => __( 'Box shadow', 'optimize' ),
		)
	);
	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/columns',
		array(
			'name'  => 'optimize-box-shadowone',
			'label' => __( 'Shadow 1', 'optimize' ),
		)
	);
	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/columns',
		array(
			'name'  => 'optimize-box-shadowtwo',
			'label' => __( 'Shadow 2', 'optimize' ),
		)
	);
	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/columns',
		array(
			'name'  => 'optimize-box-shadowthree',
			'label' => __( 'Shadow 3', 'optimize' ),
		)
	);
	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/columns',
		array(
			'name'  => 'optimize-box-shadowfour',
			'label' => __( 'Shadow 4', 'optimize' ),
		)
	);
	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/columns',
		array(
			'name'  => 'optimize-box-shadowfive',
			'label' => __( 'Shadow 5', 'optimize' ),
		)
	);
	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/columns',
		array(
			'name'  => 'optimize-box-shadowsix',
			'label' => __( 'Shadow 6', 'optimize' ),
		)
	);
	

	register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style
		'core/details',
		array(
			'name'  => 'optimize-plus',
			'label' => __( 'Plus & minus', 'optimize' ),
		)
	);
}
add_action( 'init', 'optimize_register_block_styles' );

/**
 * This is an example of how to unregister a core block style.
 *
 * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-styles/
 * @see https://github.com/WordPress/gutenberg/pull/37580
 *
 * @since 1.0.0
 *
 * @return void
 */
function optimize_unregister_block_style() {
	wp_enqueue_script(
		'optimize-unregister',
		get_stylesheet_directory_uri() . '/assets/js/unregister.js',
		array( 'wp-blocks', 'wp-dom-ready', 'wp-edit-post' ),
		GRABBER_VERSION,
		true
	);
}
add_action( 'enqueue_block_editor_assets', 'optimize_unregister_block_style' );
