<?php
/**
 * Phone Mask
 *
 * Phone mask select.
 *
 * @since   7.4
 *
 * @package WPrequal
 */

namespace WPrequal;

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

$options = array(
	'no'                => 'Select One',
	'(999) 999-9999'    => '(999) 999-9999',
	'(99) 9999-9999'    => '(99) 9999-9999',
	'(99[9]) 9999-9999' => '(99[9]) 9999-9999'
); ?>

<tr>
	<th><label><?php esc_html_e( 'Phone Mask', 'wprequal' ); ?></label></th>

	<td>

		<select name="input[<?php echo esc_attr( $input['key'] ); ?>][phone_mask]">
			<?php foreach ( $options as $value => $label ) { ?>
				<?php $selected = ( isset( $input['phone_mask'] ) && $input['phone_mask'] === $value ) ? 'selected' : ''; ?>
				<option value="<?php echo esc_attr( $value ); ?>" <?php echo esc_attr( $selected ); ?>><?php echo esc_html( $label ); ?></option>
			<?php } ?>
		</select>

	</td>

</tr>