<?php
/**
 * Free admin dashboard.
 *
 * @package DreamFast_CF
 *
 * @var array<string, mixed> $settings
 */

namespace DreamFast\CommerceFloat;

defined( 'ABSPATH' ) || exit;
?>
<div class="wrap df-sf-admin">
	<h1><?php esc_html_e( 'DreamFast Commerce Float', 'dreamfast-commerce-float' ); ?></h1>
	<p class="description"><?php esc_html_e( 'Manage your floating WooCommerce conversion widgets from one place.', 'dreamfast-commerce-float' ); ?></p>

	<div class="df-sf-dashboard-hero">
		<div>
			<span class="df-sf-status"><?php esc_html_e( 'Free', 'dreamfast-commerce-float' ); ?></span>
			<h2><?php esc_html_e( 'Your conversion widgets are ready', 'dreamfast-commerce-float' ); ?></h2>
			<p><?php esc_html_e( 'Configure the sticky cart and the contact button, then test them on a product page.', 'dreamfast-commerce-float' ); ?></p>
		</div>
		<div class="df-sf-dashboard-actions">
			<a class="button button-primary" href="<?php echo esc_url( admin_url( 'admin.php?page=' . Settings::MENU_SLUG . '-cart' ) ); ?>">
				<?php esc_html_e( 'Edit Sticky Cart', 'dreamfast-commerce-float' ); ?>
			</a>
			<a class="button" href="<?php echo esc_url( admin_url( 'admin.php?page=' . Settings::CONTACT_MENU_SLUG ) ); ?>">
				<?php esc_html_e( 'Edit Contact Widget', 'dreamfast-commerce-float' ); ?>
			</a>
		</div>
	</div>

	<div class="df-sf-dashboard-grid">
		<div class="df-sf-dashboard-card">
			<h2><?php esc_html_e( 'Sticky Cart Bar', 'dreamfast-commerce-float' ); ?></h2>
			<p><?php echo ! empty( $settings['cart_enabled'] ) ? esc_html__( 'Enabled', 'dreamfast-commerce-float' ) : esc_html__( 'Disabled', 'dreamfast-commerce-float' ); ?></p>
			<a href="<?php echo esc_url( admin_url( 'admin.php?page=' . Settings::MENU_SLUG . '-cart' ) ); ?>"><?php esc_html_e( 'Open settings', 'dreamfast-commerce-float' ); ?></a>
		</div>
		<div class="df-sf-dashboard-card">
			<h2><?php esc_html_e( 'Contact Button', 'dreamfast-commerce-float' ); ?></h2>
			<p><?php echo ! empty( $settings['contact_enabled'] ) ? esc_html__( 'Enabled', 'dreamfast-commerce-float' ) : esc_html__( 'Disabled', 'dreamfast-commerce-float' ); ?></p>
			<a href="<?php echo esc_url( admin_url( 'admin.php?page=' . Settings::CONTACT_MENU_SLUG ) ); ?>"><?php esc_html_e( 'Open settings', 'dreamfast-commerce-float' ); ?></a>
		</div>
		<div class="df-sf-dashboard-card">
			<h2><?php esc_html_e( 'DreamFast Commerce Float Pro', 'dreamfast-commerce-float' ); ?></h2>
			<p><?php esc_html_e( 'Add coupons, extra contact channels, display rules, and click analytics.', 'dreamfast-commerce-float' ); ?></p>
			<a href="<?php echo esc_url( Features::get_upgrade_url() ); ?>" target="_blank" rel="noopener noreferrer"><?php esc_html_e( 'Compare plans', 'dreamfast-commerce-float' ); ?></a>
		</div>
		<div class="df-sf-dashboard-card">
			<h2><?php esc_html_e( 'Changelog', 'dreamfast-commerce-float' ); ?></h2>
			<p><?php esc_html_e( 'Review recent plugin changes and release notes.', 'dreamfast-commerce-float' ); ?></p>
			<a href="<?php echo esc_url( admin_url( 'admin.php?page=' . Settings::MENU_SLUG . '-changelog' ) ); ?>"><?php esc_html_e( 'View changelog', 'dreamfast-commerce-float' ); ?></a>
		</div>
	</div>
</div>
