<?php
$cart_panel_id = isset($cart_panel_id) ? $cart_panel_id : (isset($cart_panel_unique_id) ? $cart_panel_unique_id : uniqid('unlockafe-cart-panel-'));
$cart_overlay_id = isset($cart_overlay_id) ? $cart_overlay_id : (isset($cart_overlay_unique_id) ? $cart_overlay_unique_id : $cart_panel_id . '-overlay');
$cart_panel_label = isset($cart_panel_label) ? $cart_panel_label : esc_html__('Shopping cart', 'unlock-addons-for-elementor');
?>

<div id="<?php echo esc_attr($cart_panel_id); ?>" class="unlock_addon_cartmini_panel" aria-hidden="true">
    <div class="unlock_addon_cartmini_header">
        <h4><?php echo esc_html($cart_panel_label); ?></h4>
        <button type="button" class="unlock_addon_cartmini_close" data-cart-close="<?php echo esc_attr($cart_panel_id); ?>" aria-label="<?php esc_attr_e('Close cart', 'unlock-addons-for-elementor'); ?>">
            <i class="fa-solid fa-xmark" aria-hidden="true"></i>
        </button>
    </div>
    <div class="unlock_addon_cartmini_body">
        <?php if (class_exists('WooCommerce') && function_exists('woocommerce_mini_cart')) : ?>
            <?php woocommerce_mini_cart(); ?>
        <?php else : ?>
            <p class="unlock_addon_cartmini_empty">
                <?php esc_html_e('WooCommerce is not available.', 'unlock-addons-for-elementor'); ?>
            </p>
        <?php endif; ?>
    </div>
</div>
<div id="<?php echo esc_attr($cart_overlay_id); ?>" class="unlock_addon_cartmini_overlay" data-cart-overlay="<?php echo esc_attr($cart_panel_id); ?>" aria-hidden="true"></div>
