<?php
/**
 * WeCodeArt Framework
 *
 * WARNING: This file is part of the core WeCodeArt Framework. DO NOT edit this file under any circumstances.
 * Please do all modifications in the form of a child theme.
 *
 * @package		WeCodeArt Framework
 * @subpackage  Gutenberg CSS Frontend
 * @copyright   Copyright (c) 2025, WeCodeArt Framework
 * @since		5.0.0
 * @version		6.6.1
 */

namespace WeCodeArt\Gutenberg\Styles\Blocks;

defined( 'ABSPATH' ) || exit;

use WeCodeArt\Gutenberg\Styles;
use WeCodeArt\Gutenberg\Styles\Processor;
use function WeCodeArt\Functions\get_prop;

/**
 * Block CSS Processor
 */
class Cover extends Processor {
	/**
	 * Parses an output and creates the styles array for it.
	 *
	 * @return 	void
	 */
	protected function process_style(): void {		
		// Block Attributes
		$declarations	= [];

		if ( $value = get_prop( $this->attrs, 'minHeight' ) ) {
			$declarations['min-height'] = $value . get_prop( $this->attrs, 'minHeightUnit', 'px' );
		}
			
		if( ! empty( $declarations ) ) {
			$this->add_declarations( $declarations );
		}

		parent::process_style();
	} 
}