<?php
/**
 * Header Cart Widget.
 *
 * @package     Business Interface
 */

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

$business_interface_cart_count = WC()->cart->get_cart_contents_count();
$business_interface_cart_icon  = apply_filters( 'business_interface_wc_cart_widget_icon', 'shopping-cart' );

?>
<a href="<?php echo esc_url( wc_get_cart_url() ); ?>" class="si-cart">
	<?php echo business_interface()->icons->get_svg( $business_interface_cart_icon ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
	<?php if ( $business_interface_cart_count > 0 ) { ?>
		<span class="si-cart-count"><?php echo esc_html( $business_interface_cart_count ); ?></span>
	<?php } ?>
</a>
