<?php
/**
 * Admin Recommendations Page Template
 *
 * @package Askany
 * @since 1.0.0
 */

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

$recommendations = [
	[
		'name' => 'Activity Guard – Complete Security, Activity Log & WooCommerce Analytics Tracker',
		'slug' => 'notifier-to-slack',
		'url' => 'https://wordpress.org/plugins/notifier-to-slack/',
		'category' => 'Security & Analytics',
		'description' => 'Activity Guard is a powerful all-in-one WordPress Activity Log, WooCommerce Events, and Security Plugin designed to track every activity happening on your WordPress website.',
		'features' => [
			'Complete WordPress activity logging',
			'WooCommerce events tracking',
			'Real-time security monitoring',
			'Slack, Telegram & Email notifications'
		],
		'icon' => 'https://ps.w.org/notifier-to-slack/assets/icon.svg?rev=3388086'
	],
	[
		'name' => 'Booster for WooCommerce Management, Super Bulk Edit & Analytics Dashboard – Shop Explorer',
		'slug' => 'shop-explorer',
		'url' => 'https://wordpress.org/plugins/shop-explorer/',
		'category' => 'WooCommerce Management',
		'description' => 'Shop Explorer is an all in one WooCommerce management tool designed to make running your online store faster and easier.',
		'features' => [
			'Bulk product management',
			'Lightning-fast dashboard',
			'Order & customer management',
			'Product variations editor'
		],
		'icon' => 'https://ps.w.org/shop-explorer/assets/icon.svg?rev=3388086'
	],
	[
		'name' => 'Product List, Product Showcase, and Product Flip Layout for WooCommerce – Product Display',
		'slug' => 'product-display',
		'url' => 'https://wordpress.org/plugins/product-display/',
		'category' => 'WooCommerce Display',
		'description' => 'Product Display for WooCommerce is the most comprehensive and powerful WooCommerce product display plugin that transforms how you showcase products.',
		'features' => [
			'Beautiful product grids & sliders',
			'Interactive product tables',
			'Stunning product galleries',
			'No coding required'
		],
		'icon' => 'https://ps.w.org/product-display/assets/icon-128x128.png?rev=3390638'
	],
    
	[
		'name' => 'Post Export Import with Media',
		'slug' => 'post-export-import-with-media',
		'url' => 'https://wordpress.org/plugins/post-export-import-with-media/',
		'category' => 'Content Management',
		'description' => 'Post Export Import with Media is a simple yet powerful WordPress plugin that helps you securely transfer posts, pages, media between WordPress sites.',
		'features' => [
			'Complete content migration',
			'Media files included',
			'Batch processing',
			'Professional-grade reliability'
		],
		'icon' => 'https://ps.w.org/post-export-import-with-media/assets/icon-128x128.png?rev=3445969'
	],
	[
		'name' => 'Form Builder, Survey and Quiz Creator with Leads Redirect System – SimpleForm',
		'slug' => 'simple-form',
		'url' => 'https://wordpress.org/plugins/simple-form/',
		'category' => 'Forms & Surveys',
		'description' => 'Simple Form is a modern and flexible WordPress Form Builder Plugin that allows you to easily create Contact Forms, Quizzes, Polls & Surveys.',
		'features' => [
			'Drag-and-drop form builder',
			'Contact & registration forms',
			'Quizzes & surveys',
			'Leads redirect system'
		],
		'icon' => 'https://ps.w.org/simple-form/assets/icon-128x128.png?rev=3399184'
	]
];
?>

<div class="wrap">
	<h1><?php esc_html_e( 'Recommended Plugins', 'askany' ); ?></h1>
	
	<div class="askany-admin-container">
		<div class="askany-recommendations-grid">
			<?php foreach ( $recommendations as $plugin ) : ?>
			<div class="askany-admin-section recommendation-card">
				<div class="askany-section-header">
					<img src="<?php echo esc_url( $plugin['icon'] ); ?>" 
						 alt="<?php echo esc_attr( $plugin['name'] ); ?>" 
						 class="plugin-icon" />
					<div class="plugin-info">
						<h3><?php echo esc_html( $plugin['name'] ); ?></h3>
						<span class="plugin-category"><?php echo esc_html( $plugin['category'] ); ?></span>
					</div>
				</div>
				
				<p class="plugin-description">
					<?php echo esc_html( $plugin['description'] ); ?>
				</p>
				
				<div class="plugin-features">
					<strong><?php esc_html_e( 'Key Features:', 'askany' ); ?></strong>
					<ul>
						<?php foreach ( $plugin['features'] as $feature ) : ?>
						<li><?php echo esc_html( $feature ); ?></li>
						<?php endforeach; ?>
					</ul>
				</div>
				
				<div class="plugin-actions">
					<a href="<?php echo esc_url( admin_url( 'plugin-install.php?s=wpazleen&tab=search&type=term' ) ); ?>" 
					   target="_blank"
					   class="button button-primary">
						<?php esc_html_e( 'Install Plugin', 'askany' ); ?>
					</a>
				</div>
			</div>
			<?php endforeach; ?>
		</div>
	</div>
</div>