<?php

/**
 * Mini Cart Slidepanel Template
 *
 * @package Kubelio
 */

if (!class_exists('WooCommerce')) {
    return;
}
?>
<div id="mini-cart-panel" class="rt-mini-cart-slidepanel woocommerce rt-slidepanel is-slidepanel-right" style="display:none">
    <div class="rt-slidepanel__overlay js-slidepanel-close">
        <a class="rt-slidepanel__close" role="button" aria-label="<?php echo esc_attr__('Close mini cart', 'kubelio'); ?>">
            <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16">
                <path fill-rule="evenodd" d="M13.854 2.146a.5.5 0 0 1 0 .708l-11 11a.5.5 0 0 1-.708-.708l11-11a.5.5 0 0 1 .708 0Z"></path>
                <path fill-rule="evenodd" d="M2.146 2.146a.5.5 0 0 0 0 .708l11 11a.5.5 0 0 0 .708-.708l-11-11a.5.5 0 0 0-.708 0Z"></path>
            </svg>
        </a>
    </div>

    <div class="rt-slidepanel__inner has-background-background-color has-body-color">
        <div class="rt-slidepanel__wrapper flex flex-col" style="height: 100%;">
            <div class="rt-slidepanel__header">
                <h4 class="rt-slidepanel__title"><?php esc_html_e('Your cart', 'kubelio'); ?>
                    <span>
                        <?php
                        $count = (WC()->cart) ? WC()->cart->get_cart_contents_count() : 0;
                        echo '<span class="rt-mini-cart-panel-count rt_mini_cart_panel_count">(' . esc_html( sprintf( /* translators: %d: number of cart items. */ _n( 'item: %d', 'items: %d', absint( $count ), 'kubelio' ), absint( $count ) ) ) . ')</span>';
                        ?>
                    </span>
                </h4>

                <a class="rt-slidepanel__close js-slidepanel-close" role="button"
                    aria-label="<?php echo esc_attr__('Close menu', 'kubelio'); ?>">
                    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
                        class="bi bi-x-lg" viewBox="0 0 16 16">
                        <path fill-rule="evenodd"
                            d="M13.854 2.146a.5.5 0 0 1 0 .708l-11 11a.5.5 0 0 1-.708-.708l11-11a.5.5 0 0 1 .708 0Z">
                        </path>
                        <path fill-rule="evenodd"
                            d="M2.146 2.146a.5.5 0 0 0 0 .708l11 11a.5.5 0 0 0 .708-.708l-11-11a.5.5 0 0 0-.708 0Z">
                        </path>
                    </svg>
                </a>

            </div>
            <div class="rt-slidepanel__body px-0 py-0 is-layout-flow widget_shopping_cart">
                <div class="widget_shopping_cart_content">
                    <?php woocommerce_mini_cart(); ?>
                </div>
            </div>
        </div>
    </div>
</div>