<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

$wpefb_pricing_url    = apply_filters( 'wpefb_upgrade_url', 'https://registrationformbuilder.com/pricing/' );
$wpefb_logo_url       = apply_filters( 'wpefb_pro_logo_url', plugin_dir_url( __FILE__ ) . 'images/vedrixa-logo.png' );
$wpefb_module_icons   = array(
	'advanced_workflow'     => 'dashicons-randomize',
	'progressive_forms'     => 'dashicons-controls-repeat',
	'validation_ux'         => 'dashicons-yes-alt',
	'file_upload_controls'  => 'dashicons-upload',
	'email_workflows'       => 'dashicons-email-alt',
	'user_lifecycle'        => 'dashicons-admin-users',
	'submission_management' => 'dashicons-clipboard',
	'templates_styling'     => 'dashicons-art',
	'export_filters'        => 'dashicons-download',
	'priority_support'      => 'dashicons-sos',
);
$wpefb_module_pitches = array(
	'advanced_workflow'     => __( 'Build smarter forms with grouped AND/OR visibility rules, section logic, and advanced conditions.', 'vedrixa-forms-registration-builder' ),
	'progressive_forms'     => __( 'Let users save progress, resume later, and complete long forms with less drop-off.', 'vedrixa-forms-registration-builder' ),
	'validation_ux'         => __( 'Improve completion rates with stronger validation flows and a more guided form experience.', 'vedrixa-forms-registration-builder' ),
	'file_upload_controls'  => __( 'Unlock stronger upload controls for documents, profile media, and richer submission handling.', 'vedrixa-forms-registration-builder' ),
	'email_workflows'       => __( 'Create conditional emails, payment-triggered notifications, and better automation flows.', 'vedrixa-forms-registration-builder' ),
	'user_lifecycle'        => __( 'Add account dashboards, profile editing, password tools, and draft management for users.', 'vedrixa-forms-registration-builder' ),
	'submission_management' => __( 'Manage submissions globally with advanced filters, exports, statuses, payment states, and reports.', 'vedrixa-forms-registration-builder' ),
	'templates_styling'     => __( 'Style forms with presets, template packs, theme context, live preview, and reusable design profiles.', 'vedrixa-forms-registration-builder' ),
	'export_filters'        => __( 'Use deeper exports, analytics, reporting, and privacy-ready filters for real operational workflows.', 'vedrixa-forms-registration-builder' ),
	'priority_support'      => __( 'Get faster help for launch-critical builds, advanced setups, and high-value registration workflows.', 'vedrixa-forms-registration-builder' ),
);
$wpefb_pro_modules    = WPEFB_Features::get_pro_modules();
?>
<div class="advrf-wrapper wrap wef-forms-modern wef-global-modern wef-pro-modern">
	<div class="advrf-page-title">
		<div class="wefb-pro-hero-copy">
			<?php if ( ! empty( $wpefb_logo_url ) ) : ?>
				<img class="wefb-pro-hero-logo" src="<?php echo esc_url( $wpefb_logo_url ); ?>" alt="<?php esc_attr_e( 'Vedrixa Forms Pro', 'vedrixa-forms-registration-builder' ); ?>">
			<?php endif; ?>
			<h1 class="wpefb-page-heading"><?php esc_html_e( 'Vedrixa Forms Pro', 'vedrixa-forms-registration-builder' ); ?></h1>
			<p class="wefb-pro-hero-text"><?php esc_html_e( 'Unlock advanced workflows, payments, styling, reports, automation, and user-account tools built for serious registration and form projects.', 'vedrixa-forms-registration-builder' ); ?></p>
		</div>
		<div class="wefb-pro-hero-actions">
			<a class="button button-primary button-hero" href="<?php echo esc_url( $wpefb_pricing_url ); ?>" target="_blank" rel="noopener noreferrer">
				<?php esc_html_e( 'View Pricing', 'vedrixa-forms-registration-builder' ); ?>
			</a>
			<a class="button button-secondary button-ghost" href="#wefb-pro-features">
				<?php esc_html_e( 'Explore Features', 'vedrixa-forms-registration-builder' ); ?>
			</a>
		</div>
	</div>

	<div class="wefb-pro-banner-card">
		<div class="wefb-pro-banner-copy">
			<span class="wefb-pro-kicker"><?php esc_html_e( 'Built To Convert', 'vedrixa-forms-registration-builder' ); ?></span>
			<h2><?php esc_html_e( 'Sell the upgrade with real operational value', 'vedrixa-forms-registration-builder' ); ?></h2>
			<p><?php esc_html_e( 'Accept payments with PayPal and Stripe, use save & resume, unlock advanced conditional logic, automate actions, and deliver a cleaner user-account experience.', 'vedrixa-forms-registration-builder' ); ?></p>
		</div>
		<a class="wefb-pro-banner-cta" href="<?php echo esc_url( $wpefb_pricing_url ); ?>" target="_blank" rel="noopener noreferrer">
			<span class="dashicons dashicons-cart"></span>
			<span><?php esc_html_e( 'Upgrade To Pro', 'vedrixa-forms-registration-builder' ); ?></span>
		</a>
	</div>

	<div class="wefb-pro-stat-grid">
		<div class="wefb-pro-stat-card">
			<strong><?php echo esc_html( (string) count( $wpefb_pro_modules ) ); ?>+</strong>
			<span><?php esc_html_e( 'Pro modules', 'vedrixa-forms-registration-builder' ); ?></span>
		</div>
		<div class="wefb-pro-stat-card">
			<strong><?php esc_html_e( '3', 'vedrixa-forms-registration-builder' ); ?></strong>
			<span><?php esc_html_e( 'Payment methods in first release', 'vedrixa-forms-registration-builder' ); ?></span>
		</div>
		<div class="wefb-pro-stat-card">
			<strong><?php esc_html_e( 'Advanced', 'vedrixa-forms-registration-builder' ); ?></strong>
			<span><?php esc_html_e( 'Conditional workflows and automations', 'vedrixa-forms-registration-builder' ); ?></span>
		</div>
	</div>

	<div class="advrf-dashboard-section" id="wefb-pro-features">
		<div class="advrf-section-title"><?php esc_html_e( 'What You Unlock In Pro', 'vedrixa-forms-registration-builder' ); ?></div>
		<div class="wefb-pro-module-grid">
			<?php foreach ( $wpefb_pro_modules as $wpefb_module_type => $wpefb_module_label ) : ?>
				<div class="wefb-pro-module-card">
					<div class="wefb-pro-module-icon">
						<span class="dashicons <?php echo esc_attr( isset( $wpefb_module_icons[ $wpefb_module_type ] ) ? $wpefb_module_icons[ $wpefb_module_type ] : 'dashicons-admin-generic' ); ?>"></span>
					</div>
					<h3><?php echo esc_html( $wpefb_module_label ); ?></h3>
					<p><?php echo esc_html( isset( $wpefb_module_pitches[ $wpefb_module_type ] ) ? $wpefb_module_pitches[ $wpefb_module_type ] : __( 'Unlock this premium workflow in Vedrixa Forms Pro.', 'vedrixa-forms-registration-builder' ) ); ?></p>
				</div>
			<?php endforeach; ?>
		</div>
	</div>

	<div class="wefb-pro-highlight-grid">
		<div class="wefb-pro-highlight-card">
			<h3><?php esc_html_e( 'Payments & Revenue', 'vedrixa-forms-registration-builder' ); ?></h3>
			<ul>
				<li><?php esc_html_e( 'Manual, PayPal, and Stripe payment flows', 'vedrixa-forms-registration-builder' ); ?></li>
				<li><?php esc_html_e( 'Refund and partial-refund handling', 'vedrixa-forms-registration-builder' ); ?></li>
				<li><?php esc_html_e( 'Receipts, payment logs, and reporting', 'vedrixa-forms-registration-builder' ); ?></li>
			</ul>
		</div>
		<div class="wefb-pro-highlight-card">
			<h3><?php esc_html_e( 'Better User Experience', 'vedrixa-forms-registration-builder' ); ?></h3>
			<ul>
				<li><?php esc_html_e( 'Save drafts and resume later', 'vedrixa-forms-registration-builder' ); ?></li>
				<li><?php esc_html_e( 'Frontend account dashboard and profile tools', 'vedrixa-forms-registration-builder' ); ?></li>
				<li><?php esc_html_e( 'Templates, styling presets, and reusable profiles', 'vedrixa-forms-registration-builder' ); ?></li>
			</ul>
		</div>
		<div class="wefb-pro-highlight-card">
			<h3><?php esc_html_e( 'Operational Control', 'vedrixa-forms-registration-builder' ); ?></h3>
			<ul>
				<li><?php esc_html_e( 'Advanced conditional logic with grouped AND/OR rules', 'vedrixa-forms-registration-builder' ); ?></li>
				<li><?php esc_html_e( 'Automation, logs, privacy controls, and analytics', 'vedrixa-forms-registration-builder' ); ?></li>
				<li><?php esc_html_e( 'Submission management and export tools', 'vedrixa-forms-registration-builder' ); ?></li>
			</ul>
		</div>
	</div>

	<div class="wefb-pro-footer-cta">
		<div>
			<h2><?php esc_html_e( 'Ready to unlock the full workflow?', 'vedrixa-forms-registration-builder' ); ?></h2>
			<p><?php esc_html_e( 'Upgrade to Vedrixa Forms Pro and turn the free builder into a complete registration, payments, automation, and reporting system.', 'vedrixa-forms-registration-builder' ); ?></p>
		</div>
		<a class="button button-primary button-hero" href="<?php echo esc_url( $wpefb_pricing_url ); ?>" target="_blank" rel="noopener noreferrer">
			<?php esc_html_e( 'Go To Pricing', 'vedrixa-forms-registration-builder' ); ?>
		</a>
	</div>
</div>
