<?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\Blocks
 * @copyright   Copyright (c) 2025, WeCodeArt Framework
 * @since		6.2.8
 * @version		6.2.8
 */

namespace WeCodeArt\Gutenberg\Blocks\Text\Lists;

defined( 'ABSPATH' ) || exit;

use WeCodeArt\Singleton;
use WeCodeArt\Gutenberg\Blocks\Dynamic;
use function WeCodeArt\Functions\get_prop;

/**
 * Gutenberg List Item block.
 */
class Item extends Dynamic {

	use Singleton;

	/**
	 * Block namespace.
	 *
	 * @var string
	 */
	protected $namespace = 'core';

	/**
	 * Block name.
	 *
	 * @var string
	 */
	protected $block_name = 'list-item';

	/**
	 * Block args.
	 *
	 * @param	array $current	Existing register args
	 *
	 * @return 	array
	 */
	public function block_type_args( array $current ): array {
		$supports 	= get_prop( $current, [ 'supports' ], [] );

		return [
			'supports'		=> wp_parse_args( [
				'color'	=> [
					'text'       => true,
					'background' => true,
					'link'       => true,
					'gradient'   => true,
				],
				'spacing'	=> [
					'padding' => true,
					'margin'  => true,
				],
				'__experimentalBorder' => [
					'radius'                        => true,
					'width'                         => true,
					'color'                         => true,
					'style'                         => true,
					'__experimentalDefaultControls' => [
						'width' => true,
						'color' => true,
					],
				]
			], $supports )
		];
	}
}
