<?php
/**
 * @var $subscription_levels
 * @var $subscr_key
 * @var $valued
 * @var $eligible_for_sub
 * @var $amount_chargeable
 * @var $device
 */

if ( $subscription_levels[$subscr_key][$valued] && ( $subscription_levels[$subscr_key][$valued] > 0 || is_string( $subscription_levels[$subscr_key][$valued] ) ) ) { ?>

	<div class="field">

		<div class="ui checkbox">

			<input class="radio-input" <?php echo $eligible_for_sub; ?> type="radio" name="sub_id" value="<?php echo apply_filters( 'wpj_subscription_radio_value_filter', $valued . '-' . $subscr_key, $subscription_levels, $subscr_key ); ?>" />

			<input type="hidden" class="subscription_chk" name="sub_amt" value="<?php echo $amount_chargeable; ?>">

			<label class="checkbox-wrapper">

				<span class="level-label"><?php echo wpj_translate_string( $valued ); ?></span>

				<!-- for js only -->
				<?php if ( $device == 'mobile' && $amount_chargeable > 0 ) { ?>

					<a class="ui right tag label">

				<?php } ?>

						<span class="level-amount<?php if ( $device == 'pc' || $amount_chargeable <= 0 ) { echo ' dh'; } ?>"><?php echo wpj_show_price( $amount_chargeable ); ?></span>

				<?php if ( $device == 'mobile' ) { ?>

					</a>

				<?php } ?>

			</label>

		</div>

	</div>

<?php }