<?php
/**
 * My Account — the warranty asked for is not this customer's.
 *
 * One message for "there is no such warranty" and "that one is not yours".
 * Telling them apart would let anyone edit the number in the address bar and
 * learn which records exist, which is a slow way of counting somebody else's
 * warranties.
 *
 * @package WarrantyCart
 * @version 1.0.0
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template variables are local scope and don't need prefixing

$list_url = $args['list_url'] ?? '';
?>

<div class="warranty-cart-account">
	<div class="woocommerce-message woocommerce-message--info woocommerce-Message woocommerce-Message--info woocommerce-info">
		<?php if ( $list_url ) : ?>
			<a href="<?php echo \esc_url( $list_url ); ?>" class="woocommerce-Button button">
				<?php \esc_html_e( 'My warranties', 'warranty-cart' ); ?>
			</a>
		<?php endif; ?>

		<?php \esc_html_e( 'That warranty could not be found.', 'warranty-cart' ); ?>
	</div>
</div>
<?php
// phpcs:enable
