<?php
/**
 * Floating donation prompt on the Dashboard screen (shown on every visit).
 *
 * @package SuiteMkt3k
 */
defined( 'ABSPATH' ) || exit;
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound

$donate_url   = 'https://www.paypal.com/donate/?hosted_button_id=AKMXXA2THYD4N';
$img_base_url = trailingslashit( SUITEMKT3K_URL . 'assets/frontend/img' );
$btn_img_url  = $img_base_url . 'btn_donateCC_LG.gif';
$qr_img_url   = $img_base_url . 'qrcode.png';
?>
<div id="wmk-donation-popup" class="wmk-donation-popup" role="dialog" aria-labelledby="wmk-donation-popup-title" aria-live="polite" hidden>
	<button type="button" class="wmk-donation-close" aria-label="<?php esc_attr_e( 'Close', 'suitemkt3k' ); ?>">&times;</button>
	<div class="wmk-donation-content">
		<p id="wmk-donation-popup-title" class="wmk-donation-title"><?php esc_html_e( '💙 Is this plugin useful to you?', 'suitemkt3k' ); ?></p>
		<p class="wmk-donation-text"><?php esc_html_e( 'SuiteMkt3k is 100% free, with no licenses — built to help your WooCommerce store with coupons, newsletters and cart recovery.', 'suitemkt3k' ); ?></p>
		<p class="wmk-donation-text"><?php esc_html_e( 'If it saves you time or work, a small tip of €5, €10 or €25 helps us keep improving it and create more free WordPress plugins.', 'suitemkt3k' ); ?></p>
		<p class="wmk-donation-text"><strong><?php esc_html_e( '👉 Support the developer and make new improvements possible', 'suitemkt3k' ); ?></strong></p>
		<div class="wmk-donation-qr">
			<a href="<?php echo esc_url( $donate_url ); ?>" target="_blank" rel="noopener noreferrer" class="wmk-donation-qr-link">
				<img class="wmk-donation-qrcode" src="<?php echo esc_url( $qr_img_url ); ?>" width="160" height="160" alt="<?php esc_attr_e( 'Donation QR code', 'suitemkt3k' ); ?>">
			</a>
			<form action="https://www.paypal.com/donate" method="post" target="_blank" rel="noopener noreferrer">
				<input type="hidden" name="hosted_button_id" value="AKMXXA2THYD4N">
				<button type="submit" class="wmk-donation-paypal-btn">
					<img src="<?php echo esc_url( $btn_img_url ); ?>" width="122" height="47" alt="<?php esc_attr_e( 'Donate with PayPal', 'suitemkt3k' ); ?>">
				</button>
			</form>
		</div>
		<p class="wmk-donation-thanks"><?php esc_html_e( 'Thank you for being part of the project! 🙌', 'suitemkt3k' ); ?></p>
	</div>
</div>
