<?php

defined('_WPBOOKINGPRO_EXEC') or die;
extract($displayData);

if ($validate !== 'color' && in_array($format, array('rgb', 'rgba'), true)) {
	$alpha = ($format === 'rgba');
	$placeholder = $alpha ? 'rgba(0, 0, 0, 0.5)' : 'rgb(0, 0, 0)';
} else {
	$placeholder = '#rrggbb';
}
$inputclass = ($keywords && !in_array($format, array('rgb', 'rgba'), true)) ? ' keywords' : ' ' . $format;
$class = ' class="' . trim('minicolors ' . $class) . ($validate === 'color' ? '' : $inputclass) . '"';
$control = $control ? ' data-control="' . $control . '"' : '';
$format = $format ? ' data-format="' . $format . '"' : '';
$keywords = $keywords ? ' data-keywords="' . $keywords . '"' : '';
$validate = $validate ? ' data-validate="' . $validate . '"' : '';
$disabled = $disabled ? ' disabled' : '';
$readonly = $readonly ? ' readonly' : '';
$hint = strlen($hint) ? ' placeholder="' . $this->escape($hint) . '"' : ' placeholder="' . $placeholder . '"';
$autocomplete = !$autocomplete ? ' autocomplete="off"' : '';

$direction = $lang->isRtl() ? ' dir="ltr" ' : '';

WpBookingPro_Html::_('jquery.framework');
WpBookingPro_Html::_('script', 'system/html5fallback.js',
	array('version' => 'auto', 'relative' => true, 'conditional' => 'lt IE 9'));
WpBookingPro_Html::_('script', 'jui/jquery.minicolors.min.js', array('version' => 'auto', 'relative' => true));
WpBookingPro_Html::_('stylesheet', 'jui/jquery.minicolors.css', array('version' => 'auto', 'relative' => true));
WpBookingPro_Html::_('script', 'system/color-field-adv-init.min.js', array('version' => 'auto', 'relative' => true));
?>
<input type="text" id="<?php esc_html_e($id); ?>" name="<?php esc_html_e($name); ?>"
       value="<?php esc_html_e($this->escape($color)); ?>"<?php
echo("$hint 
		$class 
		$position 
		$control 
		$readonly
		$disabled 
		$required 
		$onchange 
		$autocomplete 
		$autofocus 
		$format 
		$keywords 
		$direction 
		$validate");
?>/>
