<?php
/**
 * Radio
 *
 * Radio input
 *
 * @since   7.4
 *
 * @package WPrequal
 */

namespace WPrequal;

if ( ! defined( 'ABSPATH' ) ) {
	die( 'Access denied!!' );
}

$class = isset( $class ) ? $class : '';?>

<div class="wpq-col <?php echo esc_attr( $class ); ?>">

	<?php view( 'contact/form', 'label', $args ); ?>

	<select
		name="lead[fields][<?php echo esc_attr( $key ); ?>]"
		class="<?php required_class( $required ); ?> select wpq-input"
		aria-label="<?php echo esc_attr( $label ); ?>"
	>

		<?php foreach ( $options as $option ) { ?>

			<?php $selected = isset( $option['checked'] ) ? 'selected' : ''; ?>

			<option value="<?php echo esc_attr( $option['value'] ); ?>" <?php echo esc_attr( $selected ); ?>><?php echo esc_html( $option['option'] ); ?></option>

		<?php } ?>

	</select>

</div>