<?php
/**
 * Header cart icon section
 *
 * @package wpstrem-theme
 */

?>
<button class="btn btn-outline-secondary position-relative wp-stream-cart-btn" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvas-cart" aria-controls="offcanvas-cart">
	<?php echo wpstream_theme_get_svg_icon( 'cart.svg' );//phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
	<span class="visually-hidden-focusable"><?php esc_html_e( 'Cart', 'hello-wpstream' ); ?></span>
	<?php
	if ( function_exists( 'WC' ) ) {
		$count = WC()->cart->cart_contents_count;
		if ( $count > 0 ) {
			?>
			<span class="cart-content"><?php echo esc_html( $count ); ?></span>
			<?php
		}
	}
	?>
</button>