<?php
/**
 * Field render
 * @var Form $form
 * @var string $type
 * @var array $item
 * @var string $prefix
 * @var int $item_index
 * @var string $formId
 * @var string $itemId
 * @var string $key
 * @var array $settings
 */

use ElementorPro\Modules\Forms\Widgets\Form;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

$form->remove_render_attribute( 'input' . $item_index, 'type' );
$form->remove_render_attribute( 'input' . $item_index, 'required' );
$form->add_render_attribute(
	'input' . $item_index,
	[
		'class' => 'elementor-use-native ' . $prefix . 'field',
		'value' => esc_attr( $item[ $prefix . 'default_value' ] ),
	]
);
?>
<div
	class="<?php echo esc_attr( $type ); ?>_wrap elementor-repeater-item-<?php echo esc_attr( $itemId ); ?>"
	data-key="<?php echo esc_attr( $key ); ?>"
>
	<input aria-label="" type="color" <?php $form->print_render_attribute_string( 'input' . $item_index ); ?>>
</div>
