<?php
/**
 * The template for displaying mysterx win modal
 * This template can be overridden by copying it to yourtheme/woocommerce/modals/mysterx-win-modal.php.
 *
 * @package MysterX/Templates
 */

defined( 'ABSPATH' ) || exit;
$options = get_option( 'mysterx_options', array() );
?>
<div id="crate-result-modal" class="hidden" role="dialog" aria-modal="true">
	<div class="modal-inner">
		<h2 id="crate-result-title"><?php echo esc_html__( 'You got:', 'mysterx-mystery-boxes-for-woocommerce' ); ?></h2>
		<div id="crate-result-item"></div>
		<div id="crate-result-meta">
		</div>
		<?php if ( $options['enable_claim'] ?? 'no' === '1' ) : ?>
			<button id="crate-claim-link" onclick="location.href='<?php echo esc_url( get_permalink( $options['claim_page_id'] ?? 0 ) ); ?>'" data-claim-url="<?php echo esc_url( get_permalink( $options['claim_page_id'] ?? 0 ) ); ?>"><?php echo esc_html__( 'Claim Your Prize', 'mysterx-mystery-boxes-for-woocommerce' ); ?></button>
		<?php endif; ?>
		<button id="crate-close-btn"><?php echo esc_html__( 'Close', 'mysterx-mystery-boxes-for-woocommerce' ); ?></button>
	</div>
</div>
