<?php
/**
 * Contact info
 *
 * Contact Info Meta Box
 *
 * @since   7.0
 *
 * @package WPrequal
 */

namespace WPrequal;

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

<div class="lead-fields">

	<table class="form-table">

		<tbody>

			<?php foreach ( $values as $key => $value ) { ?>

				<?php $value = empty( $value )        ? ''        : $value; ?>
				<?php $label = empty( $labels[$key] ) ? 'Unknown' : $labels[$key]; ?>

				<tr>

					<th>
						<label for=""><?php echo esc_html( $label ); ?></label>
					</th>

					<td>

						<?php if ( Core::status( 1 ) ) { ?>

							<input
								type="text"
								name="fields[<?php echo esc_attr( $key ); ?>]"
								id="<?php echo esc_attr( $key ); ?>"
								value="<?php echo esc_attr( $value ); ?>"
								class="regular-text"
							>

					<?php } else {

							view( 'buttons', 'go-premium' );

					}  ?>

					</td>

				</tr>

			<?php } ?>

		</tbody>

	</table>

</div>