<?php
/**
 * Read-only breakpoint list with a Pro upsell (shown when Pro is not active).
 *
 * @package CraftAddonsForWPBakery
 *
 * @var array  $cafw_breakpoints Active (default) breakpoints.
 * @var string $cafw_upgrade_url Pro upgrade URL (may be empty).
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<div class="cafw-bp-editor is-locked">
	<div class="cafw-bp-row cafw-bp-row--head">
		<span class="cafw-bp-cell" data-col="label"><?php esc_html_e( 'Name', 'craft-addons-for-wpbakery' ); ?></span>
		<span class="cafw-bp-cell" data-col="min"><?php esc_html_e( 'Min (px)', 'craft-addons-for-wpbakery' ); ?></span>
		<span class="cafw-bp-cell" data-col="max"><?php esc_html_e( 'Max (px)', 'craft-addons-for-wpbakery' ); ?></span>
	</div>

	<div class="cafw-bp-rows">
		<?php foreach ( $cafw_breakpoints as $cafw_bp ) : ?>
			<div class="cafw-bp-row cafw-bp-row--readonly">
				<span class="cafw-bp-cell" data-col="label"><?php echo esc_html( $cafw_bp['label'] ); ?></span>
				<span class="cafw-bp-cell" data-col="min"><?php echo $cafw_bp['min'] > 0 ? esc_html( (string) $cafw_bp['min'] ) : '&mdash;'; ?></span>
				<span class="cafw-bp-cell" data-col="max"><?php echo $cafw_bp['max'] > 0 ? esc_html( (string) $cafw_bp['max'] ) : '&infin;'; ?></span>
			</div>
		<?php endforeach; ?>
	</div>

	<div class="cafw-bp-upsell">
		<span class="dashicons dashicons-lock"></span>
		<div class="cafw-bp-upsell__text">
			<strong><?php esc_html_e( 'Add and customize breakpoints with Pro', 'craft-addons-for-wpbakery' ); ?></strong>
			<span><?php esc_html_e( 'The free version includes the Desktop, Tablet and Mobile breakpoints. Upgrade to add your own and change these ranges.', 'craft-addons-for-wpbakery' ); ?></span>
		</div>
		<?php if ( '' !== $cafw_upgrade_url ) : ?>
			<a class="button button-primary" href="<?php echo esc_url( $cafw_upgrade_url ); ?>"><?php esc_html_e( 'Unlock with Pro', 'craft-addons-for-wpbakery' ); ?></a>
		<?php endif; ?>
	</div>
</div>
