<?php
/**
 * Premium settings tab — placeholder comparison (free) or Pro tools when active.
 *
 * @package Lucrativeit_Subscription_Recurring_Billing
 *
 * @var LUCRSURE_Settings $settings Settings.
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Included template; variables are local to the including scope.

if ( lucrsure_is_pro() ) :
	?>
	<div class="lucrsure-premium-active">
		<div class="lucrsure-info-bar">
			<strong><?php esc_html_e( 'Premium active', 'lucrativeit-subscription-recurring-billing' ); ?></strong>
			<span><?php esc_html_e( 'Configure email branding and PDF invoice settings below.', 'lucrativeit-subscription-recurring-billing' ); ?></span>
		</div>
		<?php
		/**
		 * Fires when Premium is active on the Premium settings tab.
		 *
		 * @param array $all Full settings array.
		 */
		do_action( 'lucrsure_settings_email_branding', $settings->all() );
		do_action( 'lucrsure_settings_pdf_invoice', $settings->all() );
		do_action( 'lucrsure_settings_premium_after', $settings->all() );
		?>
	</div>
	<?php
	return;
endif;
?>

<div class="lucrsure-card lucrsure-form-card lucrsure-premium-placeholder">
	<h2><?php esc_html_e( 'Premium Features', 'lucrativeit-subscription-recurring-billing' ); ?></h2>
	<p class="lucrsure-sub"><?php esc_html_e( 'An overview of what is included in the free plugin and what the Premium add-on unlocks. A detailed comparison page will be added here in a future update.', 'lucrativeit-subscription-recurring-billing' ); ?></p>

	<table class="lucrsure-compare-table">
		<thead>
			<tr>
				<th><?php esc_html_e( 'Feature', 'lucrativeit-subscription-recurring-billing' ); ?></th>
				<th><?php esc_html_e( 'Basic', 'lucrativeit-subscription-recurring-billing' ); ?></th>
				<th><?php esc_html_e( 'Premium', 'lucrativeit-subscription-recurring-billing' ); ?></th>
			</tr>
		</thead>
		<tbody>
			<?php foreach ( lucrsure_premium_comparison_rows() as $row ) : ?>
				<tr>
					<td><?php echo esc_html( $row['label'] ); ?></td>
					<td class="lucrsure-compare-cell">
						<?php echo ! empty( $row['basic'] ) ? '<span class="lucrsure-compare-yes" aria-hidden="true">&#10003;</span>' : '<span class="lucrsure-compare-no" aria-hidden="true">&mdash;</span>'; ?>
					</td>
					<td class="lucrsure-compare-cell">
						<?php echo ! empty( $row['premium'] ) ? '<span class="lucrsure-compare-yes" aria-hidden="true">&#10003;</span>' : '<span class="lucrsure-compare-no" aria-hidden="true">&mdash;</span>'; ?>
					</td>
				</tr>
			<?php endforeach; ?>
		</tbody>
	</table>

	<p class="lucrsure-muted lucrsure-premium-footnote">
		<?php esc_html_e( 'Premium is a separate add-on. Install and activate it to unlock branding, PDF invoices, staff management, advanced reports, and automated reminders.', 'lucrativeit-subscription-recurring-billing' ); ?>
	</p>
</div>
