<?php
/**
 * Header basket icon with item count and total.
 *
 * Basket state is managed client-side via localStorage.
 * The JS (basket-summary.js) updates these elements dynamically.
 *
 * @package Northfield_Theatre
 * @since 1.0.0
 */

$basket_url = home_url( '/basket/' );
?>
<div class="header-basket" id="header-basket">
	<a href="<?php echo esc_url( $basket_url ); ?>"
	   class="header-basket__link"
	   aria-label="<?php esc_attr_e( 'View your basket', 'northfield-theatre' ); ?>">
		<span class="header-basket__icon">
			<?php echo northfield_icon( 'basket', 22 ); ?>
			<span class="header-basket__count"
			      id="header-basket-count"
			      data-count="0"
			      aria-hidden="true"></span>
		</span>
		<span class="header-basket__info" id="header-basket-info">
			<span class="header-basket__label"><?php esc_html_e( 'Basket', 'northfield-theatre' ); ?></span>
			<span class="header-basket__total" id="header-basket-total"></span>
		</span>
	</a>
</div>
